modelarrayio.utils.misc

Miscellaneous utility functions.

Functions

build_scalar_sources(long_df)

Build a dictionary of scalar sources from a long dataframe.

cohort_to_long_dataframe(cohort_df[, ...])

Convert a wide-format cohort dataframe to a long-format dataframe.

detect_modality_from_path(path)

Return 'cifti', 'mif', or 'nifti' based on file extension.

load_and_normalize_cohort(cohort_file[, ...])

Load a cohort CSV, normalise it, and detect the neuroimaging modality.