Skip to content

SXS waveforms contain memory even when they should not #21

@RoxGamba

Description

@RoxGamba

SXS waveforms downloaded with the version of the sxs module sxs-2024.0.27 (the latest compatible with python 3.9)
contain memory, even if loaded via

sim       = sxs.load('SXS:BBH:0180', extrapolation="N2", ignore_deprecation=True)

which mimics the syntax of this example and is similar (but not identical!) to what is being used in this line.

This can be assessed by comparing against waveforms loaded as:

sim_no_memory= sxs.load("SXS:BBH:0180/Lev/rhOverM_Asymptotic_GeometricUnits_CoM.h5", 
                        extrapolation_order=2)

The following minimal example illustrates the problem:

import sxs
import numpy as np
import matplotlib.pyplot as plt

# directly load the CoM data, max res
sim= sxs.load("SXS:BBH:0180/Lev/rhOverM_Asymptotic_GeometricUnits_CoM.h5", 
                        extrapolation_order=2)

sim_mem = sxs.waveforms.memory.add_memory(sim, integration_start_time=250)

# load the Strain -- this should **not** have memory!
sim_from_load       = sxs.load('SXS:BBH:0180', extrapolation="N2", ignore_deprecation=True)

plt.semilogy(sim.t, np.abs(sim.data[:, [sim.index(2, 2)]]))
plt.semilogy(sim_mem .t, np.abs(sim_mem .data[:, [sim_mem .index(2, 2)]]))
plt.semilogy(sim_from_load.h.t, abs(sim_from_load.h[:, sim_from_load.h.index(2,2)]), linestyle='--')
plt.show()

which gives:
Image

We should fix the download of the waveform, selecting (as a default) the memory-less strain.
We should also check with newer the behavior of newer versions of the sxs package.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions