modelarrayio.utils.cifti.load_cohort_cifti
- modelarrayio.utils.cifti.load_cohort_cifti(cohort_long, s3_workers)[source]
Load all CIFTI scalar rows from the cohort, optionally in parallel.
The first file is always loaded serially to obtain the reference brain structure axis used for validation. When s3_workers > 1, remaining rows are submitted to a ThreadPoolExecutor and collected via as_completed. Threads share memory so reference_brain_names is accessed directly with no copying overhead.
- Parameters:
cohort_long (
pandas.DataFrame) – Long-format cohort dataframes3_workers (
int) – Number of workers to use for parallel loading
- Returns:
scalars (
dict) – Per-scalar ordered list of 1-D subject arrays, ready for stripe-write.reference_brain_names (
numpy.ndarray) – Brain structure names from the first file, for building greyordinate table.