= Additional bad segments = ''Authors: Francois Tadel, Elizabeth Bock, Sylvain Baillet'' <> == Automatic detection == 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 process will detect epochs of time that contain typical artifacts from eye movement, subject movement or muscle artifact. While it is still advised that you visually inspect all of your data, this process can help identify areas that contain artifacts which you may want to mark as bad segments in the recording. Currently, the process runs only on continuous raw links and identifies artifacts in two frequency bands. These bands are specifically chosen because of the predictability of artifacts in these bands. Note that the alpha band ([8,12]Hz) is specifically avoided here since some alpha oscillations can be quite high in amplitude and falsely detected as artifact. * [1,7]Hz - contains those events typically related to subject movement, eye movements and dental work (or other metal) * [40,240]Hz - contains those events related to muscle noise and some sensor artifacts === Running the process === '''Note: Before running this detection it is highly recommended that you run the cleaning processes for cardiac and eye blink artifacts.''' To use the process, drop the Link to raw file in the Process1 tab -> click Run -> Events -> Detect artifact epochs [test]. Here you have the options window: {{http://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactDetect?action=AttachFile&do=get&target=artifact_detect_pipeline_editor.png|artifact_detect_pipeline_editor.png|class="attachment"}} * Time window - the time window for which the detection will be performed * Threshold - the sensitivity of the detection, where 1 is very sensitive and 5 is very conservative. The value of three tends to work well for a variety of data conditions * Frequency band selection - check the box for which band(s) you will perform the detection After running the process, event types are created, one for each frequency band. They contain extended events indicating the start and end of the epoch. The time resolution is 1 second and therefore the epoch may, in fact, be a bit longer than the actual artifact. You can manually refine the time definition if you wish and mark some or all events as bad. {{http://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactDetect?action=AttachFile&do=get&target=artifact_detect_events.png|artifact_detect_events.png|class="attachment"}} === Recommendations for usage === * Start by running the process on one run per subject. Scan though the recording and confirm that the detection is performing well. * Adjust the threshold as needed, then run the detection on the other runs for that subject. * If there are many eye movements, the [1,7]Hz detection can work well for computing an SSP projector. This is done using the Artifacts menu -> SSP: Generic and selecting the artifact_1-7Hz event, see below. If a suitable projector is found and applied, re-run the artifact detection to find the remaining artifacts that were not removed. {{http://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactDetect?action=AttachFile&do=get&target=SSP_for_artifact1-7Hz.png|SSP_for_artifact1-7Hz.png|class="attachment"}} == Bad segments [REMOVE] == * At this point, you should review the entire files, by pages of a few seconds scrolling with the F3 key, to identify all the bad channels and the noisy segments of recordings. Do this with the the EOG channel open at the same time to identify saccades or blinks that were not completely corrected with the SSP projectors. As this is a complicated task that requires some expertise, we have prepared a list of bad segments for these datasets. * Open '''Run01'''. In the Record tab, select '''File > Add events from file''': * File name: sample_auditory/data/S01_AEF_20131218_01_notch/'''events_bad_01.mat ''' * File type: Brainstorm (events*.mat) * It adds '''12 bad segments''' to the file. * Open '''Run02'''. In the Record tab, select '''File > Add events from file''': * File name: sample_auditory/data/S01_AEF_20131218_02_notch/'''events_bad_02.mat ''' * File type: Brainstorm (events*.mat) * It adds '''9 bad segments''' and '''16 saccades''' to the file. == Manual inspection == Review quickly all your recordings to make sure that all the bad segments are now identified. This takes a few minutes but may save you hours in the rest of your analysis. It is very irritating to discover at the end of your analysis that you have to redo everything from the pre-processing because you have left some noisy segments in the recordings. == Saccades == == Elekta jumps == Description of the problem. Applying MaxFilter/SSS to the recordings with jumps on one sensor propagates the jump to all the sensor, then you have to reject the epoch. Two options: * Fixing the problem before running MaxFilter to apply the SSS correction: * Removing all the channels with jumps * Computing SSPs to remove the jumps * Marking all the segments with jumps as bad in Brainstorm, and ignore them in the analysis. <> <>