diff --git a/test/test_operators/test_correlated_fields.py b/test/test_operators/test_correlated_fields.py index 12f3008cc9c82b44d2e4ed4cd2b0ea8984b0b3de..f0a0192393cf34ebf0c5192d2240e81e6bb196ad 100644 --- a/test/test_operators/test_correlated_fields.py +++ b/test/test_operators/test_correlated_fields.py @@ -52,7 +52,11 @@ def testAmplitudesInvariants(sspace, N): 'freq', dofdex=dofdex3) op = fa.finalize() - samples = [ift.from_random(op.domain, 'normal') for _ in range(100)] + for ampl in fa.normalized_amplitudes: + ift.extra.check_jacobian_consistency(ampl, ift.from_random(ampl.domain), + ntries=10) + + samples = [ift.from_random(op.domain) for _ in range(100)] tot_flm, _ = _stats(fa.total_fluctuation, samples) offset_amp_std, _ = _stats(fa.amplitude_total_offset, samples) intergated_fluct_std0, _ = _stats(fa.average_fluctuation(0), samples) diff --git a/test/test_operators/test_jacobian.py b/test/test_operators/test_jacobian.py index 4369560bb21a01869daed1120199937fd3fc092f..421b87593a1a357df81b52db43365040a577a608 100644 --- a/test/test_operators/test_jacobian.py +++ b/test/test_operators/test_jacobian.py @@ -161,3 +161,10 @@ def testNormalization(h_space, specialbinbounds, logarithmic, nbin): op = ift.library.correlated_fields._Normalization(dom) pos = 0.1 * ift.from_random(op.domain, 'normal') ift.extra.check_jacobian_consistency(op, pos, ntries=10) + + +@pmp('N', [1, 3]) +def testMomentMatchingJacobian(N): + op = ift.library.correlated_fields._LognormalMomentMatching(1, 0.2, '', N) + ift.extra.check_jacobian_consistency(op, ift.from_random(op.domain), + ntries=10)