barak.utilities.poisson_noise¶
- barak.utilities.poisson_noise(nflux, nsigma, seed=None)[source]¶
Adds poisson noise to a normalised flux array.
Parameters : nsigma : float
One sigma error in the flux at the continuum level (where normalised flux=1).
nflux : array of floats, shape (N,)
Normalised flux values (i.e. flux values divided by the continuum).
seed : int, optional
If given, this is used to seed the random number generator.
Returns : flux, error : arrays of floats, shape (N,)
flux with noise added and one sigma error array.