NeuroAnalyzer tutorials: General remarks

NeuroAnalyzer functions operate on NeuroAnalyzer objects. The major object is NeuroAnalyzer.NEURO, which is an equivalent of single recording of any type (e.g. EEG or MEG).

mutable struct NEURO
    header::NeuroAnalyzer.HEADER
    time_pts::Vector{Float64}                         # time points for the whole signal
    epoch_time::Vector{Float64}                       # time points for single epoch
    data::Array{<:Number, 3}                          # data must have at least one channel and one epoch
    components::Dict{Any}                             # additional data, e.g. ICs
    markers::DataFrame                                # event markers
    locs::DataFrame                                   # channel locations
    history::Vector{String}                           # list of operations
end

The NeuroAnalyzer.NEURO object contains a header with the following meta-data:

mutable struct HEADER
    subject::Dict
    recording::Dict
    experiment::Dict
end

The subject dictionary contains the following keys:

For EEG/sEEG/ECOG objects, the recording dictionary contains the following keys:

For MEG objects, the recording dictionary contains the following keys:

For NIRS objects, the recording dictionary contains the following keys:

For MEP objects, the recording dictionary contains the following keys:

For EDA objects, the recording dictionary contains the following keys:

For SENSORS objects, the recording dictionary contains the following keys:

The experiment dictionary contains the following keys:

Event markers is a DataFrame with the following columns: - :id: name of the event, type String - :start: event start point in seconds, type Float64 - :length: event length in seconds, type Float64 - :description: event description, type String - :channel: event channel, default is 0 (all channels)

For multichannel recordings, signal is stored in data as Array{Float64, 3} (channels × signals × epochs). If epochs are not defined, the whole signal is an epoch, i.e. there is always at least one epoch.

Higher NeuroAnalyzer functions (operating on NeuroAnalyzer.NEURO object) use named arguments for all arguments other than input object(s), e.g. delete_epoch!(my_eeg, ep=12).

Study object is stored in the NeuroAnalyzer.STUDY structure:

mutable struct STUDY
    header::Dict{Symbol, Any}
    objects::Vector{NeuroAnalyzer.NEURO}
    groups::Vector{Symbol}
end

Multiple dispatch mechanism is used wherever possible.

Most edit/process functions have a mutator variant (e.g. delete_epoch() and delete_epoch!()). Mutators modify the input NEURO object in-place, e.g. you may use delete_channel!(my_eeg, ch=1) instead of my_eeg = delete_channel(my_eeg, ch=1).