fuse

method of dascore.core.coords.BaseCoord source

fuse(
    self ,
    tolerance = None,
    keep_step: bool = False,
)-> ‘BaseCoord’

Return the simplest coordinate representing the same values.

Unlike snap, which forces a uniform coordinate with unbounded interior error, fuse never moves any value by more than tolerance.

Parameters

Parameter Description
tolerance The maximum amount any coordinate value may change. For time-like
coordinates this is a timedelta (numeric values interpreted as
seconds). None or 0 permit only exact (lossless) simplifications.
keep_step If True, only re-fit at the segments’ own step, so missing
samples stay missing however large the tolerance. Merging uses
this: a hole is data that is absent, not a slower sampling rate.
Note

Most coordinates are already in their simplest form and return themselves. A coordinate holding several runs re-fits them as evenly sampled grids wherever the fit error stays within tolerance, possibly collapsing to a single grid.