ACCarnall / bagpipes

Bagpipes is a state of the art code for generating realistic model galaxy spectra and fitting these to spectroscopic and photometric observations. Users should install with pip, not by cloning the repository.
http://bagpipes.readthedocs.io
GNU General Public License v3.0
71 stars 37 forks source link

Flux Upper Limits #57

Open jsulli27 opened 5 months ago

jsulli27 commented 5 months ago

Hello,

Is Bagpipes able to handle an upper limit on the flux in a filter? If so, how should I load in the photometry for Bagpipes so the code knows to treat a flux value as an upper limit?

Best, Jessica Sullivan

ACCarnall commented 5 months ago

Hi Jessica,

Upper limits are just normal data for which you don't have sufficient SNR to confidently detect the object. So you might have a flux of -0.1+/- 0.5 microJanskys, which you'd call a 3 sigma upper limit at 1.4 or 1.5 microJanskys. The statistically rigorous way to include these datapoints in fitting is to treat them just like any other, by feeding bagpipes the measured flux and 1 sigma uncertainty.

The only time this is likely to cause a problem is when you don't have a good handle on your errors, so for example if you have a flux of -5+/- 0.5 microJanskys it's unlikely this is the real flux/error, and that you instead have some sort of problem with your data reduction. In this case you probably need to go back and fix this before trying to include the data in your fit.

Cheers, Adam