AFQ.definitions.utils#

Module Contents#

Classes#

Definition

All Definitions should inherit this.

Functions#

name_from_path(path)

find_file(bids_layout, path, filters, suffix, session, ...)

Helper function

class AFQ.definitions.utils.Definition[source]#

Bases: object

All Definitions should inherit this. For a given subject and session within the API, the definition is used to create a given image or map. Definitions have an init function which the users uses to specify how they want the definition to behave. The find_path function is called by the AFQ API. The api calls find_path to let the definition find relevant files for the given subject and session.

find_path(bids_layout, from_path, subject, session, required=True)[source]#
str_for_toml()[source]#

Uses __init__ in str_for_toml to make string that will instantiate itself. Assumes object will have attributes of same name as __init__ args. This is important for reading/writing definitions as arguments to config files.

AFQ.definitions.utils.name_from_path(path)[source]#
AFQ.definitions.utils.find_file(bids_layout, path, filters, suffix, session, subject, extension='.nii.gz', required=True)[source]#

Helper function Generic calls to get_nearest to find a file