= Full analysis with one script = This tutorial explains how to use the Brainstorm scripting interface to run a full analysis, from the raw recordings to the source reconstruction. It is based on a median nerve stimulation experiment recorded at the Montreal Neurological Institute in 2011 with a CTF MEG 275 system. The sample dataset contains 6 minutes of recordings at 1200Hz for one subject and includes 100 stimulations of each arm. The tutorial follows the analysis steps detailed in the three advanced tutorials in the category [[Tutorials|Processing continuous recordings]]. You should read them before reading this tutorial, to have the explanations that go with the analysis steps. <> == Creating the analysis pipeline == Select the menu File > Create new protocol. Name it "'''!TutorialScript'''" and select the options: * "'''No, use individual anatomy'''", * "'''Yes, use one channel file per subject'''". To start building your analysis pipeline, just click on the "'''Run'''" button in the Process1 tab. Then add all the processes listed below. The output of each process is the input of the following one, this is why they cannot necessarily be shuffled. ==== Import anatomy > Import FreeSurfer folder ==== * Subject name: Subject01 * Folder to import: Select the folder sample_raw/Anatomy * Number of vertices (cortex): 15000 * Fiducials: Copy what is indicated below. This is a reason it is usually easier to do this step in interactive mode, and then run only the script starting from the next step. * Input: None; Output: None {{attachment:procImportFs.gif}} ==== Import recordings > Create link to raw file ==== Input: None; Output: Raw file {{attachment:procLinkRaw.gif|procImportFs.gif}} ==== Pre-process > Sinusoid removal (notch) ==== Input: Raw file ; Output: Raw file (new) {{attachment:procSin.gif|procImportFs.gif}} ==== Artifacts > Detect eye blinks ==== Input: Raw file ; Output: Raw file {{attachment:procDetectEog.gif|procImportFs.gif}} ==== Artifacts > Compute SSP: eye blinks ==== Input: Raw file ; Output: Raw file {{attachment:procSspEog.gif|procImportFs.gif}} ==== Import recordings > ==== Input: Raw file ; Output: 200 epochs in 2 conditions