Commit ecdcd3a6 authored by Philipp Arras's avatar Philipp Arras
Browse files

Renaming and cleanup

parent 694ca42a
Pipeline #30796 passed with stages
in 1 minute and 28 seconds
...@@ -43,7 +43,7 @@ D_inv_1 = ift.SamplingEnabler(ift.SandwichOperator.make(R_p, N.inverse), ...@@ -43,7 +43,7 @@ D_inv_1 = ift.SamplingEnabler(ift.SandwichOperator.make(R_p, N.inverse),
D_inv_1 = ift.InversionEnabler(D_inv_1, inverter) D_inv_1 = ift.InversionEnabler(D_inv_1, inverter)
D_inv_2 = ift.SamplingEnabler2(D_inv, sampling_inverter) D_inv_2 = ift.GreedySamplingEnabler(D_inv, sampling_inverter)
# GOOD # GOOD
samps_1 = [D_inv_1.draw_sample(from_inverse=True) for i in range(N_samps)] samps_1 = [D_inv_1.draw_sample(from_inverse=True) for i in range(N_samps)]
......
...@@ -12,11 +12,11 @@ from .power_distributor import PowerDistributor ...@@ -12,11 +12,11 @@ from .power_distributor import PowerDistributor
from .inversion_enabler import InversionEnabler from .inversion_enabler import InversionEnabler
from .sandwich_operator import SandwichOperator from .sandwich_operator import SandwichOperator
from .sampling_enabler import SamplingEnabler from .sampling_enabler import SamplingEnabler
from .sampling_enabler2 import SamplingEnabler2 from .sampling_enabler_greedy import GreedySamplingEnabler
__all__ = ["LinearOperator", "EndomorphicOperator", "ScalingOperator", __all__ = ["LinearOperator", "EndomorphicOperator", "ScalingOperator",
"DiagonalOperator", "HarmonicTransformOperator", "FFTOperator", "DiagonalOperator", "HarmonicTransformOperator", "FFTOperator",
"FFTSmoothingOperator", "GeometryRemover", "FFTSmoothingOperator", "GeometryRemover",
"LaplaceOperator", "SmoothnessOperator", "PowerDistributor", "LaplaceOperator", "SmoothnessOperator", "PowerDistributor",
"InversionEnabler", "SandwichOperator", "SamplingEnabler", "InversionEnabler", "SandwichOperator", "SamplingEnabler",
"SamplingEnabler2"] "GreedySamplingEnabler"]
...@@ -16,11 +16,10 @@ ...@@ -16,11 +16,10 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik # NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes. # and financially supported by the Studienstiftung des deutschen Volkes.
import numpy as np
from ..minimization.quadratic_energy import QuadraticEnergy from ..minimization.quadratic_energy import QuadraticEnergy
from ..minimization.iteration_controller import IterationController
from ..logger import logger
from .endomorphic_operator import EndomorphicOperator from .endomorphic_operator import EndomorphicOperator
import numpy as np
class SamplingEnabler(EndomorphicOperator): class SamplingEnabler(EndomorphicOperator):
......
...@@ -16,15 +16,13 @@ ...@@ -16,15 +16,13 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik # NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes. # and financially supported by the Studienstiftung des deutschen Volkes.
from ..minimization.quadratic_energy import QuadraticEnergy import numpy as np
from ..minimization.iteration_controller import IterationController
from ..logger import logger
from .endomorphic_operator import EndomorphicOperator from .endomorphic_operator import EndomorphicOperator
from .inversion_enabler import InversionEnabler from .inversion_enabler import InversionEnabler
import numpy as np
class SamplingEnabler2(EndomorphicOperator): class GreedySamplingEnabler(EndomorphicOperator):
"""Class which augments the capability of another operator object via """Class which augments the capability of another operator object via
numerical inversion. numerical inversion.
...@@ -46,7 +44,7 @@ class SamplingEnabler2(EndomorphicOperator): ...@@ -46,7 +44,7 @@ class SamplingEnabler2(EndomorphicOperator):
""" """
def __init__(self, op, sampling_inverter, approximation=None): def __init__(self, op, sampling_inverter, approximation=None):
super(SamplingEnabler2, self).__init__() super(GreedySamplingEnabler, self).__init__()
self._op = op self._op = op
self._sampling_op = InversionEnabler(op, sampling_inverter, self._sampling_op = InversionEnabler(op, sampling_inverter,
approximation=approximation) approximation=approximation)
......
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