Skip to content

CTAP configuration

Jussi Korpela edited this page Dec 8, 2016 · 8 revisions

CTAP configuration struct "Cfg" - Required fields and structure

The tables below list fields that might exist in the Cfg struct. Fields marked in italics must always be set by the user. Some fields are directly defined by the user (generated by: user) or automatically generated using information provided by the user (generated by: CTAP/user).

Descriptions of table columns

Fieldname: name of the struct field

generated by: how the field gets populated

type: data type of the field

allowed / default values: allowed values of default values for the field if applicable

description: description of the field

Cfg.env

What: analysis environment setup

Created by: CTAP based on user provided configuration

Fieldname generated by type allowed / default values description
Cfg.env.paths Important directories used by CTAP.
.ctapRoot user string NA The root directory of all pipes (non-branched or branched). This directory usually contains the .analysisRoot directory for non-branched pipes and the starting pipe directory for branched pipes.
.analysisRoot user/CTAP string NA The root directory of all result files of the current pipe. Use cfg_create_paths() to create this in branched settings.
.branchSource CTAP string NA EEG source directory for current pipe, if not raw EEG from MC.measurement. Use cfg_create_paths() to create. Used only in branched settings.
.featuresRoot CTAP string NA Root directory for extracted features
.exportRoot CTAP string NA Root directory for exported features (csv or SQL), or extracted non- EEG signals (e.g. EDA)
.qualityControlRoot CTAP string NA Root directory for quality control material
.logRoot CTAP string NA Root directory for logging
Cfg.env
.measurementInfo user string NA Full filename of the measurement configuration (MC) file
.logFile CTAP string NA Full filename for storing log text

Cfg.eeg

What: EEG related config

Created by: CTAP based on user provided configuration

Fieldname generated by type allowed / default values description
.reference user cell of strings list of channel names, "average" Desired channel reference
.veogChannelNames user cell of strings NA Channel names of VEOG channels
.heogChannelNames user cell of strings NA Channels names of HEOG channels
Cfg.eeg.chanlocs Channel locations specification needed to load channel locations
.file user string NA Full filename of the channel locations file
.filetype optional string NA For EEGLAB readlocs(), see 'help readlocs'
.format optional cell array NA For EEGLAB readlocs(), see 'help readlocs'
.skiplines optional integer NA For EEGLAB readlocs(), see 'help readlocs'

Cfg.MC

What: measurement configuration data

Created by: CTAP or user

Fieldname generated by type allowed / default values description
.< fields > NA NA NA Data is loaded from an external file that is either autogenerated or manually crafted. See specifications below and in TODO.

Cfg.pipe

What: analysis steps, generated based on the analysis pipe definition that the user provides.

Created by: CTAP

Fieldname generated by type allowed / default values description
runMeasurements CTAP cell of strings NA "Casenames" of the set of measurements to run. Casenames are unique IDs used in MC.
stepSets CTAP struct NA List of all available step sets.
runSets CTAP cell of strings NA ID strings of step sets to run.

Cfg.ctap

What: Analysis step related configurations: each field corresponds to a function CTAP_< fieldname >.m. Each function has its own set of defaults that can be overridden using Cfg.ctap.. Some of the frequently used functions are listed below. Full list of functions can be found in TODO. All arguments are defined as keyword-value pairs, here stored as structs with keywords as struct fields.

Created by: CTAP based on user definitions in configuration

Fieldname generated by type allowed / default values description
detect_bad_channels optional struct keyword-value pairs as structs Bad channel detection
detect_bad_comps optional struct keyword-value pairs as structs Bad ICA component detection
detect_bad_epochs optional struct keyword-value pairs as structs Bad epoch detection
epoch_data optional struct keyword-value pairs as structs Epoching of dataset
export optional struct keyword-value pairs as structs Exporting features
extract_peripherals optional struct keyword-value pairs as structs Removal of unwanted channels
filter_data optional struct keyword-value pairs as structs Filtering of data
interp_chan optional struct keyword-value pairs as structs Interpolation of channels
load_chanlocs optional struct keyword-value pairs as structs Loading channel locations
load_data optional struct keyword-value pairs as structs Loading data
load_events optional struct keyword-value pairs as structs Loading events
reject_data optional struct keyword-value pairs as structs Rejecting detected bad channels/components/events/etc.
reref_data optional struct keyword-value pairs as structs Re-referencing data
run_ica optional struct keyword-value pairs as structs Running ICA
select_data optional struct keyword-value pairs as structs Selecting data
tidy_chanloc optional struct keyword-value pairs as structs Allows channel type naming, deletion of type-less channels

Cfg.event

What: event naming etc.

Created by: CTAP based on user definitions in configuration

Fieldname generated by type allowed / default values description
badSegement CTAP string "badSegment" EEG.event.type string for events representing bad segments
blink CTAP string "blink" EEG.event.type string for events representing blinks
csegEvent CTAP or user string NA Event type of the events that define calculation segments. Either some existing user defined event or generated using CTAP_generate_cseg.m.

Cfg.grfx

What: graphical settings

Created by: CTAP based on user definitions in configuration

Fieldname generated by type allowed / default values description
on optional boolean true/false Global flag controls whether functions create quality assurance plots. Functions that plot can accept their own flags which override this.

Cfg.export

What: feature export related stuff

Created by: CTAP based on user definitions in configuration

Fieldname generated by type allowed / default values description
csegMetaVariableNames optional cell of strings all available Names of variables to include in calculation segment metadata.