def get_noise_factor(wavelet, level, dec, beam=None): # n = (250000) n = (200, 200) background = nputils.gaussian_noise(n, 0, 1) if beam is not None: background = beam.convolve(background) return get_noise_factor_from_background(wavelet, level, dec, background)
def dec_noise_factor(dec, bg, beam=None, **kargs): if not isinstance(bg, np.ndarray): n = (200, 200) bg = nputils.gaussian_noise(n, 0, bg) if beam is not None: bg = beam.convolve(bg) scales = dec(bg, **kargs) return [scale.std() for scale in scales[:-1]]