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

aux_data

Auxiliary data

chunk_shape

Returns the shape of a chunk, i.e. the data processed in the current MPI process (whether it fits in memory or not).

darks

dtype

flats

global_index

Returns the start index of the chunk within the global data array

global_shape

Global data shape across all processes that we eventually have to read.

raw_shape

Returns raw data shape

slicing_dim

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