pyctf is a Python module that allows access to CTF MEG datasets. It contains numerous Python functions and stand-alone utilities to help automate your data analysis. Parts of it are written in C, compatible with Py2 and Py3.
The latest version (released 20200923) is available here: pyctf.tgz
See the included INSTALL file for installation instructions.
Pyctf requires FFTW, GSL, Numpy, and the usual build tools/headers for C and Python. Some utilities also require Pandas, or matplotlib.
Installing on biowulf.nih.gov
module load fftw/3.3.8/openmpi-4.0.1/gcc-9.2.0
Then follow the instructions in the INSTALL file.
- addMarker.py is a Python implementation of the CTF addMarker tool. It adds named marks (stored in the MarkerFile.mrk file inside the dataset folder) from a text file. This version only implements the "-p file" functionality of CTF's addMarker.
- delMarker.py deletes a named mark from a dataset.
- thresholdDetect.py is a Python implementation of the CTF thresholdDetect tool. It is used to detect changes in the ADCs or other channels, and will create marks indicating the time of stimuli or other events such as button presses.
- parsemarks is a Python script that prints marker information from the MarkerFile.mrk file in a dataset, and can perform various processing on the marks.
- fiddist.py and fiddist2.py are used during manual placement of fiducial marks (or tags) in an AFNI format MRI image (.BRIK format). It calculates the interfiducial distances between the Nasion, LPA, and RPA locations. It can operate on both AFNI tags or the fiducial locations recorded with the MEG data, with the goal of making these numbers match. fiddist2.py additionally computes the differences between the MRI and MEG fiducials.
- StockwellDs.py creates time-frequency plots using the matplotlib Python module.