diff --git a/nifty5/library/smooth_linear_amplitude.py b/nifty5/library/smooth_linear_amplitude.py index 34b6ca54834af1da112bd7a030743f1710462479..5f19efb4544df88a74de14d43f3eeb7986732e1b 100644 --- a/nifty5/library/smooth_linear_amplitude.py +++ b/nifty5/library/smooth_linear_amplitude.py @@ -169,10 +169,11 @@ def SLAmplitude(*, target, n_pix, a, k0, sm, sv, im, iv, za=None, zq=None, iv : float Prior standard deviation of y-intercept of power law. za : float, optional - The alpha-parameter of the inverse-gamma distribution. - Setting the a seperate prior on the zeroGmode of the amplitude model. + Parameter of the optional zero mode prior (inverse-gamma): alpha + See :class:`InverseGammaOperator` for interpretation. zq : float, optional - The q-parameter of the inverse-gamma distribution. + Parameter of the optional zero mode prior (inverse-gamma): q + See :class:`InverseGammaOperator` for interpretation. Returns ------- @@ -192,6 +193,7 @@ def SLAmplitude(*, target, n_pix, a, k0, sm, sv, im, iv, za=None, zq=None, if za != None and zq != None: separate_zero_mode_prior = True za, zq = float(za), float(zq) + print(keys[2] + " mean: ", (zq/(1+za))) else: separate_zero_mode_prior = False if za != None or zq != None: @@ -220,14 +222,13 @@ def SLAmplitude(*, target, n_pix, a, k0, sm, sv, im, iv, za=None, zq=None, return et @ loglog_ampl.exp() else: zero_mode = ValueInserter(et.target, (0,)*len(et.target.shape)) + zero_mode = zero_mode @ InverseGammaOperator( + zero_mode.domain, za, zq) @ FieldAdapter( + zero_mode.domain, keys[2]) mask = np.ones(et.target.shape) mask[(0,)*len(et.target.shape)] = 0. mask = from_global_data(et.target, mask) mask = DiagonalOperator(mask) - zero_mode = zero_mode @ InverseGammaOperator( - zero_mode.domain, za, zq) @ FieldAdapter( - zero_mode.domain, keys[2]) - print(keys[2] + " mean: ", (zq/(1+za))) - return mask @ (et @ loglog_ampl.exp()) + zero_mode + return mask @ et @ loglog_ampl.exp() + zero_mode