fsl.data.melodicanalysis

This module provides a set of functions for accessing the contents of a MELODIC analysis directory. These functions are primarily intended to be used by the MELODICImage class, but are available for other uses. The following functions are provided:

isMelodicImage

Returns True if the given path looks like it is a melodic component image file, False otherwise.

isMelodicDir

Returns True if the given path looks like it is a MELODIC directory, False otherwise.

getAnalysisDir

If the given path is contained within a MELODIC directory, the path to that MELODIC directory is returned.

getTopLevelAnalysisDir

If the given path is contained within a hierarchy of FEAT or MELODIC directories, the path to the highest-level (i.e. the shallowest in the file system) directory is returned.

getDataFile

If the given melodic directory is contained within another analysis directory, the path to the data file is returned.

getICFile

Returns the path to the melodic IC image.

getMixFile

Returns the path to the melodic mix file.

getFTMixFile

Returns the path to the melodic FT mix file.

getNumComponents

Returns the number of components generated in the melodic analysis contained in the given directrory.

getComponentTimeSeries

Returns a numpy array containing the melodic mix for the given directory.

getComponentPowerSpectra

Returns a numpy array containing the melodic FT mix for the given directory.

fsl.data.melodicanalysis.isMelodicImage(path)[source]

Returns True if the given path looks like it is a melodic component image file, False otherwise.

fsl.data.melodicanalysis.isMelodicDir(path)[source]

Returns True if the given path looks like it is a MELODIC directory, False otherwise. A MELODIC directory:

  • Must contain a file called melodic_IC.nii.gz or melodic_oIC.nii.gz.

  • Must contain a file called melodic_mix.

  • Must contain a file called melodic_FTmix.

fsl.data.melodicanalysis.getAnalysisDir(path)[source]

If the given path is contained within a MELODIC directory, the path to that MELODIC directory is returned. Otherwise, None is returned.

fsl.data.melodicanalysis.getTopLevelAnalysisDir(path)[source]

If the given path is contained within a hierarchy of FEAT or MELODIC directories, the path to the highest-level (i.e. the shallowest in the file system) directory is returned. Otherwise, None is returned.

See featanalysis.getTopLevelAnalysisDir().

fsl.data.melodicanalysis.getDataFile(meldir)[source]

If the given melodic directory is contained within another analysis directory, the path to the data file is returned. Otherwise None is returned.

fsl.data.melodicanalysis.getMeanFile(meldir)[source]

Return a path to the mean image of the meloidic input data.

fsl.data.melodicanalysis.getICFile(meldir)[source]

Returns the path to the melodic IC image.

fsl.data.melodicanalysis.getMixFile(meldir)[source]

Returns the path to the melodic mix file.

fsl.data.melodicanalysis.getFTMixFile(meldir)[source]

Returns the path to the melodic FT mix file.

fsl.data.melodicanalysis.getReportFile(meldir)[source]

Returns the path to the MELODIC report index file, or None if there is no report.

fsl.data.melodicanalysis.getNumComponents(meldir)[source]

Returns the number of components generated in the melodic analysis contained in the given directrory.

fsl.data.melodicanalysis.getComponentTimeSeries(meldir)[source]

Returns a numpy array containing the melodic mix for the given directory.

fsl.data.melodicanalysis.getComponentPowerSpectra(meldir)[source]

Returns a numpy array containing the melodic FT mix for the given directory.