Before setting up the environment, ensure you have mamba installed.
Run the following command to create the environment using mamba:
mamba env create -f environment.yml
This will create a new environment with all required dependencies as specified in environment.yml.
After the installation completes, activate the environment:
mamba activate aj-preprocessing
If new dependencies are added to environment.yml, update your environment with:
mamba env update -f environment.yml
We can run the preprocessing script from the root directory as a module:
python -m preprocessing --sub <subject>
By default, it will not show you warnings unless you add the --verbose argument.
The preprocessed data is then saved to preprocessed_eeg_{test,train}_flat.npy.
In this stage, we concatenate all the raw edf files for each block, filter out oddball trials, and then throw the data into mne.Epoch to get epoched data. After this stage, we already get a numpy array of desired shape (trials, channels, times).
The next stage is whitening the data, we throw the epoched training data, for each image condition, we compute the covariance of the channels for each timestamp, and then take the average. Then we take the average of all the average covariance matrix for each image condition, to obtain this average of average covariance matrix