Skip to content
Snippets Groups Projects

Use the `PriorSet` from the first step of PE as the `sampling_prior` for hyper-pe

All threads resolved!

This addresses the issue in #196 (closed), which was recently closed. The problem was the the sampling_prior argument to the hyper-pe likelihood could only be a regular function or a hyper.model, so if you already had the .prior file from the first step of PE using bilby, you'd have to re-code this up in a different way. I've added functionality so that you can pass the bilby.core.prior object loaded from the prior file directly to the hyper-pe likelihood, or if you already have the log_prior stored as a column in your posterior samples, you don't need to pass a sampling_prior at all. This also makes the hyper-pe likelihood calculation more efficient, since the data attribute now stores the prior for each of the posterior samples, and it doesn't need to be calculated every time the likelihood is called. I have tested this for the three cases below, and they all return the same value of the hyper-pe likelihood.

  1. The old style with a regular function for the sampling_prior
  2. Including the log_prior column in the posterior samples and not passing a sampling_prior
  3. Passing the bilby.core.prior.PriorDict() object from the first step of PE as the sampling_prior

Merge request reports

Pipeline #68488 passed

Pipeline passed for 4f95fe7c on sylvia.biscoveanu:hyperpe_sampling_prior_format

Approval is optional

Merged by Colm TalbotColm Talbot 5 years ago (Jul 19, 2019 12:09am UTC)

Pipeline #70843 passed

Pipeline passed for 4a1fa9f8 on master

Test coverage 68.00% from 0 jobs

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Sylvia Biscoveanu resolved all discussions

    resolved all discussions

  • added 1 commit

    Compare with previous version

  • Gregory Ashton changed milestone to %0.5.3

    changed milestone to %0.5.3

  • Gregory Ashton approved this merge request

    approved this merge request

  • Colm Talbot approved this merge request

    approved this merge request

  • merged

  • Colm Talbot mentioned in commit 4a1fa9f8

    mentioned in commit 4a1fa9f8

  • mentioned in issue #196 (closed)

  • Please register or sign in to reply
    Loading