Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time delay does not work for "inverse" model in pycbc.population.population_models.p_tau #5043

Open
divyajyoti09 opened this issue Feb 15, 2025 · 1 comment

Comments

@divyajyoti09
Copy link
Contributor

The inverse model for pycbc.population.population_models.p_tau does not work as intended because there are no minimum and maximum limits for the inverse function. This results in all probability being concentrated near zero, which effectively introduces no time delay in the merger_rate_density function (or other functions which use p_tau).

Following code tests the bug above:

from pycbc.population.population_models import merger_rate_density, sfr_madau_dickinson_2014

z_arr = np.arange(0.01, 10, 0.01)
md_arr = sfr_madau_dickinson_2014(z_arr)
plt.plot(z_arr, md_arr/md_arr.max(), 'r', label='No time delay')
for model, colr in zip(['inverse', 'gaussian'], ['yellow', 'green']):
    mrd_pycbc = merger_rate_density(sfr_func=sfr_madau_dickinson_2014, td_model=model, rho_local=105, npoints=100)
    mrd_pycbc_arr = mrd_pycbc(z_arr)
    plt.plot(z_arr, mrd_pycbc_arr/mrd_pycbc_arr.max(), '-.', c=colr, label=f'TD model = {model}')
plt.xlabel('z')
plt.ylabel('Normalised merger rate density')
plt.grid()
plt.legend()
plt.title('SFR Madau Dickinson')

The resulting plot is

Image

In order to resolve this, a minimum and maximum limit on time delay function is needed. Something along of the lines of this should work.

@WuShichao
Copy link
Contributor

See my comments in #5046

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants