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
Changes from 1 commit
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
8 changes: 6 additions & 2 deletions scri/SpEC/file_io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,10 +604,14 @@ 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,
ell_max=WM_ref.ell_max,
time=WMs[list(WMs.keys())[0]].t,
ell_max=WMs[list(WMs.keys())[0]].ell_max,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not still just use WM_ref here? No copy was made, so WM_ref should have been changed in the same way, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point; reverted back!

multiplication_truncator=max,
)

Expand Down
Loading