Skip to content

Commit

Permalink
Use newer sxs capabilities (#66)
Browse files Browse the repository at this point in the history
* Update dependencies
* Preserve COM info in waveform, regardless of file output, in `remove_avg_com_motion`
* Preserve COM info when translating to `sxs.WaveformModes`
* Make `WaveformModes.transform` a full function, not just lambda (so that its name will appear correctly in the JSON when saving to RPXMB)
* Make RPXMB functions wrappers around `sxs.rpxmb` functions
  • Loading branch information
moble authored Apr 5, 2022
1 parent 4545cae commit 928936b
Show file tree
Hide file tree
Showing 6 changed files with 206 additions and 553 deletions.
241 changes: 123 additions & 118 deletions poetry.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "scri"
version = "2022.3.0"
description = "Time-dependent functions of spin-weighted spherical harmonics"
version = "2022.0.2"
readme = "README.md"
license = "MIT"
authors = ["Michael Boyle <michael.oliver.boyle@gmail.com>"]
Expand All @@ -13,10 +13,10 @@ numpy = ">=1.20"
scipy = "^1.0"
numba = ">=0.55"
h5py = "^3"
numpy-quaternion = ">=2021"
spinsfast = "^104"
spherical-functions = ">=2020"
sxs = ">=2021"
numpy-quaternion = ">=2022.4"
spherical-functions = ">=2022.4"
spinsfast = ">=2022.4"
sxs = ">=2022.3.2"
tqdm = ">=4.48.2, <4.61.2"
importlib-metadata = {version = "^1.0", python = "<3.8"}
mkdocs = {version = "^1.1.2", optional = true}
Expand Down
6 changes: 3 additions & 3 deletions scri/SpEC/com_motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,10 @@ def remove_avg_com_motion(
file_write_mode=file_write_mode,
attributes={"space_translation": x_0, "boost_velocity": v_0},
)
elif file_format.lower() == "rpxmb" or file_format.lower() == "rpxm":
w_m.boost_velocity = v_0
w_m.space_translation = x_0
if file_format.lower() == "rpxmb" or file_format.lower() == "rpxm":
path_to_new_waveform_h5 = path_to_waveform_h5.replace(".h5", "_CoM.h5", 1)
w_m.boost_velocity = v_0
w_m.space_translation = x_0
rotating_paired_xor_multishuffle_bzip2.save(w_m, path_to_new_waveform_h5)

# Finish by plotting the new data and save to PDF
Expand Down
Loading

0 comments on commit 928936b

Please sign in to comment.