protocol_manager.tools.mrd_provider =================================== .. py:module:: protocol_manager.tools.mrd_provider .. autoapi-nested-parse:: Tools to provide ISMRM raw data. Attributes ---------- .. autoapisummary:: protocol_manager.tools.mrd_provider.DATA_LAKE_DIR protocol_manager.tools.mrd_provider.RANGE_RE protocol_manager.tools.mrd_provider.MRD_EXTENSIONS Functions --------- .. autoapisummary:: protocol_manager.tools.mrd_provider.locate_mrd protocol_manager.tools.mrd_provider.find_mrd_file protocol_manager.tools.mrd_provider.build_index_meta protocol_manager.tools.mrd_provider.load_acquisitions_slices protocol_manager.tools.mrd_provider.parse_ids Module Contents --------------- .. py:data:: DATA_LAKE_DIR .. py:data:: RANGE_RE .. py:data:: MRD_EXTENSIONS :value: ('.mrd', '.h5') .. py:function:: locate_mrd(protocol_id: str, task_id: str, result_id: str) -> pathlib.Path Build file path. Path: ``/data_lake/{protocol_id}/{task_id}/{result_id}/*.mrd`` or ``*.h5`` .. py:function:: find_mrd_file(directory: str, files: list[str]) -> pathlib.Path Locate the .mrd/.h5 file from a stored result's directory and file list. Used with the flat task-directory layout where the Result DB record stores the actual directory and filenames directly. .. py:function:: build_index_meta(file_path: str) -> list[scanhub_libraries.models.MRDAcquisitionInfo] Build index. .. py:function:: load_acquisitions_slices(file_path: pathlib.Path, acquisition_indices: collections.abc.Iterable[int], coil_idx: int = 0, stride: int = 1, dataset_idx: int = 0) -> collections.abc.Iterable[numpy.ndarray] Load raw data slice. .. py:function:: parse_ids(expr: str) -> list[int] Parse ids.