Commit 955d6828 authored by Philipp Frank's avatar Philipp Frank

adjust test

parent a054240a
...@@ -120,24 +120,32 @@ def testPointModel(space, seed): ...@@ -120,24 +120,32 @@ def testPointModel(space, seed):
ift.extra.check_value_gradient_consistency(model, pos, tol=1e-2, ntries=20) ift.extra.check_value_gradient_consistency(model, pos, tol=1e-2, ntries=20)
@pmp('domain', [ @pmp('target', [
ift.RGSpace(64, distances=.789), ift.RGSpace(64, distances=.789,harmonic=True),
ift.RGSpace([32, 32], distances=.789), ift.RGSpace([32, 32], distances=.789,harmonic=True),
ift.RGSpace([32, 32, 8], distances=.789) ift.RGSpace([32, 32, 8], distances=.789,harmonic=True)
]) ])
@pmp('causal', [True, False]) @pmp('causal', [True, False])
@pmp('minimum_phase', [True, False]) @pmp('minimum_phase', [True, False])
@pmp('seed', [4, 78, 23]) @pmp('seed', [4, 78, 23])
def testDynamicModel(domain, causal, minimum_phase, seed): def testDynamicModel(target, causal, minimum_phase, seed):
model, _ = ift.dynamic_operator( dct = {
domain, None, 1., 1., 'f', causal=causal, minimum_phase=minimum_phase) 'target': target,
'harmonic_padding': None,
'sm_s0': 3.,
'sm_x0': 1.,
'key': 'f',
'causal': causal,
'minimum_phase': minimum_phase
}
model, _ = ift.dynamic_operator(**dct)
S = ift.ScalingOperator(1., model.domain) S = ift.ScalingOperator(1., model.domain)
pos = S.draw_sample() pos = S.draw_sample()
# FIXME I dont know why smaller tol fails for 3D example # FIXME I dont know why smaller tol fails for 3D example
ift.extra.check_value_gradient_consistency(model, pos, tol=1e-5, ntries=20) ift.extra.check_value_gradient_consistency(model, pos, tol=1e-5, ntries=20)
if len(domain.shape) > 1: if len(target.shape) > 1:
dct = { dct = {
'domain': domain, 'target': target,
'harmonic_padding': None, 'harmonic_padding': None,
'sm_s0': 3., 'sm_s0': 3.,
'sm_x0': 1., 'sm_x0': 1.,
...@@ -148,6 +156,9 @@ def testDynamicModel(domain, causal, minimum_phase, seed): ...@@ -148,6 +156,9 @@ def testDynamicModel(domain, causal, minimum_phase, seed):
'causal': causal, 'causal': causal,
'minimum_phase': minimum_phase 'minimum_phase': minimum_phase
} }
dct['lightcone_key'] = 'c'
dct['sigc'] = 1.
dct['quant'] = 5
model, _ = ift.dynamic_lightcone_operator(**dct) model, _ = ift.dynamic_lightcone_operator(**dct)
S = ift.ScalingOperator(1., model.domain) S = ift.ScalingOperator(1., model.domain)
pos = S.draw_sample() pos = S.draw_sample()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment