MOSFiT icon indicating copy to clipboard operation
MOSFiT copied to clipboard

Drawn values do not appear to follow a given prior when it peaks outside out the given limits

Open BlueberryDolphin opened this issue 5 years ago • 2 comments

When creating populations of simulated light curves, if the 'gaussian' prior is specified with a 'mu' which lies outside of the prior range, the drawn values for that parameter do not appear to follow the prior. Attached are images of a gaussian prior where mu lies within the prior range, and then outside to demonstrate the issue.

Creating a Lorentzian (Cauchy) prior also leads to a similar issue, so it appears to be a problem with any prior that has a peak.

Gaussian_Peak

Gaussian_Fringe

BlueberryDolphin avatar Feb 07 '20 10:02 BlueberryDolphin

Similar behaviour to this was encountered when I (accidentally) set the value of sigma on a Gaussian prior to far wider than I intended to.

Attached is an image showing "Attempted Prior" (the prior I was attempting to implement), the "Prior" (the prior I was actually telling MOSFiT to implement, with a ridiculously large sigma), and the "Drawn Vals", a histogram of the values drawn by MOSFiT when creating the population of simulated light curves.

Looks like when the majority of the given prior is outside the allowed range, MOSFiT tries to draw from across the whole range of the prior, realises it's not actually allowed to do that, and decides to draw the values at the edges of the allowed range instead, rather than only drawing from inside the given limits?

Plot for Matt

BlueberryDolphin avatar Mar 11 '20 15:03 BlueberryDolphin

I think @bmockler has a fix for this? If you want to push it I'm happy to merge. Thanks!

mnicholl avatar Oct 16 '23 10:10 mnicholl