- Load the data and select EEG channels only (in microvolts)
- Basic filtering
- Remove bad channels
- Run ICA for ECG component removal
- Reference to A1 and A2
- Save the dataset with ECG put back to this
- Identify R peaks and add those points as a STIM channel
- Go through the detected R peaks and create a data cleaning report
- Epoch the data based on R peaks and have metadata saved based on sleep stages
- Reject criteria for amplitude and flatness
- Keep a summary of rejected epochs/channels
- Write the epochs count per subject per sleep stage
- Pickle the averaged HEPs
- Comparison against surrogates
- Condition and Group comparison
- Save the results figures for each channels and create topomaps
- Get the ECG channels and run Neurokit2 on it
- Figure out continuous streaks of sleep stages (from the raw hypnogram file)
- Create a csv sheet based on start and end of long streaks of sleep stages for ECG data
- Pick 3 foundational papers on HEP
- Pick 3 on HEP and meditation
- Pick 3 on HEP and sleep
- Understand the psi paper