Closed vijayvarma392 closed 3 months ago
Here's a script to reproduce the issue
import numpy as np # Start the Julia session from sxs.julia import PNWaveform q = 1.0 chiA0 = [0, 0, 0.5] chiB0 = [0, 0, 0.5] omega_ref = 1e-2 w = PNWaveform(q/(1+q), 1/(1+q), np.array(chiA0), np.array(chiB0), omega_ref, inertial=True) # This works fine chiA = w.chi1 chiB = w.chi2 quat = w.frame omega_orb = w.v**3 / (w.M1 + w.M2) phi_orb = w.orbital_phase print (chiA[0]) w = PNWaveform(q/(1+q), 1/(1+q), np.array(chiA0), np.array(chiB0), omega_ref, inertial=False) # So does this chiA = w.chi1 chiB = w.chi2 quat = w.frame omega_orb = w.v**3 / (w.M1 + w.M2) phi_orb = w.orbital_phase print (chiA[0]) # But this doesn't work (AttributeError: 'WaveformModes' object has no attribute 'chi1') w = w.to_inertial_frame() chiA = w.chi1 chiB = w.chi2 quat = w.frame omega_orb = w.v**3 / (w.M1 + w.M2) phi_orb = w.orbital_phase print (chiA[0])
That's correct. The object returned from PNWaveform is an sxs.WaveformModes, which does not track those things. If you want them, you have to copy them before throwing away the original w.
PNWaveform
sxs.WaveformModes
w
Here's a script to reproduce the issue