Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 2nd monotonic requirement; fixes subtle bug affecting some CCE outputs #93

Merged
merged 4 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions scri/SpEC/file_io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,10 @@ def create_abd_from_h5(
if file_format == "spectrecce_v1":
WMs[i].t -= float(radius)

indices = index_is_monotonic(WMs[i].t)
WMs[i].t = WMs[i].t[indices]
WMs[i].data = WMs[i].data[indices]

# Create an instance of AsymptoticBondiData
abd = AsymptoticBondiData(
time=WM_ref.t,
Expand Down
4 changes: 2 additions & 2 deletions scri/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def shuffle(a):
b_array_bit += shuffle_width
return b

return nb.jit(shuffle)
return nb.njit(shuffle)

else:
# This function is almost the same as above, except for:
Expand Down Expand Up @@ -404,4 +404,4 @@ def unshuffle(b):
b_array_bit += shuffle_width
return a

return nb.jit(unshuffle)
return nb.njit(unshuffle)
1 change: 1 addition & 0 deletions tests/test_waveform_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def test_hyper_translation():


def test_supertranslation_inverses():
np.random.seed(1234)
w1 = samples.random_waveform_proportional_to_time(rotating=False)
ell_max = 4
for ellpp, mpp in sf.LM_range(0, ell_max):
Expand Down
Loading