httomo.block_interfaces.BlockIndexing#

class httomo.block_interfaces.BlockIndexing(*args, **kwargs)[source]#

Data indexing behaviour required for a block type to be processed by implementors of MethodWrapper

Methods

__init__(*args, **kwargs)

Attributes

chunk_index

The index of this block within the chunk handled by the current process

chunk_index_unpadded

The index of the core area of this block within the chunk (padding removed)

chunk_shape

Shape of the full chunk handled by the current process

chunk_shape_unpadded

Shape of the full chunk core area handled by the current process (with padding removed)

data_unpadded

Return the data, but with the padding slices removed

global_index

The index of this block within the global data across all processes

global_index_unpadded

The index of the core area of this block within the global data across all processes (with padding removed)

global_shape

Shape of the global data across all processes

is_last_in_chunk

Check if the current dataset is the final one for the chunk handled by the current process

is_padded

Determine if this is a padded block

padding

Get the 'before' and 'after' padding values for this block.

slicing_dim

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 slicing_dim: Literal[0, 1, 2]#

Return the slicing dimenions of the block