Noise#

class popkinmocks.noise.ConstantSNR(component)#
get_noisy_data(**kwargs)#

yobs(x,w) = ybar(x,w) + eps(x,w)

get_sigma(snr=100.0)#

sigma(x,w) = ybar(x,w)/snr

Parameters:

snr – the desired constant signal-to-noise ratio

sample(**kwargs)#

eps(x,w) ~ Norm(0 , sigma(x,w))

Parameters:

snr – the desired signal-to-noise ratio

class popkinmocks.noise.ShotNoise(component)#
get_noisy_data(**kwargs)#

yobs(x,w) = ybar(x,w) + eps(x,w)

get_sigma(snr=100.0)#

sigma(x,w) = K ybar(x,w)^(1/2)

Proportionality constant K chosen so that brightest pixel has desired snr i.e. you set the maximum snr

Parameters:

snr – the desired maximum signal-to-noise ratio in a pixel

sample(**kwargs)#

eps(x,w) ~ Norm(0 , sigma(x,w))

Parameters:

snr – the desired signal-to-noise ratio