Authors: Elizabeth Bock
The process will identify when a subject has moved during a recording. This runs only on continuous, raw recordings for CTF MEG where continuous head localization is recorded (and therefore HLC channels are collected.) This process is currently being tested. If you find a bug or have other comments related to its performance, please provide comments here or on the Forum.
The end goal of this detection is to find when the subject has moved into a new position relative to the beginning measurement, beyond an acceptable limit and then cut the longer recordings into shorter recording and assign a new head position to each. There are two steps:
Detect the movement. This will go through the recording and mark short transient movements (<5 seconds) as 'BAD' and mark the beginning of longer movements where the file can be cut. It generates a file called headpostions.txt which contains the recommended locations where the file should be cut and the new head position that should be written to the new file.
Cut the recording into shorter recordings using the CTF software. Use the headpositions.txt file to know where to make the new .ds files and what the new head position should be. This is done outside the Brainstorm software, using the CTF commandline program newDs. You can see an example here: split_ctf_recording.m
To run the movement detection, put the raw link in the Process1 box -> Run -> Events -> Detect movement [Experimental]
Movement threshold: This is the threshold which will be considered a movement
Threshold allowance: This is the range around the threshold that the movement is allowed before a change of state (movement vs no movement). This allows for some hystorisis so no too many small transient movements are detected.
Fit error tolerance: This the threshold for fit error. When the fit error exceeds this tolerance, the segment of data will be marked with an event move_fit_BAD. This indicates that the measured position is not reliable.
Minimum split length: This is the minimum time for a recording length. If the movement is less and 5 seconds (transient) the event is marked as move_BAD. If the movement lasts > 5 secs (the subject has moved into a new position), then the beginning of the event is marked as longStart.