Skip to content

Document that block splitter doesn't know about padding when reading blocks #642

@yousefmoazzam

Description

@yousefmoazzam

In the task runner, the max slices is calculated and then reduced by the number of padding slices, before being given to the block splitter:

slicing_dim_section: Literal[0, 1] = _get_slicing_dim(section.pattern) - 1 # type: ignore
self.determine_max_slices(section, slicing_dim_section)
# Account for potential padding in number of max slices
padding = determine_section_padding(section)
section.max_slices -= padding[0] + padding[1]

The block splitter in turn will read blocks from its DataSetSource implementor, unaware of the blocks being read will potentially contain padded slices. (Ie, if padding is (2, 2) and the block splitter is told to read a block of length 5, it'll get a block with slicing dim length 5 + 2 + 2 = 9).

It'd be useful to document this more clearly somewhere, before I forget this fact once again...

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationframeworkData-handling framework related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions