aslprep.utils.bids module

Utilities to handle BIDS inputs.

collect_data(layout, participant_label, bids_filters=None)[source]

Use pybids to retrieve the input data for a given participant.

collect_derivatives(derivatives_dir: Path, entities: dict, fieldmap_id: str | None, spec: dict | None = None, patterns: List[str] | None = None)[source]

Gather existing derivatives and compose a cache.

collect_run_data(layout, asl_file)[source]

Use pybids to retrieve the input data for a given participant.

find_atlas_entities(filename)[source]

Extract atlas entities from filename.

validate_input_dir(exec_env, bids_dir, participant_label)[source]

Validate input directory.

This function checks necessary validator requirements, but skips ones that should not influence the pipeline.

write_bidsignore(deriv_dir)[source]

Write .bidsignore file.

write_derivative_description(bids_dir, deriv_dir)[source]

Write derivative dataset_description file.