Skip to content

Commit

Permalink
Use more standard frame_type and data_type specifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
moble committed Nov 27, 2024
1 parent 855a1d0 commit 39d8897
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sxs/waveforms/format_handlers/grathena.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,20 @@ def load(file, **kwargs):
subfile = kwargs.pop("subfile", "rh_CCE_GeometricUnits.h5")
radius = kwargs.pop("radius", "50.00")

if subfile.startswith("rPsi4"):
data_type = "psi4"
elif subfile.startswith("rh"):
data_type = "h"

with tarfile.open(file, "r") as tf:
tf_names = [tfi.name for tfi in tf]
index = tf_names.index(f"{resolution}/{subfile}")
h5file = tf.extractfile(list(tf)[index])
w = nrar.load(
h5file,
h5_group=radius,
frame_type=nrar.Inertial,
data_type=nrar.h,
frame_type="inertial",
data_type=data_type,
m_is_scaled_out=True,
r_is_scaled_out=True,
)
Expand Down

0 comments on commit 39d8897

Please sign in to comment.