datman.scan module

A class to make access to all information about a single scan easy and uniform.

WARNING: This class currently assumes the contents of the directories does not change after the object is created. Certain attribute values may become out of date if this is not true.

class datman.scan.DatmanNamed(ident)[source]

Bases: object

A parent class for all classes that will obey the datman naming scheme

Parameters

ident – A datman.scanid.Identifier instance

class datman.scan.Scan(subject_id, config, bids_root=None)[source]

Bases: datman.scan.DatmanNamed

Holds all information for a single scan (session).

Parameters
  • subject_id (str or datman.scanid.Identifier) – A valid datman subject ID.

  • config (datman.config.config) – The config object for the study this session belongs to.

  • bids_root (str, optional) – The root path where bids data is stored. If given, overrides any values from the configuration files.

May raise a ParseException if the given subject_id does not match the datman naming convention

find_files(file_stem, format='nii')[source]
get_resource_dir(session)[source]
get_tagged_nii(tag)[source]
property niftis
class datman.scan.Series(path)[source]

Bases: datman.scan.DatmanNamed

Holds all information about a series file of any format (e.g. nifti).

Parameters

path – The absolute path to a single file.

May raise a ParseException if the given file name does not match the datman naming convention.