modelarrayio.cli.to_modelarray.to_modelarray
- modelarrayio.cli.to_modelarray.to_modelarray(cohort_file, backend='hdf5', output=PosixPath('modelarray.h5'), storage_dtype='float32', compression='gzip', compression_level=4, shuffle=True, chunk_voxels=0, target_chunk_mb=2.0, workers=1, s3_workers=1, scalar_columns=None, group_mask_file=None, index_file=None, directions_file=None)[source]
Load neuroimaging data and write to an HDF5 or TileDB modelarray file.
The modality (NIfTI, CIFTI, or MIF/fixel) is autodetected from the source file extensions listed in the cohort file.
- Parameters:
cohort_file (path-like) – Path to a CSV with demographic info and paths to data.
group_mask_file (path-like, optional) – Path to a NIfTI binary group mask file. Required for NIfTI data.
index_file (path-like, optional) – Nifti2 index file. Required for MIF/fixel data.
directions_file (path-like, optional) – Nifti2 directions file. Required for MIF/fixel data.