
Does this code first compute pericenters when getting gwecc_object and then recompute them again? That's very bad!
Similarly, why repeat the code about retaining good extrema, and building the interpolant?
If that's not what is happening: It's still bad to repeat this whole section of code. How about making a function in the main code and just calling that in both places. This is important because, let's say you decide to change the 1,5 factor in one place and forget to change it in the other one..
Finally, independent: What does this code do if you give it a waveform that is too short for flow=20Hz, but ask it to truncate it at flow=20Hz? It should raise a helpful error message.
gw_eccentricity/gw_eccentricity/truncate_waveform_by_flow.py
Line 77 in e1e3a1d
Does this code first compute pericenters when getting
gwecc_objectand then recompute them again? That's very bad!Similarly, why repeat the code about retaining good extrema, and building the interpolant?
If that's not what is happening: It's still bad to repeat this whole section of code. How about making a function in the main code and just calling that in both places. This is important because, let's say you decide to change the
1,5factor in one place and forget to change it in the other one..Finally, independent: What does this code do if you give it a waveform that is too short for flow=20Hz, but ask it to truncate it at flow=20Hz? It should raise a helpful error message.