gwastro / pycbc

Core package to analyze gravitational-wave data, find signals, and study their parameters. This package was used in the first direct detection of gravitational waves (GW150914), and is used in the ongoing analysis of LIGO/Virgo data.
http://pycbc.org
GNU General Public License v3.0
314 stars 348 forks source link

fix cdfinv of external text file distribution when multiple are used in a joint distribution #4762

Closed ahnitz closed 4 months ago

ahnitz commented 4 months ago

@WuShichao There is a bug in the external from fun distribution in how it retrieves the parameter name.

At the same time, the config file format was overly complicated. I've simplified this. so that one can do

[prior-final_mass] name = external_func_fromfile file_path = spin.txt column_index = 1

The change is backwards compatible.

@WuShichao Can you please verify and review? Also add it to your todo list to put in a unittest for this class.

WuShichao commented 4 months ago

@ahnitz Thanks for this fix. I have tried my previous 3G population mock data code, and it works fine: image Please rerun the LISA SMBHB LDC test in CI and fix the CC issue.

WuShichao commented 4 months ago

@ahnitz After @koustavchandra tries it successfully, I will merge it.

ahnitz commented 4 months ago

@koustavchandra Does this resolve your issue?

WuShichao commented 4 months ago

This PR fixes this issue https://github.com/gwastro/pycbc/issues/4312

koustavchandra commented 4 months ago

Yes, it fixes it. Thanks!