Skip to content

De-Identifying EDF Headers

Flagged for merging

The October 2026 audit recommends merging this page with a sibling (see AUDIT.md). The content stands until then.

What this page tells you

Move the Mxene and Clinical EDF files into cnt-fs, copy an ieeg-dataset.ini channel map, run anonymize_edf.sh on cnt1 to strip patient name and ID, then upload both deid folders to ieeg.org with the ieeg CLI and verify.

  1. move EDF file into cnt-fs
  2. use Remote Desktop to export Mxene edf file and the clinical edf file from the day you did testing

    • place Mxene edf file into /mnt/cnt-fs/eeg_raw/Mxene_project/RIDXXX/RIXXX_Mxene
    • place Clinical edf file into /mnt/cnt-fs/eeg_raw/Mxene_project/RIDXXXX/RIDXXXX_Clinical
  3. create the ieeg-dataset.ini channel mapping file

    • you can just copy and paste the channel mapping file from a previous subject (Mxene vs Clinical be different)
    • leave the name as it is and channels as they are
      • ieeg-dataset.ini
  4. de-identify EDF file

    1. Open Mobaxterm, and in cnt1, navigate to: cd /project/eeg_process/programs/edf_headers
    2. run: bash anonymize_edf.sh -n NAME -i ID -d DIRECTORY_INPUT -o DIRECTORY_OUTPUT
      1. this will create a new EDF file with anonymized headers
        • file will be named "original_filename"_deid.edf
        • options
          • -n: removes the patient name from the header and replaces with a new name specified here. I recommend inputting deid
          • -i: removes the patient ID from the header and replaces with a new ID specified here. I recommend inputting deid
          • -d: the path to the source directory where the EDF is stored
            ex: /mnt/cnt-fs/eeg_raw/Mxene_project/RIDXXX/RIDXXX_Mxene
          • -o: the path to the output directory where the deid EDF will be stored.
            ex: /mnt/cnt-fs/eeg_raw/Mxene_project/RIDXXXX/RIDXXXX_Mxene
      • The -n, -i, -d, and -o are mandatory. It will error if any of these are missing
  5. upload the deid edf folder to ieeg.org

  6. make sure the "original_filename"_deid.edf file and the ieeg-dataset.ini channel mapping file are both in the cnt-fs/eeg_raw/Mxene_project/RIDXXX/deid directory, and no other files are in there

  7. in cnt1, navigate to: cd /project/eeg_process/programs/ieeg-cli.1.14.60
  8. first upload the Mxene EDF with this code:
    ./ieeg upload-directory -n 'Human_Data/Hospital of the University of Pennsylvania/Mxene_Electrode/RIDXXXX_Mxene' '/mnt/cnt-fs/eeg_raw/Mxene_project/RIDXXX/RIDXXX_Mxene/'

  9. then upload the Clinical EDF with this code:
    ./ieeg upload-directory -n 'Human_Data/Hospital of the University of Pennsylvania/Mxene_Electrode/RIDXXXX_Clinical' '/mnt/cnt-fs/eeg_raw/Mxene_project/RIDXXXX/RIDXXXX_Clinical'

  10. check ieeg.org and verify the EDF looks good