| [in_path] | analysis/data/1_init | Relative path to input data files assuming cd = work_path |
| [in_path] | [] | Relative path to input data files assuming cd = work_path |
| [montage_info] | derivatives/lossless/code/scripts/staging_script.m | Montage information to fit channel locations on a standard surface. This can be a transformations matrix (e.g. [-.14,-22,-48,-.07,0,-1.57,1080,1260,1240]), or a a file containing a transformation matrix (e.g. [batch_dfn]_transmat.mat), or a BIDS channel location tsv file (assuming that during BIDS init the channels were coregistered to the standard surface). |
| [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) |
| [sd_t_meth] | q | Method used for flagging epochs (e.g. 'q' (quantiles), or 'na') |
| [sd_t_vals] | [.3 .7] | Percentage trim for confidence intervals during epoch standard deviation criteria (e.g. [.3 .7]) |
| [sd_t_o] | 6 | z threshold for flagging epochs during standard deviation criteria |
| [sd_t_f_meth] | fixed | Fixed method used for flagging epochs (should be 'fixed') |
| [sd_t_f_vals] | | Percentage trim for confidence intervals during epoch standard deviation criteria (e.g. [.3 .7], leave empty for 'fixed') |
| [sd_t_f_o] | 0.2 | z threshold for flagging epochs during fixed standard deviation criteria |
| [sd_t_pad] | 1 | Number of windows to pad onto each side of the ch_sd time flag |
| [sd_ch_meth] | q | Method used for flagging channels (e.g. 'q' (quantiles), or 'na') |
| [sd_ch_vals] | [.3 .7] | Percentage trim for confidence intervals during channel standard deviation criteria (e.g. [.3 .7]) |
| [sd_ch_o] | 6 | z threshold for flagging channels during standard deviation criteria |
| [sd_ch_f_meth] | fixed | Fixed method used for flagging channels (should be 'fixed') |
| [sd_ch_f_vals] | | Percentage trim for confidence intervals during channel standard deviation criteria (e.g. [.3 .7], leave empty for 'fixed') |
| [sd_ch_f_o] | 0.2 | z threshold for flagging channel during fixed standard deviation criteria
| [ref_loc_file] | derivatives/lossless/code/misc/standard_1020_bucanl19.elc | Name of file containing the reference locations (including the relative path) |
| [low_bound_hz] | 1 | Lower bound of the filter bass-band |
| [high_bound_hz] | | Upper bound of the filter bass-band |
| [save_f_res] | 1 | 1 if you want to save the filter residuals |
| [n_nbr_ch] | 3 | Number of channels to use in nearest neighbour r calculation (for channel criteria) |
| [r_ch_meth] | q | Method used for flagging low r channels (e.g. 'q' (quantiles), or 'na') |
| [r_ch_vals] | [.3 .7] | Percentage trim for confidence intervals during low r channel standard deviation criteria (e.g. [.3 .7]) |
| [r_ch_o] | 6 | z threshold for flagging channel during neighbour r criteria (e.g. 3) |
| [r_ch_f_meth] | fixed | Fixed method used for flagging low r channels (should be 'fixed') |
| [r_ch_f_vals] | | Percentage trim for confidence intervals during low r channel standard deviation criteria (e.g. [.3 .7], leave empty for 'fixed') |
| [r_ch_f_o] | 0.2 | z threshold for flagging channel during fixed neighbour r criteria (e.g. 3) |
| [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 |
The Amica script is run once initially, and then three more times in parallel after the component artefact rejection to ensure that the Amica procedure is replicable if run multiple times on the same dataset.
Versions
* amica_init
* amica_asrinit
* amica_A,B,C
* amica_D,E,F
* amica_init (s02)
* amica_A,B,C (s04a, s04b, s04c)
| Variable | Default in Config File | Description |
| [amica_threads_s04] | 8 | number of threads to use for running s04a, s04b, s04c amica scripts |
# 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 |
| [in_path] | derivatives/lossless | Relative path to input 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
| [sd_t_meth] | q | Method used for flagging epochs (e.g. 'q' (quantiles), or 'na') |
| [sd_t_vals] | [.3 .7] | Percentage trim for confidence intervals during epoch standard deviation criteria (e.g. [.3 .7]) |
| [sd_t_o] | 6 | z threshold for flagging epochs during standard deviation criteria (e.g. 6) |
| [sd_t_f_meth] | fixed | Fixed method used for flagging epochs (should be 'fixed') |
| [sd_t_f_vals] | | Percentage trim for confidence intervals during epoch standard deviation criteria (e.g. [.3 .7], leave empty for 'fixed') |
| [sd_t_f_o] | 0.2 | z threshold for flagging epochs during fixed standard deviation criteria (e.g. .2) |
| [min_gap_ms] | 2000 | Minimum time (ms) to allow between periods marked for rejection |
| [icr_crit] | 0.05 | False discovery rate of component replicatablilty, measure of sensitivity % |
| [dip_vol] | derivatives/lossless/code/misc/standard_vol.mat | file path/name of the standard volume file used in dipole fitting |
| [dip_mri] | derivatives/lossless/code/misc/standard_mri.mat | file path/name of the standard mri file used in dipole fitting |
| [dip_elc] | derivatives/lossless/code/misc/standard_1020.elc | file path/name of the standard electrode file used in dipole fitting |
| [dip_transmat] | [0 0 0 0 0 0 1 1 1] | Transformation matrix to apply during dipole fit |
| [cor_transmat] | [0,0,0,0,0,1.57,1,1,1] | The transformation matrix to apply between dipole fitting to the standard head and performing ICLabel to the EEGLAB default orientation |
| [cor_nosedir] | +X | Nose direction of montage to apply between dipole fitting to the standard head and performing ICLabel to the EEGLAB default orientation (e.g. +Y) |
| [out_path] | derivatives/lossless | Relative path to output data files assuming cd = work_path |
***
*Updated/Verified by Mike Cichonski on 2019-03-13*
[ :house: **Return to Main Page**](https://git.sharcnet.ca/bucanl_pipelines/bids_lossless_eeg/wikis/home)