Commit 0c50175d authored by Martin Reinecke's avatar Martin Reinecke

Merge branch 'master' into index_games2

parents 8639904b 2cc60994
Pipeline #14808 passed with stage
in 8 minutes and 28 seconds
from nifty import * from nifty import *
from nifty.library.wiener_filter import WienerFilterEnergy from nifty.library.wiener_filter import WienerFilterEnergy
from nifty.library.critical_filter import CriticalPowerEnergy from nifty.library.critical_filter import CriticalPowerEnergy
...@@ -111,7 +110,7 @@ if __name__ == "__main__": ...@@ -111,7 +110,7 @@ if __name__ == "__main__":
print (x, iteration) print (x, iteration)
minimizer1 = RelaxedNewton(convergence_tolerance=10e-2, minimizer1 = RelaxedNewton(convergence_tolerance=1e-2,
convergence_level=2, convergence_level=2,
iteration_limit=3, iteration_limit=3,
callback=convergence_measure) callback=convergence_measure)
...@@ -122,7 +121,7 @@ if __name__ == "__main__": ...@@ -122,7 +121,7 @@ if __name__ == "__main__":
max_history_length=3) max_history_length=3)
# Setting starting position # Setting starting position
flat_power = Field(p_space,val=10e-8) flat_power = Field(p_space,val=1e-8)
m0 = flat_power.power_synthesize(real_signal=True) m0 = flat_power.power_synthesize(real_signal=True)
t0 = Field(p_space, val=log(1./(1+p_space.kindex)**2)) t0 = Field(p_space, val=log(1./(1+p_space.kindex)**2))
...@@ -134,7 +133,7 @@ if __name__ == "__main__": ...@@ -134,7 +133,7 @@ if __name__ == "__main__":
distribution_strategy=distribution_strategy) distribution_strategy=distribution_strategy)
# Initializing the nonlinear Wiener Filter energy # Initializing the nonlinear Wiener Filter energy
map_energy = WienerFilterEnergy(position=m0, d=d, R=R, N=N, S=S0, inverter=inverter) map_energy = WienerFilterEnergy(position=m0, d=d, R=R, N=N, S=S0)
# Solving the Wiener Filter analytically # Solving the Wiener Filter analytically
D0 = map_energy.curvature D0 = map_energy.curvature
m0 = D0.inverse_times(j) m0 = D0.inverse_times(j)
......
from nifty import * from nifty import *
import plotly.offline as pl import plotly.offline as pl
import plotly.graph_objs as go import plotly.graph_objs as go
from nifty.library.wiener_filter import *
from mpi4py import MPI from mpi4py import MPI
comm = MPI.COMM_WORLD comm = MPI.COMM_WORLD
...@@ -103,7 +103,7 @@ if __name__ == "__main__": ...@@ -103,7 +103,7 @@ if __name__ == "__main__":
# #
inverter = ConjugateGradient(convergence_level=3, inverter = ConjugateGradient(convergence_level=3,
convergence_tolerance=10e-5, convergence_tolerance=1e-5,
preconditioner=None) preconditioner=None)
# Setting starting position # Setting starting position
m0 = Field(h_space, val=.0) m0 = Field(h_space, val=.0)
......
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