simulate_bids_dataset#
- neurocaps.utils.simulate_bids_dataset(n_subs=1, n_runs=1, n_volumes=100, task_name='rest', output_dir=None, n_cores=None, progress_bar=False)[source]#
Generate a Simulated BIDS Dataset with fMRIPrep Derivatives.
- Creates a minimal BIDS dataset structure with fMRIPrep derivatives, including:
BIDS root directory with only dataset description JSON file
- Derivatives folder with fMRIPrep outputs:
Dataset description JSON file
One simulated NIfTI image per subject/run
One confounds TSV file per subject/run
Note
Returns
output_dirif the path exists.Added in version 0.34.1.
- Parameters:
n_subs (
int, default=1) – Number of subjects.n_runs (
int, default=1) – Number of runs for each subject.n_volumes (
int, default=100) – Number of volumes for the NIfTI images.task_name (
str, default=”rest”) – Name of task.output_dir (
strorNone, default=None) –Path to save the simulated BIDS directory to.
Important
If None, a directory named “simulated_bids_dir” will be created in the current working directory.
n_cores (
intorNone, default=None) –The number of cores to use for multiprocessing with Joblib (over subjects). The “loky” backend is used.
Added in version 0.34.3.
progress_bar (
bool, default=False) –If True, displays a progress bar.
Added in version 0.34.3.
- Returns:
str – Root of the simulated BIDS directory.