Initialize NeuroAnalyzer
using NeuroAnalyzer
eeg = load("files/eeg.hdf")using NeuroAnalyzer
eeg = load("files/eeg.hdf")In NeuroAnalyzer, you can apply any formula, operation, or function to EEG channels using the apply() function. This is useful for:
The apply() function applies a formula to specified EEG channels. The formula is written as a string and can include:
(obj .- mean(obj)) ./ std(obj)).Key Points
Computing the average of Fp1 and Fp2 to create a virtual frontal channel:
result = apply(eeg,
f = "mean(obj, dims=1)",
ch = ["Fp1", "Fp2"])eeg: The EEG dataset (as an OBJ object).
f: The formula to apply (as a string).
obj: The obligatory variable name that holds the NEURO object.
ch: List of channels to apply the formula to.
Computing the global average of all channels:
result = apply(eeg,
f = "mean(obj, dims=1)",
ch = "all")Finding the maximum value across central channels (C3, Cz, C4):
result = apply(eeg,
f = "maximum(obj, dims=1)",
ch = ["C3", "Cz", "C4"])