moble / scri

Python/numba code for manipulating time-dependent functions of spin-weighted spherical harmonics on future null infinity
MIT License
18 stars 20 forks source link

Bugfix in removing non-monotonic time steps before extrapolating. #70

Closed markscheel closed 2 years ago

markscheel commented 2 years ago

In extrapolation.py, read_finite_radius_waveform checks for non-monotonic timesteps in the input finite-radius data, and removes these non-monotonic timesteps. Unfortunately: 1) It removes the timesteps correctly from the time array, but removes them incorrectly for the waveform data, causing a "cannot broadcast input array from shape BLA1 into shape BLA2" error whenever it actually removes non-monotonic timesteps. 2) It neglects to remove those same non-monotonic timesteps from the frame data, leading to similar shape-mismatch errors down the line.

This PR fixes both the above bugs.

markscheel commented 2 years ago

This bug crashed my rpxmb-on-the-entire-catalog script.