sxs-collaboration / sxs

Python code for manipulating data from the SXS collaboration
MIT License
25 stars 18 forks source link

Generalize romspline's _greedy function to allow more general tolerances #10

Closed moble closed 4 years ago

moble commented 4 years ago

This PR basically extracts the functionality that we actually use from romspline, rewrites it to conform with more current python, and generalizes it to accept a function in place of tol (so that we can normalize to amplitude when splining phase). It also removes the error datasets from the LVC output. Combining these two points provides us with a ~90x speedup, while producing files ~11x smaller, which still result in the same accuracy for LVC waveforms. I've also changed the default spline degree from 3 to 5 to align with LVC usage, which provides a further speedup and slightly smaller files.

This addresses #7, #8, and #9.

moble commented 4 years ago

I have not yet removed romspline entirely, because horizons.py uses it in a way that's slightly awkward for me; it'll just take a little more reorganization of the code in that file to finish this.