Bruker import functions#
Import ParaVision images, raw acquisitions, geometry and model observables. Study import warns and skips incomplete or unsupported experiments while retaining valid experiments. Import and numerical reconstruction are separate operations. See Bruker import and Importer architecture for definitions and options.
- mrax.io.import_bruker_experiment(exp_dir: Path, override_type: str | None = None, model_map_by_type: Dict[str, Model | Callable[[], Model]] | None = None, model_map_by_name: Dict[str, Model | Callable[[], Model]] | None = None, study_globals: Dict[str, Quantity] | None = None, pdata_index: str | int | Dict[str | int, str | int] = '1', recipe: Callable[[dict, dict, int], str | Tuple[str | None, dict | None, Model | Callable[[], Model] | None]] | None = None, load_raw_kspace: bool = True, rotate_bvecs_to_image: bool = True, definition_paths=(), profiles=None, strict_raw: bool = True, device: str | Device = 'cpu', slice_package: int | None = None) Tuple[Experiment, DataSet, Model, dict]#
Read one spatial image product without changing any source files.
Multiple stacks remain in one experiment along
slice_package. Selectingslice_packageexplicitly imports only that zero-based package. Raw reconstruction additionally requires the selected product’s reconstruction parameters.
- mrax.io.import_bruker_study(study_root: str | Path, type_overrides: Dict[str, str] | None = None, model_map_by_type: Dict[str, Model | Callable[[], Model]] | None = None, model_map_by_name: Dict[str, Model | Callable[[], Model]] | None = None, study_globals: Dict[str, Quantity] | None = None, field_strength_mhz: float | Quantity | None = None, pdata_index: str | int | Dict[str | int, str | int] = '1', recipe: Callable[[dict, dict, int], str | Tuple[str | None, dict | None, Model | Callable[[], Model] | None]] | None = None, load_raw_kspace: bool = True, rotate_bvecs_to_image: bool = True, definition_paths=(), profiles=None, strict_raw: bool = True, device: str | Device = 'cpu', progress_callback: Callable[[int, int, str], None] | None = None, selected_experiments: Sequence[str] | None = None)#
- mrax.io.read_bruker_acquisition(folder, *, pdata_index='1', definition_paths=(), profiles=None, slice_package=None)#
Read prepared samples and geometry for explicit reconstruction.
Calibration and source loop interpretation are resolved here. Image reconstruction only consumes the returned vendor-independent acquisition contract.
- mrax.io.load_acquisition(path: str | Path) AcquisitionData#
Load and validate an acquisition. Archives containing pickle are rejected.
- mrax.io.save_acquisition(path: str | Path, acquisition: AcquisitionData) None#
Save the acquisition contract losslessly as arrays and JSON.
- class mrax.io.DefinitionLibrary(paths=())#
Select a single matching profile and explain or reject ambiguity.
- mrax.io.study_selection.auto_select_scans(study: Any, meta: Mapping[str, Any] | None, *, fair_exp_types: Sequence[str] = ('fair_asl',), t2_exp_types: Sequence[str] = ('mse',), sat_trans_type: str = 'sat_trans', wasabi_keywords: Iterable[str] = ('wasabi', 'wobble', 'b0', 'b1'), min_frames: int = 1) tuple[str | None, str | None, str | None, list[str]]#
Heuristically select FAIR, T2, WASABI, and sat-trans scans from a study.
- mrax.io.study_selection.pick_scan_by_type(study: Any, exp_type: str, *, min_frames: int = 1) str | None#
Pick the first scan name matching an experiment type and minimum frame count.