AFQ.definitions.scalar

Module Contents

Classes

ScalarFile

Define a scalar based on a file for each subject.

TemplateScalar

Define a scalar based on a template.

class AFQ.definitions.scalar.ScalarFile(name, path=None, suffix=None, filters={})[source]

Bases: AFQ.definitions.mask.MaskFile

Define a scalar based on a file for each subject. Assumes the scalar is already in subject space.

Parameters
namestr

name of the scalar.

pathstr, optional

path to file to get scalar from. Use this or suffix. Default: None

suffixstr, optional

suffix to pass to bids_layout.get() to identify the file. Default: None

filtersstr, optional

Additional filters to pass to bids_layout.get() to identify the file. Default: {}

Examples

my_scalar = ScalarFile(

“my_scalar”, suffix=”scalarSuffix”, filters={“scope”: “dmriprep”})

api.GroupAFQ(scalars=[“dti_fa”, “dti_md”, my_scalar])

get_data(self, subses_dict, bids_info, dwi_affine, reg_template, mapping)[source]
class AFQ.definitions.scalar.TemplateScalar(name, path)[source]

Bases: ScalarMixin, AFQ.definitions.utils.Definition

Define a scalar based on a template. This template will be transformed into subject space before use.

Parameters
namestr

name of the scalar.

pathstr

path to the template.

Examples

my_scalar = TemplateScalar(

“my_scalar”, “path/to/my_scalar_in_MNI.nii.gz”)

api.GroupAFQ(scalars=[“dti_fa”, “dti_md”, my_scalar])

find_path(self, bids_layout, from_path, subject, session)[source]
get_data(self, subses_dict, bids_info, dwi_affine, reg_template, mapping)[source]