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, suffix, 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.

suffixstr

suffix to pass to bids_layout.get() to identify the file.

filtersstr

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

Examples

my_scalar = ScalarFile(

“my_scalar”, “scalarSuffix”, {“scope”: “dmriprep”})

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

get_data(self, subses_dict, 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.AFQ(scalars=[“dti_fa”, “dti_md”, my_scalar])

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