Backend scripts that export headers that will be used by the XNAT edf-fif-et importer plugin.
The scripts have to be installed on the XNAT server such that they are available in the PATH
of the XNAT user. The edf-fif-et-importer plugin installed on XNAT uses these scripts for extracting header information for the additional data types of MEEG (FIF files), ECOG (EDF Files) and Eye Tracking (ASC and CSV files produced by EYELINK and TOBII eye trackers).
For a fresh setup the below instructions may be followed,
- Connect to the xnat server (via ssh) and switch to the xnat user.
- Setup a working python environment with mne-python installed following the instructions provided here. Ensure that the environment is correctly activated.
- Make the scripts executable with
chmod +x et_importer.py
andchmod +x get_meg_ecog_headers.py
. - Move them to
~/.local/bin
direectory and ensure that this directory is added to the PATH by adding this linePATH="$HOME/.local/bin:$PATH"
to the.bashrc
file. - Test them locally to check if properties files are being correctly generated. See below for more details.
Scripts to extract header information from raw ET/MEEG/ECOG data and make them available to XNAT.
The scripts here will identify and parse out relevant headers to be modeled on XNAT. Mostly BIDS fields are chosen where available. While MEG/EDF headers are relatively standard, both raw file formats headers fields for eye tracking data vary significantly across devices. Here we use Eyelink data converted to asc files and and Tobii eye tracker data converted to csv.
Note: The scripts may have to be modified based on the headers of interest.
Requires mne-python package.
pip install mne
- Install mne
- Run get_et_meg_ecog_headers.py -f <file_name> -x
- Should generate properties
*.prop
file with given header values.
mpg:isAnon=True
bids:samplingFrequency=1000.0
bids:powerLineFrequency=50.0
bids:dewarPosition=68.0
bids:softwareFilters_default_highpass=0.10000000149011612
bids:softwareFilters_default_lowpass=330.0
bids:digitizedLandmarks=True
bids:digitizedHeadPoints=True
bids:megChannelCount=306
bids:recordingDuration=866.0
bids:numberOfChannels=341
bids:megCoordinateSystem=ElektaNeuromag
mpg:isAnon=True
bids:samplingFrequency=1024.0
bids:numberOfChannels=144
bids:hardwareFilters_HighpassFilter_CutoffFrequency=[0.0]
bids:hardwareFilters_LowpassFilter_CutoffFrequency=[512.0]
bids:recordingDuration=938.0
mpg:isAnon=True
bids:Manufacturer=EYELINK
bids:SamplingFrequency=1000
mpg:DistanceToScreen=140.0 cms
mpg:ScreenSize=39.0 22.0 cms
mpg:RecordedEye=Both
- ET: Eye Tracking
- MEG: Magnetoencephalography
- ECOG: Electrocorticography
- FIF: Functional Imaging Format (MEG files are stored this way)
- EDF: European Data Format (ECOG files are stored this way)
Names of the import handlers for the additional datatypes for XNAT REST calls via /data/services/import
- MEG/EEG and ECOG and EyeTracker respectively.
This project was made possible through the support of a grant from Templeton World Charity Foundation, Inc. The tool has been developed as a part of the ARC-COGITATE project.