express_range_for_coord

function of dascore.utils.misc source

express_range_for_coord(
    value ,
    coord ,
)

Re-express one index-side range in what a patch coordinate needs.

A range with any unit-bearing bound carries a _CanonicalRange, whose representation can be chosen only here, where the coordinate is finally known (a bare bound riding inside one stays raw there too). Everything else — all-bare value ranges (native units), sample-index ranges, times, strings — passes through untouched.