This function computes an upper limit for the strength of a signal embedded in a sequence of noisy measurements.
Signal is assumed to be the sum of n independent measurements from a process given by y = mu + source_flux + eps, where eps is gaussian noise with mean zero and variance sigma. The procedure employs a Bayesian approach to find an upper limit for source_flux * n. A prior enforces that source_flux >= 0. The program returns the value f_crit = source_flux_crit * n such that the posterior probability that f_true < f_crit is equal to confidence
TODO: Add in Poisson (and other) noise models
An upper limit for any INTEGRATED source flux (that is, summed up over all measurements) embedded in the signal.
- signal in required
The SUM of n independent measurements.
- noise in required
The per-measurement noise standard deviation. Currently, the noise is assumed to be normally distributed.
- n in required
The number of measurements that went into the sum
- mu in required
The per-measurement background level.
- confidence in optional
The posterior probability that the true flux is less than the reported upper limit. The default is .998650 (3-sigma, one tailed).
- plot in optional
If set, plot the posterior distribution and upper limit.
Sep 2009: Written by Chris Beaumont Sep 14 2009: Added input parameter checking. cnb.
|Modifcation date:||Mon Mar 22 16:17:13 2010|