mutable struct NEURO
header::NeuroAnalyzer.HEADER
history::Vector{String}
markers::DataFrame
locs::DataFrame
time_pts::Vector{Float64}
epoch_time::Vector{Float64}
data::Array{<:Number, 3}
endNeuroAnalyzer.NEURO
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).
history contains the list of operations.
markers are event markers.
locs are channel (electrode/gradiometers/magnetometers/optode) locations.
time_pts is a vector of time points (in seconds) for the whole signal.
epoch_time is a vector of time points (in seconds) for a single epoch.
data must have at least one channel and one epoch.
Header
The NeuroAnalyzer.NEURO object contains a header with the following meta-data:
mutable struct HEADER
subject::Dict
recording::Dict
experiment::Dict
endMeta-data
The subject dictionary contains the following keys:
:id::String:first_name::String:middle_name::String:last_name::String:handedness::String:head_circumference::Real:weight::Real:height::Real
For EEG/sEEG/ECOG 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”, “BDF”, “BDF+”, “BrainVision” or “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. “AVG”:label::Vector{String}: e.g. [“Fp1”, “Fp2”]:transducers:unit::Vector{String}: e.g. [“uV”]:prefiltering::Vector{String}:line_frequency::Int64: power line frequency (50 or 60 Hz), default is 50 Hz:sampling_rate::Int64:gain::Vector{Float64}:bad_channel::Vector{Bool}:channel_order::Vector{Int64}: logical order of channels, i.e. sorted by types:epoch_id::String
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:label::Vector{String}: e.g. [“MEG1”, “MEG2”]:unit::Vector{String}: e.g. [“fT”]:prefiltering::Vector{String}:line_frequency::Int64: power line frequency (50 or 60 Hz), default is 50 Hz: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}:bad_channel::Vector{Bool}:channel_order::Vector{Int64}: logical order of channels, i.e. sorted by types:ssp_labels::Vector{String}: name of SSP projections:ssp_channels::Vector{Bool}: channels for which SSP projections are calculated:ssp_data::Matrix{Float64}: SSP data:epoch_id::String
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 fornirs_intandnirs_odchannels:channel_pairs::Matrix{Int64}: matrix of source-detector pairs:channel_type::Vector{String}:label::Vector{String}: channel labels (sensor_detector wavelength), e.g. [“S1_D1 780”]:unit::Vector{String}:optode_labels::Vector{String}: sensors and detector labels, e.g. [“nirs_int”, “nirs_od”, “nirs_hbo”]:sampling_rate::Int64:bad_channel::Vector{Bool}:channel_order::Vector{Int64}: logical order of channels, i.e. sorted by types:epoch_id::String
For MEP objects, the recording dictionary contains the following keys:
:data_type::String: “mep”:file_name::String:file_size_mb::Real:file_type::String:recording::String:recording_date::String:recording_time::String:recording_notes::String:channel_type::Vector{String}:channel_order::Vector{Int64}:label::Vector{String}:unit::Vector{String}:sampling_rate::Int64:stimulation_intensity::Vector{Int64}:coil_type::Vector{String}:stimulation_sample::Vector{Int64}:markers_pos::Vector{Int64}:markers_neg::Vector{Int64}:bad_channels::Vector{Bool}
For EDA objects, the recording dictionary contains the following keys:
:data_type::String: “eda”:file_name::String:file_size_mb::Real:file_type::String:recording::String:recording_date::String:recording_time::String:recording_notes::String:channel_type::Vector{String}:channel_order::Vector{Int64}:label::Vector{String}:unit::Vector{String}:prefiltering::Vector{String}:sampling_rate::Int64:bad_channels::Vector{Bool}
For SENSORS objects, the recording dictionary contains the following keys:
:data_type::String: “sensors”:file_name::String:file_size_mb::Float64:file_type::String: “CSV”:recording::String: e.g. equipment name:recording_date::String:recording_time::String:recording_notes::String:channel_type::Vector{String}:label::Vector{String}: signal labels, e.g. [“MEP1”]:unit::Vector{String}:prefiltering::Vector{String}:sampling_rate::Int64:bad_channel::Vector{Bool}:channel_order::Vector{Int64}: logical order of channels, i.e. sorted by types:epoch_id::String
The experiment dictionary contains the following keys:
:name:notes:design
Event markers
Event markers is a DataFrame with the following columns:
:id: id of the event, typeString:start: event start point in seconds, typeFloat64:length: event length in seconds, typeFloat64:value: event value, typeString:channel: event channel, default is 0 (all channels)
Data
All computations are performed using the double-precision 64-bit floating point format. NeuroAnalyzer data is stored using standard Julia Array and can be easily exported as DataFrame. Thus, external processing of those data using Julia packages is readily available.
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.
In the NeuroAnalyzer.NEURO channels are stored in the original sequence (physical order); for plotting channels are grouped by their types (logical order); the logical order is stored in :channel_order field of the object header.
Functions
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).
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="Fp1") instead of my_eeg = delete_channel(my_eeg, ch="Fp1").
Functions operating on individual channels accept channels by their names (labels), e.g. ch="C4". Multiple channels may be given, e.g. ch=["Fp1", "Fp2"]; ch="all" returns all channels in the object. Additionally, channels may be provided by their type, e.g. ch="eeg" or ch=["eeg", "eog"].