Pyctf: Difference between revisions

From MEG Core
Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''pyctf''' is a Python module that allows access to CTF-format MEG datasets.
'''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.
It contains numerous Python functions and stand alone tools to help automate your data analysis. Parts of it are written in C, compatible with Py2 and Py3.


The latest version (release 20200923) is available here: [https://megcore.nih.gov/MEG/pyctf.tgz pyctf.tgz]
The latest version (released 20200923) is available here: [https://megcore.nih.gov/MEG/pyctf.tgz pyctf.tgz]


See the included INSTALL file for installation instructions.
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 ==


If on biowulf:
#Requires gcc and fftw
module load fftw/3.3.8/openmpi-4.0.1/gcc-9.2.0
module load fftw/3.3.8/openmpi-4.0.1/gcc-9.2.0


#Then follow the instructions in the INSTALL file
Then follow the instructions in the INSTALL file.

== Included Utilities ==

* 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.
=== Utilities included ===


* 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.
* thresholdDetect.py is used to detect changes in ADC or other channels, indicating the onset time of stimuli or other events; typically used to detect button presses in the ADC channels.
: {| width=400 style="border: 1px solid lightgrey;"
| Usage: thresholdDetect.py [options] dataset.ds
|}


* StockwellDs.py creates time-frequency plots using the matplotlib Python module.
* parsemarks is a python script that prints marker information from the MarkerFile.mrk in your .ds dataset directory, and can perform various processing on the marks. Running parsemarks with no arguments produces a detailed usage message.

Latest revision as of 16:48, 23 September 2020

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.

Included Utilities

  • 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.