Skip to content

Commit

Permalink
Fix terrible bug in create_abd_from_h5 with spectrecce_v1
Browse files Browse the repository at this point in the history
  • Loading branch information
moble committed Jun 28, 2024
1 parent 637d43e commit c414b35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scri/SpEC/file_io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ def create_abd_from_h5(
else:
dataType = DataNames.index("h")
WMs[data_label] = WaveformModes(
t=time,
t=time.copy(),
data=cce[f"{data_label}{data_label_suffix}"][indices, 1:].view(np.complex128),
ell_min=0,
ell_max=ell_max,
Expand Down

3 comments on commit c414b35

@moble
Copy link
Owner Author

@moble moble commented on c414b35 Jun 28, 2024

Choose a reason for hiding this comment

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

@keefemitman If you've been getting weird results since we added

# Adjust time by worldtube radius
if file_format == "spectrecce_v1":
WMs[i].t -= float(radius)

this is why. They were all the same t!!! So it was just subtracting the radius as many times as there are input waveforms — typically 6. Be sure to update.

@keefemitman
Copy link
Contributor

Choose a reason for hiding this comment

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

@moble nice catch, I agree with the change you made. But how did you stumble upon this? I've been running this code over the whole catalog and everything looks fine, i.e., I don't see the unexpected behavior that you might expect from this bug.

@keefemitman
Copy link
Contributor

Choose a reason for hiding this comment

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

@moble Ah never mind, I indeed see the flawed result.

Please sign in to comment.