Skip to content

Commit

Permalink
Enable ABD objects to be created from RPDMB waveforms (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
keefemitman authored Feb 26, 2024
1 parent 068ac8e commit 69564c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scri/SpEC/file_io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
psi0,
Inertial,
)
import sxs
from sxs.metadata import Metadata
from . import corotating_paired_xor, rotating_paired_xor_multishuffle_bzip2
from ...asymptotic_bondi_data import AsymptoticBondiData
Expand Down Expand Up @@ -477,6 +478,10 @@ def create_abd_from_h5(file_format, convention="SpEC", **kwargs):
elif file_format == "rpxmb" or file_format == "rpxm":
WMs[data_label] = rotating_paired_xor_multishuffle_bzip2.load(filenames[data_label])[0]
WMs[data_label].to_inertial_frame()
elif file_format == "rpdmb" or file_format == "rpdm":
WMs[data_label] = WaveformModes.from_sxs(
sxs.rpdmb.load(filenames[data_label])
)
else:
raise ValueError(f"File format '{file_format}' not recognized. Must be either 'SXS', 'CCE', or 'RPXMB'.")

Expand Down

0 comments on commit 69564c5

Please sign in to comment.