gwastro / BBHX-waveform-model

GNU General Public License v3.0
1 stars 3 forks source link

allow slight deviation in f_min check #18

Closed WuShichao closed 1 month ago

WuShichao commented 3 months ago

@mj-will This PR avoids too many annoying warnings from the f_min check. The original check will always fail for SOBHB, so I added an update to the condition.

mj-will commented 3 months ago

@WuShichao do these warnings appear more than once per process? I thought when using warnings, they were only print once so there shouldn't be too many.

WuShichao commented 3 months ago

@WuShichao do these warnings appear more than once per process? I thought when using warnings, they were only print once so there shouldn't be too many.

During sampling, warnings show up repeatedly, so I can't easily see the dlogz info from nessai.

mj-will commented 3 months ago

@WuShichao do these warnings appear more than once per process? I thought when using warnings, they were only print once so there shouldn't be too many.

During sampling, warnings show up repeatedly, so I can't easily see the dlogz info from nessai.

Hmm, I'm confused by that. The following snippet on prints one warning for me:

from pycbc.waveform import get_fd_det_waveform
import numpy as np
params = {}
params["ref_frame"] = "LISA"
params["approximant"] = "BBHX_PhenomD"
params["coa_phase"] = 0.0
params["mass1"] = 1e6
params["mass2"] = 8e5
params["spin1z"] = 0.0
params["spin2z"] = 0.0
params["distance"] = 410
params["inclination"] = np.pi / 2
params["t_obs_start"] = 31536000
params["delta_f"] = 1.0 / params["t_obs_start"]
params["f_lower"] = 1e-5
params["f_ref"] = 8e-4
params["f_final"] = 0.1
params["delta_t"] = 1 / 0.2
params["t_offset"] = 9206958.120016199
params["tc"] = 4799624.274911478
params["eclipticlongitude"] = 0.5
params["eclipticlatitude"] = 0.23
params["polarization"] = 0.1
params["tdi"] = 1.5
for _ in range(4):
    get_fd_det_waveform(ifos=["LISA_A"], **params)

Does it print multiple for you?

WuShichao commented 3 months ago

@WuShichao do these warnings appear more than once per process? I thought when using warnings, they were only print once so there shouldn't be too many.

During sampling, warnings show up repeatedly, so I can't easily see the dlogz info from nessai.

Hmm, I'm confused by that. The following snippet on prints one warning for me:

from pycbc.waveform import get_fd_det_waveform
import numpy as np
params = {}
params["ref_frame"] = "LISA"
params["approximant"] = "BBHX_PhenomD"
params["coa_phase"] = 0.0
params["mass1"] = 1e6
params["mass2"] = 8e5
params["spin1z"] = 0.0
params["spin2z"] = 0.0
params["distance"] = 410
params["inclination"] = np.pi / 2
params["t_obs_start"] = 31536000
params["delta_f"] = 1.0 / params["t_obs_start"]
params["f_lower"] = 1e-5
params["f_ref"] = 8e-4
params["f_final"] = 0.1
params["delta_t"] = 1 / 0.2
params["t_offset"] = 9206958.120016199
params["tc"] = 4799624.274911478
params["eclipticlongitude"] = 0.5
params["eclipticlatitude"] = 0.23
params["polarization"] = 0.1
params["tdi"] = 1.5
for _ in range(4):
    get_fd_det_waveform(ifos=["LISA_A"], **params)

Does it print multiple for you?

In this test case, it only prints once. Can you try a SOBHB in PE?

mj-will commented 1 month ago

@WuShichao do these warnings appear more than once per process? I thought when using warnings, they were only print once so there shouldn't be too many.

During sampling, warnings show up repeatedly, so I can't easily see the dlogz info from nessai.

Hmm, I'm confused by that. The following snippet on prints one warning for me:

from pycbc.waveform import get_fd_det_waveform
import numpy as np
params = {}
params["ref_frame"] = "LISA"
params["approximant"] = "BBHX_PhenomD"
params["coa_phase"] = 0.0
params["mass1"] = 1e6
params["mass2"] = 8e5
params["spin1z"] = 0.0
params["spin2z"] = 0.0
params["distance"] = 410
params["inclination"] = np.pi / 2
params["t_obs_start"] = 31536000
params["delta_f"] = 1.0 / params["t_obs_start"]
params["f_lower"] = 1e-5
params["f_ref"] = 8e-4
params["f_final"] = 0.1
params["delta_t"] = 1 / 0.2
params["t_offset"] = 9206958.120016199
params["tc"] = 4799624.274911478
params["eclipticlongitude"] = 0.5
params["eclipticlatitude"] = 0.23
params["polarization"] = 0.1
params["tdi"] = 1.5
for _ in range(4):
    get_fd_det_waveform(ifos=["LISA_A"], **params)

Does it print multiple for you?

In this test case, it only prints once. Can you try a SOBHB in PE?

@WuShichao do you have an example you can point me to?