modelarrayio.cli.cifti_to_h5.cifti_to_h5
- modelarrayio.cli.cifti_to_h5.cifti_to_h5(cohort_long, backend='hdf5', output=PosixPath('greyordinatearray.h5'), storage_dtype='float32', compression='gzip', compression_level=4, shuffle=True, chunk_voxels=0, target_chunk_mb=2.0, workers=1, s3_workers=1, split_outputs=False)[source]
Load all CIFTI data and write to an HDF5 or TileDB file.
- Parameters:
cohort_long (
pandas.DataFrame) – Normalised long-format cohort dataframe (fromload_and_normalize_cohort()).backend (
str) – Backend to use for storage ('hdf5'or'tiledb')output (
pathlib.Path) – Output path. For the hdf5 backend, path to an .h5 file; for the tiledb backend, path to a .tdb directory.storage_dtype (
str) – Floating type to store valuescompression (
str) – Compression filter.gzipworks for both backends;lzfis HDF5-only;zstdis TileDB-only.compression_level (
int) – Compression level (codec-dependent)shuffle (
bool) – Enable shuffle filterchunk_voxels (
int) – Chunk/tile size along the greyordinate axis (0 = auto)target_chunk_mb (
float) – Target chunk/tile size in MiB when auto-computing the spatial axis lengthworkers (
int) – Maximum number of parallel TileDB write workers. Default 1. Has no effect whenbackend='hdf5'.s3_workers (
int) – Number of workers for parallel S3 downloadssplit_outputs (
bool) – If True, write one output file per scalar. Default False.
- Returns:
status – 0 if successful, 1 if failed.
- Return type:
int