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
::NeuroAnalyzer.HEADER
header::Vector{Float64} # time points for the whole signal
time_pts::Vector{Float64} # time points for single epoch
epoch_time::Array{<:Number, 3} # data must have at least one channel and one epoch
data::Dict{Any} # additional data, e.g. ICs
components::DataFrame # event markers
markers::DataFrame # channel locations
locs::Vector{String} # list of operations
historyend
The NeuroAnalyzer.NEURO
object contains a header with
the following meta-data:
mutable struct HEADER
::Dict
subject::Dict
recording::Dict
experimentend
The subject
dictionary contains the following keys:
:id::String
:first_name::String
:middle_name::String
:last_name::String
:handedness::String
:weight::Float64
:height::Float64
For EEG objects, the recording
dictionary contains the
following keys:
:data_type::String
: “eeg”:file_name::String
:file_size_mb::Float64
:file_type::String
: e.g. “EDF”, “EDF+”, “BDF”, “BDF+”,
“Digitrack”, “BrainVision”, “CSV”, SET”, “GDF”:recording::String
: e.g. equipment name:recording_date::String
:recording_time::String
:recording_notes::String
:channel_type::Vector{String}
: e.g. [“eeg”, “eog”,
‘emg’]:reference::String
: e.g. “CAR”:labels::Vector{String}
: e.g. [“Fp1”, “Fp2”]:transducers
:units::Vector{String}
: e.g. [“uV”]:prefiltering::Vector{String}
:sampling_rate::Int64
:gain::Vector{Float64}
For MEG objects, the recording
dictionary contains the
following keys:
:data_type::String
: “meg”:file_name::String
:file_size_mb::Float64
:file_type::String
: “FIFF”:recording::String
:recording_date::String
:recording_time::String
:recording_notes::String
:channel_type::Vector{String}
: e.g. [“mag”,
“grad”]:reference::String
:labels::Vector{String}
: e.g. [“MEG1”, “MEG2”]:units::Vector{String}
: e.g. [“fT”]:prefiltering::Vector{String}
:sampling_rate::Int64
:magnetometers::Vector{Int64}
: list of channel of
particular type:gradiometers::Vector{Int64}
: list of channel of
particular type:gradiometers_planar::Vector{Int64}
: list of channel of
particular type:gradiometers_axial::Vector{Int64}
: list of channel of
particular type:coils::Vector{Int64}
For NIRS objects, the recording
dictionary contains the
following keys:
:data_type::String
: “nirs”:file_name::String
:file_size_mb::Float64
:file_type::String
: “NIRS”, NIRX” or “SNIRF”:recording::String
: e.g. equipment name:recording_date::String
:recording_time::String
:recording_notes::String
:wavelengths::Vector{Float64}
:wavelength_index::Vector{Int64}
: wavelength indices
for nirs_int
and nirs_od
channels:channel_pairs::Matrix{Int64}
: matrix of
source-detector pairs:channel_type::Vector{String}
:labels::Vector{String}
: channel labels
(sensor_detector wavelength), e.g. [“S1_D1 780”]:units::Vector{String}
:optode_labels::Vector{String}
: sensors and detector
labels, e.g. [“nirs_int”, “nirs_od”, “nirs_hbo”]:sampling_rate::Int64
The experiment
dictionary contains the following
keys:
:name
:notes
:design
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
::Dict{Symbol, Any}
header::Vector{NeuroAnalyzer.NEURO}
objects::Vector{Symbol}
groupsend
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)
.