|
|
|
[[_TOC_]]
|
|
|
|
# Pipeline Scripts
|
|
|
|
This section is designed to outline the key procedures of each of the pipeline scripts.
|
|
|
|
|
|
|
|
# Init (Local)
|
|
|
|
|
|
|
|
[link](https://git.sharcnet.ca/bucanl_pipelines/eeg_pipe_asr_amica/wikis/essinit)
|
|
|
|
|
|
|
|
# Scalpart
|
|
|
|
1. Load an _init.set file
|
|
|
|
2. Standard Deviation or quantiles used to reject comically bad epochs (% goes to bad channel)
|
|
|
|
3. Re-reference to interpolated average site of MNI surface: without flagged channels
|
|
|
|
4. High pass filter
|
|
|
|
5. Low pass filter
|
|
|
|
6. Nearest Neighbour R on epochs, % goes to bad channel
|
|
|
|
* low correlation
|
|
|
|
* too high
|
|
|
|
7. Rank channel - highest correlation removed
|
|
|
|
8. ALL BAD CHANNELS GONE
|
|
|
|
9. Re-reference to interpolated average site of MNI surface: without all flagged channels
|
|
|
|
10. Nearest Neighbour R on epochs for time removal
|
|
|
|
* low correlation only by time segment
|
|
|
|
11. Save an _sa.set file
|
|
|
|
|
|
|
|
| Variable | Default in Config File | Description |
|
|
|
|
|--------------------|--------------------------------------------------|-------------|
|
|
|
|
| [in_path] | analysis/data/1_init | Relative path to input data files assuming cd = work_path |
|
|
|
|
| [recur_sec] | 1 | Recurrence (sec) for artifact detection epoching |
|
|
|
|
| [limit_sec] | [0 1] | Limits (sec) for artifact detection epoching |
|
|
|
|
| [sd_chan_z] | 2.326 | z threshold for flagging channel during standard deviation criteria |
|
|
|
|
| [sd_chan_p] | 0.1 | Percentage of flagged epochs required to flag a channel during standard |
|
|
|
|
| [sd_chan_trim] | 10 | Percentage trim for confidence intervals during channel neighbour r criteria (10 = 5% top and bottom) |
|
|
|
|
| [ref_loc_file] | analysis/support/misc/standard_1020_bucanl19.elc | Name of file containing the reference locations (including the relative path) |
|
|
|
|
| [low_bound_hz] | 2 | Lower bound of the filter bass-band |
|
|
|
|
| [high_bound_hz] | 30 | Upper bound of the filter bass-band |
|
|
|
|
| [n_neighb_chan] | 3 | Number of channels to use in nearest neighbour r calculation (for channel criteria) |
|
|
|
|
| [r_chan_z] | 2.326 | z threshold for flagging channel during neighbour r criteria |
|
|
|
|
| [r_chan_p] | 0.1 | Percentage of flagged epochs required to flag a channel during neighbour r criteria |
|
|
|
|
| [r_chan_trim] | 10 | Percentage trim for confidence intervals during channel neighbour r criteria (10 = 5% top and bottom) |
|
|
|
|
| [bridge_trim] | 40 | Percentage trim for z calculation of bridged channels (e.g. 40 = 20% top and bottom) |
|
|
|
|
| [bridge_z] | 3 | z threshold for flagging channel during bridging criteria |
|
|
|
|
| [n_neighb_epoch] | 3 | Number of channels to use in nearest neighbour r calculation (for epoch criteria) |
|
|
|
|
| [epoch_z] | 2.32 | z threshold for flagging epochs during neighbour r criteria |
|
|
|
|
| [epoch_p] |0. 2 | Percentage of flagged channels required to flag an epoch during neighbour r criteria |
|
|
|
|
| [epoch_trim] | 20 | Percentage trim for confidence intervals during epoch neighbour r criteria (20 = 10% top and bottom) |
|
|
|
|
| [out_path] | analysis/data/2_preproc | Relative path to output data files assuming cd = work_path |
|
|
|
|
| [amica_param_file] | analysis/support/misc/amica_default.param | template amicadefs.param file to modify |
|
|
|
|
| [savediff] | NO | YES if you want to save the filter residuals |
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
# Amica
|
|
|
|
|
|
|
|
Versions
|
|
|
|
* amica_init
|
|
|
|
* amica_asrinit
|
|
|
|
* amica_A,B,C
|
|
|
|
* amica_D,E,F
|
|
|
|
|
|
|
|
|
|
|
|
| Variable | Default in Config File | Description |
|
|
|
|
|-------------|--------------------------------------------------------------|-------------|
|
|
|
|
| [dep_path] | analysis/support/dependencies/eeglab_asr_amica/plugins/amica | Relative path to amica executable program assuming cd = work_path |
|
|
|
|
| [in_path] | analysis/data/2_preproc | Relative path to input data files assuming cd = work_path |
|
|
|
|
| [amica_ver] | amica15ub | Name of the amica executable program version |
|
|
|
|
|
|
|
|
# Compart
|
|
|
|
|
|
|
|
Versions
|
|
|
|
* compart_data
|
|
|
|
* compart_asrdata
|
|
|
|
|
|
|
|
|
|
|
|
| Variable | Default in Config | Description |
|
|
|
|
|--------------------|-------------------------------------------|-------------|
|
|
|
|
| [in_path] | analysis/data/2_preproc | Path to input and output data files assuming cd = work_path |
|
|
|
|
| [recur_sec] | 1 | Recurrence (sec) for artifact detection epoching |
|
|
|
|
| [limit_sec] | [0 1] | Limits (sec) for artifact detection epoching |
|
|
|
|
| [epoch_z] | 2.326 | z threshold for flagging channel during ic_sd criteria |
|
|
|
|
| [epoch_p] | 0.1 | Percentage of flagged components required to flag an epoch during ic_sd criteria |
|
|
|
|
| [epoch_trim] | 20 | Percentage trim for confidence intervals during channel neighbour r criteria (20 = 10% top and bottom) |
|
|
|
|
| [out_path] | analysis/data/2_preproc | Relative path to output data files assuming cd = work_path |
|
|
|
|
| [amica_param_file] | analysis/support/misc/amica_default.param | Template amicadefs.param file to modify. |
|
|
|
|
| [min_gap_ms] | 4000 | Minimum time (ms) to allow between periods marked for rejection |
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
# ASR
|
|
|
|
|
|
|
|
ASR learning time and model selection
|
|
|
|
The selection of the learning model is based of segments of time that have a high AMICA log likelihood values.
|
|
|
|
ASR learn time ticks through each of the data points of the log likelihood and looks at the Lt values. By default for the time to be considered the one second block must have 80% of its points above them mean. This percentage can be adjusted, but its intent is prevent time segments where the model may be bad for part but the other half is very strong. If the following second has enough values above your critical mean then it is considered viable for the learning time. By progressing through each data point, sections of time will only be flagged for time sections for 1 sec or longer, but is not limited to 1 second intervals.
|
|
|
|
|
|
|
|
Viable time is then sorted so that the highest blocks log likelihood time are added first to the total time.Segments are continued to be added until the total time value defaulted at 1 minute is filled. This EEG data is added up and then sent to the *clear_asr* function.
|
|
|
|
|
|
|
|
| Variable | Default in Config File | Description |
|
|
|
|
|--------------------|-------------------------------------------|-------------|
|
|
|
|
| [in_path] | analysis/data/2_preproc | Relative path to input data files assuming cd = work_path |
|
|
|
|
| [out_path] | analysis/data/2_preproc | Relative path to output data files assuming cd = work_path |
|
|
|
|
| [amica_param_file] | analysis/support/misc/amica_default.param | template amicadefs.param file to modify. |
|
|
|
|
| [asr_sd_cutoff] | 20 | Any data over this standard deviation will be excluded |
|
|
|
|
| [asr_winlen] | [] | Window length, does not normally need adjusting |
|
|
|
|
| [asr_stepsize] | [] | Processing step size, does not normally need adjusting |
|
|
|
|
| [asr_maxdims] | [] | Max matrix dimension reconstruction size faction or value (eg. 2/3), does not normally need adjusting |
|
|
|
|
| [asr_learningtime] | 60 | How long of data ASR trains on in sec |
|
|
|
|
| [asr_reftol] | [] | ASR reference tolerence by standard deviation (eg. [-3.5 5.5]) not needed as learning data is supplied |
|
|
|
|
| [asr_refwinlen] | [] | Window length of references. (eg. 1), does not normally need adjusting |
|
|
|
|
| [asr_useGPU] | false | Run on the GPU or not (true or false). |
|
|
|
|
| [min_gap_ms] | 4000 | Minimum time (ms) to allow between periods marked for rejection |
|
|
|
|
| [savediff] | NO | YES if you want to save the filter residuals |
|
|
|
|
| [critmean] | 0.8 | Fraction of training points that need to be above the mean to be included in ASR training |
|
|
|
|
| [asr_mem] | 5000 | Free memory allotted to asr in MB must be >256 (Default: 5000), for remote should be less then mpp allotted. |
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
# Concat
|
|
|
|
|
|
|
|
Versions
|
|
|
|
* concat_data
|
|
|
|
* concat_asrdata
|
|
|
|
|
|
|
|
|
|
|
|
| Variables | Default in Config | Description |
|
|
|
|
|--------------|-------------------------|-------------|
|
|
|
|
| [in_path] | analysis/data/2_preproc | Relative path to input data files assuming cd = work_path |
|
|
|
|
| [out_path] | analysis/data/2_preproc | Relative path to output data files assuming cd = work_path |
|
|
|
|
| [recur_sec] | 1 | Recurrence (sec) for the current artifact detection epoching |
|
|
|
|
| [limit_sec] | [0 1] | Limits (sec) for the current artifact detection epoching |
|
|
|
|
| [epoch_z] | 2.326 | z threshold for flagging channel during icsd criteria |
|
|
|
|
| [epoch_p] | 0.1 | Percentage of flagged components required to flag an epoch during icsd criteria |
|
|
|
|
| [epoch_trim] | 20 | Percentage trim for confidence intervals during channel neighbour r criteria (20 = 10% top and bottom) |
|
|
|
|
| [min_gap_ms] | 4000 | Minimum time (ms) to allow between periods marked for rejection |
|
|
|
|
|
|
|
|
# Dipfit
|
|
|
|
|
|
|
|
|
|
|
|
***
|
|
|
|
|
|
|
|
[ :house: **Return to Main Page**](https://git.sharcnet.ca/bucanl_pipelines/eeg_pipe_asr_amica/wikis/home) |
|
|
|
\ No newline at end of file |