httomo.runner.dataset_store_interfaces.DummySink#
- class httomo.runner.dataset_store_interfaces.DummySink(slicing_dim: Literal[0, 1, 2])[source]#
DataSetSink that does nothing - it purely drops the data
Methods
__init__
(slicing_dim)finalize
()Method intended to be called after writing all blocks is done, to give implementations a chance to write everything to disk and close the file, etc.
write_block
(block)Writes a block to the store, starting at the index in dataset.chunk_index, in the current slicing dimension.
Attributes
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 write.
Slicing dimension - 0, 1, or 2
- 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)
- finalize()[source]#
Method intended to be called after writing all blocks is done, to give implementations a chance to write everything to disk and close the file, etc.
- 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 write.
- property slicing_dim: Literal[0, 1, 2]#
Slicing dimension - 0, 1, or 2
- write_block(block: DataSetBlock)[source]#
Writes a block to the store, starting at the index in dataset.chunk_index, in the current slicing dimension.
NOTE: Implementers should make sure to move the dataset to CPU if required - it may be on GPU when this method is called.