Commit b6d9b00a authored by Philipp Arras's avatar Philipp Arras

Cleanup

parent cfeedd21
......@@ -82,7 +82,7 @@ class NoiseEnergy(Energy):
def at(self, position):
return self.__class__(
position, self.d, self.m, self.D, self.t, self.ht,
position, self.d, self.xi, self.D, self.t, self.ht,
self.Instrument, self.nonlinearity, self.alpha, self.q,
self.Projection, munit=self.munit, sunit=self.sunit,
dunit=self.dunit, xi_sample_list=self.xi_sample_list,
......
......@@ -65,8 +65,7 @@ class Energy_Tests(unittest.TestCase):
S = ift.create_power_operator(hspace, power_spectrum=lambda k: 1.)
energy0 = ift.library.WienerFilterEnergy(
position=s0, d=d, R=R, N=N, S=S, inverter=inverter)
energy1 = ift.library.WienerFilterEnergy(
position=s1, d=d, R=R, N=N, S=S, inverter=inverter)
energy1 = energy0.at(s1)
a = (energy1.value - energy0.value) / eps
b = energy0.gradient.vdot(direction)
......@@ -110,8 +109,7 @@ class Energy_Tests(unittest.TestCase):
S = ift.create_power_operator(hspace, power_spectrum=lambda k: 1.)
energy0 = ift.library.LogNormalWienerFilterEnergy(
position=sh0, d=d, R=R, N=N, S=S, inverter=inverter)
energy1 = ift.library.LogNormalWienerFilterEnergy(
position=sh1, d=d, R=R, N=N, S=S, inverter=inverter)
energy1 = energy0.at(sh1)
a = (energy1.value - energy0.value) / eps
b = energy0.gradient.vdot(direction)
......@@ -150,8 +148,7 @@ class Energy_Tests(unittest.TestCase):
S = ift.create_power_operator(hspace, power_spectrum=lambda k: 1.)
energy0 = ift.library.NonlinearWienerFilterEnergy(
position=xi0, d=d, Instrument=R, nonlinearity=f, ht=ht, power=A, N=N, S=S)
energy1 = ift.library.NonlinearWienerFilterEnergy(
position=xi1, d=d, Instrument=R, nonlinearity=f, ht=ht, power=A, N=N, S=S)
energy1 = energy0.at(xi0)
a = (energy1.value - energy0.value) / eps
b = energy0.gradient.vdot(direction)
......
......@@ -91,10 +91,7 @@ class Noise_Energy_Tests(unittest.TestCase):
position=eta0, d=d, xi=xi, D=D, t=tau, Instrument=R,
alpha=alpha, q=q, Projection=P, nonlinearity=f,
ht=ht, xi_sample_list=xi_sample_list)
energy1 = ift.library.NoiseEnergy(
position=eta1, d=d, xi=xi, D=D, t=tau, Instrument=R,
alpha=alpha, q=q, Projection=P, nonlinearity=f,
ht=ht, xi_sample_list=xi_sample_list)
energy1 = energy0.at(eta1)
a = (energy1.value - energy0.value) / eps
b = energy0.gradient.vdot(direction)
......
......@@ -77,8 +77,7 @@ class Energy_Tests(unittest.TestCase):
energy0 = ift.library.CriticalPowerEnergy(
position=tau0, m=s, inverter=inverter, w=w)
energy1 = ift.library.CriticalPowerEnergy(
position=tau1, m=s, inverter=inverter, w=w)
energy1 = energy0.at(tau1)
a = (energy1.value - energy0.value) / eps
b = energy0.gradient.vdot(direction)
......@@ -147,17 +146,7 @@ class Energy_Tests(unittest.TestCase):
ht=ht,
N=N,
xi_sample_list=xi_sample_list)
energy1 = ift.library.NonlinearPowerEnergy(
position=tau1,
d=d,
xi=xi,
D=D,
Instrument=R,
Projection=P,
nonlinearity=f,
ht=ht,
N=N,
xi_sample_list=xi_sample_list)
energy1 = energy0.at(tau1)
a = (energy1.value - energy0.value) / eps
b = energy0.gradient.vdot(direction)
......
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