Commit 77d54592 authored by Philipp Arras's avatar Philipp Arras

Fixups

parent 96bdce1d
......@@ -78,7 +78,7 @@ def test_hamiltonian_and_KL(field):
def test_bernoulli(field):
field = field.positive_tanh()
field = field.sigmoid()
space = field.domain
d = np.random.binomial(1, 0.1, size=space.shape)
d = ift.Field.from_global_data(space, d)
......
......@@ -74,7 +74,7 @@ def testBinary(type1, type2, space, seed):
model = ift.ScalingOperator(2.456, space)(select_s1*select_s2)
pos = ift.from_random("normal", dom)
ift.extra.check_value_gradient_consistency(model, pos, ntries=20)
model = ift.positive_tanh(
model = ift.sigmoid(
ift.ScalingOperator(2.456, space)(select_s1*select_s2))
pos = ift.from_random("normal", dom)
ift.extra.check_value_gradient_consistency(model, pos, ntries=20)
......@@ -91,7 +91,7 @@ def testModelLibrary(space, seed):
# Tests amplitude model and coorelated field model
Npixdof, ceps_a, ceps_k, sm, sv, im, iv = 4, 0.5, 2., 3., 1.5, 1.75, 1.3
np.random.seed(seed)
model = ift.AmplitudeModel(space, Npixdof, ceps_a, ceps_k, sm, sv, im, iv)
model = ift.AmplitudeOperator(space, Npixdof, ceps_a, ceps_k, sm, sv, im, iv)
S = ift.ScalingOperator(1., model.domain)
pos = S.draw_sample()
ift.extra.check_value_gradient_consistency(model, pos, ntries=20)
......@@ -107,6 +107,6 @@ def testPointModel(space, seed):
pos = S.draw_sample()
alpha = 1.5
q = 0.73
model = ift.InverseGammaModel(space, alpha, q)
model = ift.InverseGammaOperator(space, alpha, q)
# FIXME All those cdfs and ppfs are not very accurate
ift.extra.check_value_gradient_consistency(model, pos, tol=1e-2, ntries=20)
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