httomo.loaders.standard_tomo_loader.StandardTomoLoader#
- class httomo.loaders.standard_tomo_loader.StandardTomoLoader(in_file: Path, data_path: str, image_key_path: str | None, darks: DarksFlatsFileConfig, flats: DarksFlatsFileConfig, angles: RawAngles | UserDefinedAngles, preview_config: PreviewConfig, slicing_dim: Literal[0, 1, 2], comm: mpi4py.MPI.Comm, padding: Tuple[int, int] = (0, 0))[source]#
Loads an individual block at a time from raw data instead of an entire chunk.
Methods
__init__
(in_file, data_path, image_key_path, ...)finalize
()Method intended to be called after reading all blocks is done, to give implementations a chance to close files, free memory, etc.
read_block
(start, length)Reads a block from the dataset, starting at start of length length, in the current slicing dimension.
Attributes
Auxiliary data
Returns the shape of a chunk, i.e. the data processed in the current MPI process (whether it fits in memory or not).
Returns the start index of the chunk within the global data array
Global data shape across all processes that we eventually have to read.
Returns raw data shape
Slicing dimension - 0, 1, or 2
- property aux_data: AuxiliaryData#
Auxiliary data
- property chunk_shape: Tuple[int, int, int]#
Returns the shape of a chunk, i.e. the data processed in the current MPI process (whether it fits in memory or not)
- property darks: ndarray | cupy.ndarray | None#
- property dtype: dtype#
- finalize()[source]#
Method intended to be called after reading all blocks is done, to give implementations a chance to close files, free memory, etc.
- property flats: ndarray | cupy.ndarray | None#
- property global_index: Tuple[int, int, int]#
Returns the start index of the chunk within the global data array
- property global_shape: Tuple[int, int, int]#
Global data shape across all processes that we eventually have to read.
- property raw_shape: Tuple[int, int, int]#
Returns raw data shape
- read_block(start: int, length: int) DataSetBlock [source]#
Reads a block from the dataset, starting at start of length length, in the current slicing dimension. Note that start is chunk-based, i.e. mean different things in different processes.
- property slicing_dim: Literal[0, 1, 2]#
Slicing dimension - 0, 1, or 2