halo

method of dascore.core.processor.PatchProcessor source

halo(
    self ,
    plan: dict[str, Any] ,
)-> ‘Mapping[int, tuple[int, int]]’

Return how far along an axis the kernel reads to fill a sample.

For each axis along which the kernel leaves a sample empty (NaN) when the data it needs lie beyond the array: how many samples of the input before and after that sample it reads. A rolling mean over ten samples, labelled at the last, reads nine before and none after, so its first nine samples are empty. Counted in samples of the input, from the plan get_metadata returned, and the same whatever the data hold. An axis not named has none, which is the default.

Patch.window discards from every window the samples which reach beyond it and blends what is left, so the windows must overlap by at least as much; the samples which reach beyond the patch itself are left NaN.