Commit 75d8fd5b authored by Martin Reinecke's avatar Martin Reinecke
Browse files

cosmetics

parent cb30efb6
Pipeline #24973 passed with stage
in 6 minutes and 44 seconds
...@@ -70,7 +70,7 @@ if __name__ == "__main__": ...@@ -70,7 +70,7 @@ if __name__ == "__main__":
# Generate plots # Generate plots
zmax = max(ht(sh).max(), ht(m).max()) zmax = max(ht(sh).max(), ht(m).max())
zmin = min(ht(sh).min(), ht(m).min()) zmin = min(ht(sh).min(), ht(m).min())
plotdict = {"zmax": zmax, "zmin": zmin,"colormap": "Planck-like"} plotdict = {"zmax": zmax, "zmin": zmin, "colormap": "Planck-like"}
plotdict2 = {"colormap": "Planck-like"} plotdict2 = {"colormap": "Planck-like"}
ift.plot(ht(sh), name="mock_signal.png", **plotdict) ift.plot(ht(sh), name="mock_signal.png", **plotdict)
ift.plot(ht(m), name="reconstruction.png", **plotdict) ift.plot(ht(m), name="reconstruction.png", **plotdict)
......
...@@ -20,12 +20,12 @@ from ..operators.inversion_enabler import InversionEnabler ...@@ -20,12 +20,12 @@ from ..operators.inversion_enabler import InversionEnabler
from .response_operators import LinearizedPowerResponse from .response_operators import LinearizedPowerResponse
def NonlinearPowerCurvature(tau, ht, Instrument, nonlinearity, Projection, N, def NonlinearPowerCurvature(tau, ht, Instrument, nonlinearity, Distribution, N,
T, xi_sample_list, inverter): T, xi_sample_list, inverter):
result = None result = None
for xi_sample in xi_sample_list: for xi_sample in xi_sample_list:
LinearizedResponse = LinearizedPowerResponse( LinearizedResponse = LinearizedPowerResponse(
Instrument, nonlinearity, ht, Projection, tau, xi_sample) Instrument, nonlinearity, ht, Distribution, tau, xi_sample)
op = LinearizedResponse.adjoint*N.inverse*LinearizedResponse op = LinearizedResponse.adjoint*N.inverse*LinearizedResponse
result = op if result is None else result + op result = op if result is None else result + op
result = result*(1./len(xi_sample_list)) + T result = result*(1./len(xi_sample_list)) + T
......
...@@ -24,7 +24,7 @@ def LinearizedSignalResponse(Instrument, nonlinearity, ht, power, m): ...@@ -24,7 +24,7 @@ def LinearizedSignalResponse(Instrument, nonlinearity, ht, power, m):
def LinearizedPowerResponse(Instrument, nonlinearity, ht, Distribution, tau, def LinearizedPowerResponse(Instrument, nonlinearity, ht, Distribution, tau,
xi): xi):
power = exp(0.5*tau) power = exp(0.5*tau)
position = ht(Distribution(power)*xi) position = ht(Distribution(power)*xi)
linearization = nonlinearity.derivative(position) linearization = nonlinearity.derivative(position)
......
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