Skip to content

Feature Request: how callable to receive intervals #97

@egemenimre

Description

@egemenimre

TL;DR: can you modify how signature in IntervalDict.combine() method to receive the active interval and to look like this:

how(v1, v2, i=i)

The optionals should make it backwards compatible, and no existing code would be broken.

Rationale:
I'm writing a code where I have an IntervalDict, where each interval has an associated interpolator. When two IntervalDicts are combined, then I'd like to do a piecewise multiplication with discrete samples and then generate a new interpolator.

Concrete example: Imagine the light spectrum from the Sun. When combined with a "filter", the passing light has a single colour. If the interpolator of the solar spectrum is intersected with the filter (1 in the bandpass region, 0 otherwise), then the resulting object would have zero in the entire domain, with the exception of the bandpass region. If the filter has a more complex shape, then two interpolators will have to interact, where I will have to do all the resampling and interpolator generation within the how callable.

Currently, the callable does not receive the i interval, therefore it does not know for which part of the domain it is called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions