Skip to content

Commit 23c3b0c

Browse files
authored
Update README.md
1 parent 7ee9143 commit 23c3b0c

1 file changed

Lines changed: 44 additions & 10 deletions

File tree

‎README.md‎

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ perceiveModular('','','','', '', 'perceive_localsettings_mylab.json') % localset
119119
perceiveModular('Report_Json_Session_Report_20200115T123657.json',25,'MedOff','yes', 'yes', 'perceive_localsettings_default.json') % combination of all above
120120
121121
```
122-
123122
# OUTPUT
124123

125124
The script generates BIDS bids.neuroimaging.io/ inspired subject and session folders with the
@@ -138,26 +137,46 @@ CT = Calibration Testing - Calibration Tests
138137

139138
BSL = BrainSense LFP (2 Hz power average + stimulation settings)
140139

141-
EI = Electrode Identifier (as of DataVersion 1.2)
140+
BSTD = BrainSense Time Domain (250 Hz raw data corresponding to the BSL file)
141+
142+
BrainSenseBIp = BrainSense Bipolar, is merged combination of 2 BSTD with 1 BSL file.
142143

144+
EI = Electrode Identifier (as of DataVersion 1.2)
143145

146+
# Graphical User Interface (GUI)
144147

145-
# Extra Note on use of GUI
148+
## if GUi use is "yes"
149+
specify to use the GUI
150+
```matlab
151+
perceiveModular('Report_Json_Session_Report_20200115T123657.json',9,'','', 'yes') %use gui for renaming and concatenation at end of perceive output
152+
```
153+
the GUI allows for
154+
* remove unwanted streams
155+
* specifying task names
156+
* specifying run number
157+
* specifying acquisition, including stimulation options
158+
* * advanced settings
159+
* specifying part number
160+
* * for concatenating streams with exactly the same name, apart from the part number
161+
162+
![Alt Text](path/to/Overview_perceive_GUI.png)
146163

164+
![Alt Text](path/to/Overview_perceive_GUI_detail.png)
147165

148166

149167
# Stream concatenation
150168
## i.e. stitching 2 or more streams together due to interruption
151169

152-
## How?
153170
The sampleinfo is used, which is a sample information based on the MSecTicks.
154171
The sampleinfotime is now the sample number of the FirstPackageTime of the absolute time, computed from midnight, with a length of the sample frequency x the trial length (no further correction).
155172
2 streams are concatenated by compute the sample difference between the last sample of the first part, and the first sample of the next part, (iteratively for multiple parts). This amount are the NaN values inserted when concatenating the streams.
156173

157-
##GUI
158-
159-
174+
## note on time-specificity
160175

176+
Because the FirstPacketDateTime is used, the resolution of that is 1 second, according to the Medtronic documentation.
177+
The TicksInMSec have a resolution of 50ms, however, it is according to the ongoing information exchange with Medtronic as of now not possible to use the TicksInMSec of 2 streams to use these for concatenation.
178+
According to the documenation TicksInMSec roll over at 2^16 Ticks unless it is an ongoing streaming. However, we were unable to find a satisfying solution for stream concatination based on our observations.
179+
For higher time resolution and external synchronization, we refer to our colleagues with the Toolbox DBSSync [DOI: 10.21203/rs.3.rs-8228751/v1](https://doi.org/10.21203/rs.3.rs-8228751/v1)
161180

162181
## Manually increasing or decreasing the NaN interval
163182

@@ -178,9 +197,24 @@ perceive_stitch_interruption_together('sub-006_ses-Fu18mMedOff02_task-Rest_acq-S
178197
perceive_stitch_interruption_together('sub-006_ses-Fu18mMedOff02_task-Rest_acq-StimOff_mod_BrainSenseBip_run-1_part-', -145, true) %remove 145ms of NaNs from the the default NaN-insertion in between streams
179198
```
180199

181-
200+
# artefact rejection
201+
Currently, there is in this perceiveModular version no automatic artefact rejection (e.g. ECG cleaning); we refer to our colleagues [DOI: 10.21203/rs.3.rs-8228751/v1](https://doi.org/10.21203/rs.3.rs-8228751/v1)
202+
and the Stam et al. 2023 Clinical Neurophysiology [DOI: 10.1016/j.clinph.2022.11.011](https://doi.org/10.1016/j.clinph.2022.11.011)
182203

204+
# package loss
205+
Currently, there is no correction implemented for package loss, as it did not produce stable results for us.
206+
Therefore, we refer to the documenation of Medtronic:
207+
```matlab
208+
TDtime = (TicksInMses(end)- (GlobalPacketSize(end)-1)/fsample) : 1/fsample : TicksInMses(end);
209+
for m=length(GlobalPacketSize):-1:2
210+
if TicksInMses(m)-TicksInMses(m-1) > (1 + GlobalPacketSize(m))/ fsample
211+
Prev_packet = (TicksInMses(m-1)- (GlobalPacketSize(m-1)-1)/ fsample) : 1/fsample : TicksInMses(m-1);
212+
TDtime = [Prev_packet,TDtime];
213+
else
214+
Prev_packet = (TDtime(1)- GlobalPacketSize(m-1)/ fsample): 1/fsample : TDtime(1) - 1/fsample;
215+
TDtime = [Prev_packet,TDtime];
216+
end
217+
end
218+
```
183219

184220

185-
BSTD = BrainSense Time Domain (250 Hz raw data corresponding to the BSL file)
186-

0 commit comments

Comments
 (0)