.. _project-epilepsy: ===================================================================== Epilepsy project: NYUAD collaboration with Cleveland Clinic Abu Dhabi ===================================================================== .. contents:: :local: :depth: 2 Overview ======== MEG protocol for participants with epilepsy on the KIT system. One session records an auditory task, a short artifact block, three visual/motor task runs, and a 60 min sleep recording, with marker-coil (``mrk``) measurements for head position between blocks. All four tasks are existing lab experiments; this page gives the order, the settings to use for this project and the session checklist. Details of each task (stimuli, triggers, saved files) are on its experiment page. .. list-table:: Session protocol :header-rows: 1 :widths: 6 24 30 18 22 * - # - Block - Experiment page - Default length - Recording * - - **mrk-1** - Marker-coil measurement - - Before the first block * - 1 - Auditory: two tones - :doc:`Auditory two tones ` - 2 min 50 s - Run 1, task ``twotones`` * - 2 - Artifacts: tongue / swallow, eye movements, rapid eye blinks - No stimulus (see `Artifact block`_) - about 2 min - Task ``artifacts`` * - - **mrk-2** - Marker-coil measurement - - * - 3 - Motor: cued left/right button presses - :doc:`Cued left/right button press ` - 4 min 42 s - Run 1, task ``buttonlr`` * - 4 - Visual categories: houses vs faces - :doc:`Houses vs faces localizer ` - 2 min 42 s - Run 1, task ``housesvsfaces`` * - 5 - Early visual: checkerboard pattern reversal - :doc:`Flipped squares ` - 2 min 07 s - Run 1, task ``flippedsquares`` * - - **mrk-3**, **mrk-4** - Marker-coil measurements - - Before the sleep block * - 6 - Sleep, 60 min in four 15 min recordings - No stimulus (see `Sleep recording`_) - 4 x 15 min - Task ``sleep``, runs 1-4, one mrk per 15 min The task blocks take about **15 min** of recording in total, plus the pauses between runs (each run is started separately). With the 60 min sleep recording, plan for about 1 h 30 min in the shielded room, plus participant preparation. The first session ran from mrk-1 to the start of sleep in 27 min (see `Session log`_). .. note:: Record each block as its **own MEG file**. The tasks reuse the same KIT trigger channels (224-229) for different events, so a trigger value only has a meaning together with the ``events.tsv`` of that run. Head position (marker coils) ============================ Measure the marker coils (``mrk``) at these points: - **mrk-1** before the first block; - **mrk-2** after the artifact block, before the motor task; - **mrk-3** and **mrk-4** after the checkerboard, before sleep; - **one mrk every 15 min during sleep**, i.e. one per sleep recording. For co-registration, use the mrk measured closest to each recording. If the participant moved during a recording, use the mrk measured **after** the movement (see the note on ``sleep_4`` in the `Session log`_). Photosensitivity ================ Every visual stimulus in this protocol is used with its photosensitivity-safe settings: constant mean luminance, low contrast, small central stimuli, gentle fades and at most 2 luminance changes per second. Text screens fade in and out, the screen fades to black before the window closes, and the Psychtoolbox start-up screens are disabled. .. important:: - In **Flipped squares**, keep **"Participant has (or may have) photosensitive epilepsy"** ticked (the default). The checkerboard is then a small central square (10 deg, about 5 % of the screen). **Never tick "Full-screen checkerboard" in this project.** - Keep the default contrast and rates in every task; the launchers refuse values outside their safety limits. - Set the stimulus PC desktop background on the projector screen to **black**, so opening or closing an experiment window is never a bright step. - Obtain the responsible clinician's approval of the stimuli (*Preview cues*, *Preview stimuli* and *Play test tones* in the launchers) before the first participant, and keep a clinician or trained staff member available during the session. - ESC or Q stops any task immediately; the stimulus is removed and the partial data are saved. Before the session ================== #. Follow the :doc:`operational protocol ` and the :doc:`session checklist `. #. On the stimulus PC, pull the latest code and run the self-test of each task once (no Psychtoolbox or DataPixx needed): .. code-block:: matlab cd experiments/psychtoolbox/auditory_two_tones; main('validate') cd ../button_press_lr; main('validate') cd ../houses_vs_faces; main('validate') cd ../flipped_squares; main('validate') #. Check that KIT trigger channels **224 to 229** all respond, with :github-file:`test_all_meg_channels_triggers.m `. #. Confirm the PROPixx runs at **120 Hz** (production presets refuse any other refresh rate) and that the projector desktop background is black. #. Check that both RESPONSEPixx button boxes respond (left box = left hand, right box = right hand). #. Set the sound level: in the two-tones launcher, use *Play test tones* with the participant in position and confirm the level is comfortable. Keep the Windows volume fixed for the whole session. #. Do a short *Debug* run of any task that changed since the last session. Running the session =================== Start each task from its folder with ``main``. In every launcher: - enter the same **Subject** and **Session** labels for all four tasks; the **Run** number is filled in automatically (run 1 for a new session); - keep the **Production** preset; - check the run length shown in the *Planned run* box, then press the Start button and confirm that the KIT recording is running; - press **SPACE** to start once the participant is ready and fixating. 1. Auditory: two tones ^^^^^^^^^^^^^^^^^^^^^^ :doc:`Auditory two tones ` (``experiments/psychtoolbox/auditory_two_tones``). - Passive listening to two short tones (500 Hz and 1000 Hz, 0.1 s, one every 1.2-1.6 s) while the screen stays static. - Defaults: 120 tones (60 of each): **2 min 50 s**. - Instruct the participant to keep the eyes on the fixation point and simply listen; no response. .. _Artifact block: 2. Artifact block ^^^^^^^^^^^^^^^^^ No stimulus script; the operator gives the instructions over the intercom and notes the clock time of each part. Record it as its own file (task ``artifacts``). These recordings give clean examples of common artifacts for later artifact rejection and ICA. #. **Tongue movements and swallowing**: move the tongue around the mouth for a few seconds, then swallow a few times. #. **Eye movements**: look left, right, up and down a few times, keeping the head still. #. **Rapid eye blinks**: blink quickly several times. Then measure **mrk-2**. 3. Motor: button presses ^^^^^^^^^^^^^^^^^^^^^^^^ :doc:`Cued left/right button press ` (``experiments/psychtoolbox/button_press_lr``). - A small arrow at fixation shows which hand to press with: **left box = left hand, right box = right hand** (any button on the box). - Defaults: 80 cues (40 per hand), cue 0.5 s, response window 1.5 s, one cue every 3-4 s: **4 min 42 s**. - Instruct the participant to keep both hands resting on the boxes, look at the centre and press quickly with the indicated hand. 4. Visual categories: houses vs faces ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :doc:`Houses vs faces localizer ` (``experiments/psychtoolbox/houses_vs_faces``). - Passive viewing of 20 faces and 20 houses, each shown for 1 s (with a 0.25 s fade in and out), then 1 s of black with a fixation cross. - Defaults: 2 passes, 80 images (40 faces, 40 houses): **2 min 42 s**. - Instruct the participant to look at the centre of the screen; no response. 5. Early visual: checkerboard ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :doc:`Flipped squares ` (``experiments/psychtoolbox/flipped_squares``). - In the **Participant** box, leave the epilepsy box **ticked** and the full-screen box unticked (see `Photosensitivity`_). - After 2 s of grey, a small low-contrast checkerboard fades in over 1 s, reverses polarity twice per second, then fades out. - Defaults: 240 reversals: **2 min 07 s**. - Instruct the participant to keep the eyes on the red dot; no response. Sleep recording =============== Block 6: 60 min without stimulation, after mrk-3 and mrk-4, recorded as **four 15 min recordings** (``sleep_1`` to ``sleep_4``) with one marker-coil measurement every 15 min. #. Close all experiment windows; leave the projector screen black (or turn the projector off) so no light reaches the participant. #. Dim the lights in the shielded room and make the participant comfortable for sleep. Tell them that they may fall asleep and that no task follows. #. Start ``sleep_1`` and note the start time on the session sheet. #. Every 15 min: stop the recording, measure the marker coils, start the next sleep recording, and note the times. #. Monitor the participant on the camera and intercom throughout, and note any event (movement, waking, talking, staff entering) with its clock time and the time into the recording. No triggers are sent during sleep, so the session sheet is the only record of these events. Data ==== Stimulus PC ^^^^^^^^^^^ Each task writes BIDS files on the stimulus PC, below its own folder (``data/`` for production runs). For subject P01, session 01: .. code-block:: text experiments/psychtoolbox//data/ sub-P01/ses-01/meg/sub-P01_ses-01_task-_run-01_events.tsv/.json sub-P01/ses-01/beh/sub-P01_ses-01_task-_run-01_beh.tsv sourcedata/sub-P01/ses-01/beh/... (snapshot, console log) with ```` = ``twotones``, ``buttonlr``, ``housesvsfaces`` or ``flippedsquares``. The KIT recordings (``.con``) and marker files (``.mrk``) come from the acquisition PC. Project dataset ^^^^^^^^^^^^^^^ The project dataset is a BIDS dataset named ``epilepsy-project`` on NYU Box, below the folder given by the ``MEG_DATA`` environment variable (see the lab's :doc:`data storage conventions `). One session per participant contains these recordings: .. list-table:: :header-rows: 1 :widths: 30 25 45 * - BIDS task - Runs - Events * - ``twotones`` - ``run-01`` - ``events.tsv``/``.json`` from the stimulus PC * - ``artifacts`` - ``run-01`` - none (times on the session sheet) * - ``buttonlr`` - ``run-01`` - ``events.tsv``/``.json`` from the stimulus PC * - ``housesvsfaces`` - ``run-01`` - ``events.tsv``/``.json`` from the stimulus PC * - ``flippedsquares`` - ``run-01`` - ``events.tsv``/``.json`` from the stimulus PC * - ``sleep`` - ``run-01`` to ``run-04`` - none (times and events on the session sheet) - Use the same ``sub``, ``ses``, ``task`` and ``run`` labels for each converted KIT recording and its ``events.tsv``/``.json``, which go next to it in the BIDS ``meg/`` folder. The stimulus PC leaves ``onset`` and ``sample`` empty; they are filled from the recorded triggers. - Record which marker measurement belongs to each recording in the session's ``sub-_ses-_scans.tsv`` (columns ``marker_before`` and ``marker_after``); the pipeline's KIT-to-FIF conversion uses this pairing. For ``sleep`` run-04 use the final mrk (see `Session log`_). - The four tasks reuse KIT codes 224-229 for different events (224 is ``tone_low`` in ``twotones``, ``cue_left`` in ``buttonlr`` and ``reversal_to_a`` in ``flippedsquares``). Always read a code together with its run's ``events.json``. Processing ^^^^^^^^^^ The data are processed with the lab's KIT general MNE pipeline (see the :doc:`pipeline overview `) using the project configuration :github-file:`epilepsy_project_config.yml `: - the stimulus tasks go through bad-channel detection, ICA, filtering, events, epochs, source estimates and dipole fits (auditory N100m, pattern reversal P100m, faces/houses, motor fields of each hand); - no EOG channel is recorded, so the ``artifacts`` recording is the reference for what eye, blink, tongue and swallow components look like in this participant during ICA review; - the ``sleep`` runs get spectra and band power over time (delta to beta). Processing of the project data in BESA Research is described on the :doc:`BESA epilepsy pipeline ` page. Per-session record ================== Record on the session sheet: - subject and session labels, date, staff present; - clinician approval reference and who was on call; - clock time of every mrk measurement; - for each block: KIT file name, start and end clock times, run number, anything unusual (ESC pressed, participant moved, sound level changed); - sound level setting used for the two-tones block; - for each sleep recording: start/end times, observed events with their time into the recording, and which mrk to use for co-registration. Session log =========== First session (fill in subject, session and date): .. list-table:: :header-rows: 1 :widths: 15 40 45 * - Time - Block - Notes * - 4:58 - **mrk-1** - * - 5:02 - Auditory: two tones - * - 5:04 - Artifacts: tongue / swallow, then eye movements, then rapid eye blinks - Time noted at the rapid eye blinks. * - 5:06 - **mrk-2** - * - 5:11 - Motor: button presses - * - 5:18 - Houses vs faces - * - 5:21 - Checkerboard - * - 5:22 - **mrk-3** - * - 5:25 - **mrk-4** - * - after 5:25 - Sleep, 60 min (``sleep_1`` to ``sleep_4``) - One mrk every 15 min. ``sleep_4``: sudden movement at about 230 s; co-register ``sleep_4`` with the **final mrk** (measured after it). .. warning:: Still to complete for this project: principal investigator, ethics approval number, inclusion/exclusion criteria, the clinical contact and the procedure if a seizure occurs during the session. Data analysis ============= The American Clinical Magnetoencephalography Society (ACMEGS) *Clinical Practice Guideline 1: Recording and Analysis of Spontaneous Cerebral Activity* provides a set of recommendations and obligations followed in the US when acquiring data from participants with epilepsy. It has been used as a basis for this project. Filtering ^^^^^^^^^ We follow the recommendation of the ACMEGS and apply a high-pass filter at 1 Hz and a low-pass filter at 40 Hz. Epileptic Activity ^^^^^^^^^^^^^^^^^^ While this project is intended for research only, epileptic activity may appear in the MEG recording, as a change of rhythms or as IEDs (Interictal Epileptiform Discharges). Today, IEDs are the main form of abnormal activity used to localize the epileptic focus of the seizures, although slow-wave and fast-wave activity are also being investigated for source localization of the focus. If a seizure happens during an MEG scan (an ictal MEG scan), the onset of the seizure can be used to localize the focus of the epilepsy. Since a seizure can spread quickly to other areas of the brain, only the beginning of the seizure activity is relevant for localizing the focus. The localization technique applied to the ictal onset should be chosen carefully, as it is not the same as for interictal spikes. Interictal spikes, which can be measured by MEG, are also used to localize the focus of the epilepsy. They are averaged together to achieve a higher SNR, and then localized. IEDs comprise both spikes and sharp waves: - spikes typically last 20-70 ms - sharp waves last 70-200 ms Both are equally significant according to the ACMEGS. Different qualitative properties of the IEDs should be reported, including: - morphology: how sharp the peak, the rising phase and the descent are - localization: whether all the spikes are localized in the same area, and how dispersed their locations are - temporal characteristics: rise time to peak, descent time, and so on Knowing an estimate of the background noise is important. PCA and ICA can be used to estimate the number of sources contributing to the part of the signal that is not noise. Head Shape model ^^^^^^^^^^^^^^^^ In the current pipeline, we are using a BEM model and not a spherical head model, as advised by the ACMEGS. Choice of the time points for source analysis and focus localization ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - For the source analysis of the IEDs, time points are picked from the rising part of the spike, or from its peak. - The peak offers a high SNR, which means fewer source computation errors. However, it might not be the best indicator of the focus: because the spike started earlier, the activity might have propagated away from its actual origin during the short rise time. - To assess whether the peak is stable enough to be source localized, it is advisable to pick points on the rise, localize them and check for a field rotation. If a rotation is evident, the peak might not be stable; otherwise, we can assume that the peak is stable enough. Source localization method: Single Equivalent Current Dipoles (ECD) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ECDs are the accepted method for the source localization of IEDs. To assess the number of ECDs needed to fit the data, it is important to look at the isofield lines, which give an idea of the number of dipoles and of their spatial distribution. The maps look different depending on the sensor type of the MEG system. If the isofield lines show a single dipole-like field, fitting a single dipole is probably the best way to go. If the field looks more complex, more than one dipole may be needed. For a single spike, it is important not to rely on the result from a single time point, even if the isofield lines look like a single-dipole field. Several time points should be picked to check that the isofield lines only decrease or increase in amplitude, without rotating or changing shape. If this is the case, the source is stable; if not, there is less confidence in the localization. If a rotation is observed during a single spike, the source might be propagating. .. TODO: add a section on MEG biomarkers for epilepsy. Open points ^^^^^^^^^^^ - Note-taking synchronised with the MEG data recording: the person acquiring the data should be able to take notes in real time, in sync with the recording. - What is a good goodness of fit (GOF) when fitting dipoles to spikes?