Macquarie-MEG-Research / natural_conversations

Data analysis for the natural conversations study
0 stars 2 forks source link

ENH: Simplify AEF and fix timing of localiser #5

Closed larsoner closed 10 months ago

larsoner commented 10 months ago
  1. Use utils.triggerCorrection on MEG data to correct auditory timing
  2. Simplify AEF demo code using BIDS-ified data
  3. Use "conversation" as the BIDS task for localizer (with block=06) so MNE-BIDS-Pipeline will process it (hack but works)
  4. Add dummy events to conversations so MNE-BIDS-Pipeline will process them (another hack but it works)

Resulting simple_AEF_AEP.py figure:

Screenshot from 2024-01-17 10-47-29

And resulting MBP HTML report (have to zip it to upload it to GH):

sub-01_task-conversation_report.zip

You can see the auditory response looks bad because almost all epochs were dropped because of CP1. So next steps I think:

  1. Add some bad channel marking to bidsify.py, probably based on autoreject or flat/large channel detection or (in a worst case) manual inspection of datasets. CP1 is almost certainly bad for subject 1 for example based on the drop log.
  2. Add the conversation turns, probably via 1-second annotations (easily reconstructed into contiguous segments if desired) or similar so we can run a simple CSP classifier on them.
  3. Take care of MNE-BIDS-Pipeline issues about 1) using TSPCA and/or reference regression, and 2) saving fully preprocessed raw data in addition to epochs data.

@JD-Zhu feel free to look at the diff and see if you think things here make sense. We can discuss later today!