httomo.sweep_runner.param_sweep_block.ParamSweepBlock#
- class httomo.sweep_runner.param_sweep_block.ParamSweepBlock(data: ndarray, aux_data: AuxiliaryData, slicing_dim: Literal[0, 1, 2])[source]#
Data storage type for block processing in parameter sweep runs
Methods
__init__
(data, aux_data, slicing_dim)Attributes
The index of this block within the chunk handled by the current process
The index of the core area of this block within the chunk (padding removed)
Shape of the full chunk handled by the current process
Shape of the full chunk core area handled by the current process (with padding removed)
Return the data, but with the padding slices removed
The index of this block within the global data across all processes
The index of the core area of this block within the global data across all processes (with padding removed)
Shape of the global data across all processes
Check if the current dataset is the final one for the chunk handled by the current process
Determine if this is a padded block
Get the 'before' and 'after' padding values for this block.
Shape of the core date in this block, with padding removed
Return the slicing dimenions of the block
- property chunk_index: Tuple[int, int, int]#
The index of this block within the chunk handled by the current process
- property chunk_index_unpadded: Tuple[int, int, int]#
The index of the core area of this block within the chunk (padding removed)
- property chunk_shape: Tuple[int, int, int]#
Shape of the full chunk handled by the current process
- property chunk_shape_unpadded: Tuple[int, int, int]#
Shape of the full chunk core area handled by the current process (with padding removed)
- property data_unpadded: ndarray | cupy.ndarray#
Return the data, but with the padding slices removed
- property global_index: Tuple[int, int, int]#
The index of this block within the global data across all processes
- property global_index_unpadded: Tuple[int, int, int]#
The index of the core area of this block within the global data across all processes (with padding removed)
- property global_shape: Tuple[int, int, int]#
Shape of the global data across all processes
- property is_last_in_chunk: bool#
Check if the current dataset is the final one for the chunk handled by the current process
- property is_padded: bool#
Determine if this is a padded block
- property padding: Tuple[int, int]#
Get the ‘before’ and ‘after’ padding values for this block. This is to be understood as the the number of padding slices in the ‘slicing_dim’ direction that come before and after the core area of the block. If no padding is used, it returns (0, 0).
- property shape_unpadded: Tuple[int, int, int]#
Shape of the core date in this block, with padding removed
- property slicing_dim: Literal[0, 1, 2]#
Return the slicing dimenions of the block