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

Adding functionality for using Bayestar fit input for inclination #330

Conversation

tsunhopang
Copy link
Collaborator

The PR allows for the Bayestar output fits to be used as inclination prior for NMMA;

A small test case is showing an expected behaviour

Corner plot without the fit input
image

Corner plot with the fit input
image

The fit input;
image

Currently, only a fixed distance prior is supported and, by default, takes the maP sky location. Subsequent PRs will expand the functionality.

@tsunhopang
Copy link
Collaborator Author

It seems that the ultrasat filters it breaking the pytest

Copy link
Member

@mcoughlin mcoughlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's just use fits rather than fit for the common nomenclature.

@@ -377,6 +377,16 @@ def get_parser(**kwargs):
default=False,
)

parser.add_argument(
"--fit-file",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's say fits-file.

nmma/em/prior.py Outdated
@@ -58,6 +59,92 @@ def get_instantiation_dict(self):
return instantiation_dict


def inclination_prior_from_fit(priors, args):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fits

nmma/em/prior.py Outdated
@@ -119,4 +206,7 @@ def convert_mtot_mni(parameters):
priors_dict["inclination_EM"] = ConditionalGaussianIotaGivenThetaCore(**setup)
priors = bilby.gw.prior.ConditionalPriorDict(priors_dict)

if args.fit_file:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fits

@sahiljhawar
Copy link
Member

@tsunhopang I think you have to update the tests as well

@tsunhopang tsunhopang merged commit 47d4461 into nuclear-multimessenger-astronomy:main Mar 8, 2024
3 of 4 checks passed
@tsunhopang tsunhopang deleted the fit_input_dist_iota branch March 10, 2024 21:09
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

Successfully merging this pull request may close these issues.

3 participants