simplify

method of dascore.core.coords.BaseCoord source

simplify(
    self ,
    tolerance = None,
)-> ‘BaseCoord’

Return the simplest coordinate representing the same values.

Unlike snap, which forces a uniform coordinate with unbounded interior error, simplify 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.
Note

Most coordinates are already in their simplest form and return themselves. CoordSegmented re-fits its segments as evenly sampled ranges wherever the fit error stays within tolerance, possibly collapsing to a single CoordRange.