timeseries.SpaceCurve.clean_copy

SpaceCurve.clean_copy(cleanup_func=<built-in function mollifier>, **kwargs)[source]

Make copy in which a cleanup function performed on the data.

cleanup_func is the interface to the functions in curve_geometry. In particular: 1. curve_geometry.cleanup() does slope comparison 2. curve_geometry.mollifier() does a convolution

cleanup_func should at the minimum take time and position as positional arguments 1 and 2 and return both new time and new position arrays. All Keyword arguments (**kwargs) are passed on to cleanup_func.

One can tune the various cleanup functions by passing a user manufactured function, for example .. code:

my_cleanup = lambda time, x:curve_geometry.mollifier(time,x,width=0.5)
clean_track = track.clean_copy(cleanup_func = my_cleanup)

would be equivalent to .. code:

clean_track = track.clean_copy(cleanup_func=curve_geometry.mollifier, width=0.5)