Skip to content

Commit a80c1dd

Browse files
committed
Remove polarization postprocessing from waveform classes
1 parent 7e30744 commit a80c1dd

1 file changed

Lines changed: 6 additions & 13 deletions

File tree

src/jimgw/core/single_event/waveform.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,14 @@ def __call__(
218218
[
219219
M_tot,
220220
params["d_L"],
221+
params['iota'],
222+
params['phase_c'],
221223
1. / q,
222224
params["s1_z"],
223225
params["s2_z"],
224226
]
225227
)
226-
result = self._waveform(frequency, theta, {})
227-
phi_c = params['phase_c']
228-
iota = params['iota']
229-
output["p"] = result[Polarization.P] * jnp.exp(1j * phi_c) * (1 / 2 * (1 + jnp.cos(iota) ** 2))
230-
output["c"] = -1j * result[Polarization.C] * jnp.exp(1j * phi_c) * jnp.cos(iota)
231-
return output
228+
return self._waveform(frequency, theta, {})
232229

233230
def __repr__(self):
234231
return f"JaxNRSurHyb3dq8(segment_length={self._waveform.surrogate.segment_length}, sampling_rate={self._waveform.surrogate.sampling_rate})"
@@ -252,6 +249,8 @@ def __call__(
252249
[
253250
M_tot,
254251
params["d_L"],
252+
params['iota'],
253+
params['phase_c'],
255254
1./q,
256255
params["s1_x"],
257256
params["s1_y"],
@@ -261,13 +260,7 @@ def __call__(
261260
params["s2_z"],
262261
]
263262
)
264-
result = self._waveform(frequency, theta, {})
265-
266-
phi_c = params['phase_c']
267-
iota = params['iota']
268-
output["p"] = result[Polarization.P] * jnp.exp(1j * phi_c) * (1 / 2 * (1 + jnp.cos(iota) ** 2))
269-
output["c"] = -1j * result[Polarization.C] * jnp.exp(1j * phi_c) * jnp.cos(iota)
270-
return output
263+
return self._waveform(frequency, theta, {})
271264

272265
def __repr__(self):
273266
return f"JaxNRSur7dq4(segment_length={self._waveform.surrogate.segment_length}, sampling_rate={self._waveform.surrogate.sampling_rate})"

0 commit comments

Comments
 (0)