Commit b68268b0 authored by Martin Reinecke's avatar Martin Reinecke

SkyModelGradientOperator -> ModelGradientOperator

parent c8cfecf6
from ..operators import MultiSkyGradientOperator
from ..operators.model_gradient_operator import ModelGradientOperator
from .model import Model
......@@ -9,9 +9,8 @@ class Constant(Model):
self._value = self._constant
self._gradient = MultiSkyGradientOperator({},
position.domain,
self.value.domain)
self._gradient = ModelGradientOperator({}, position.domain,
self.value.domain)
def at(self, position):
return self.__class__(position, self._constant)
......@@ -12,7 +12,7 @@ from .power_distributor import PowerDistributor
from .sampling_enabler import SamplingEnabler
from .sandwich_operator import SandwichOperator
from .scaling_operator import ScalingOperator
from .sky_gradient_operator import MultiSkyGradientOperator
from .model_gradient_operator import ModelGradientOperator
from .smoothness_operator import SmoothnessOperator
__all__ = ["LinearOperator", "EndomorphicOperator", "ScalingOperator",
......@@ -20,4 +20,4 @@ __all__ = ["LinearOperator", "EndomorphicOperator", "ScalingOperator",
"FFTSmoothingOperator", "GeometryRemover",
"LaplaceOperator", "SmoothnessOperator", "PowerDistributor",
"InversionEnabler", "SandwichOperator", "SamplingEnabler",
"DOFDistributor", "MultiSkyGradientOperator"]
"DOFDistributor", "ModelGradientOperator"]
from ..multi import MultiDomain, MultiField
from ..multi.multi_domain import MultiDomain
from ..multi.multi_field import MultiField
from ..sugar import full
from .linear_operator import LinearOperator
class MultiSkyGradientOperator(LinearOperator):
class ModelGradientOperator(LinearOperator):
def __init__(self, gradients, domain, target):
super(MultiSkyGradientOperator, self).__init__()
super(ModelGradientOperator, self).__init__()
self._gradients = gradients
gradients_domain = MultiField(self._gradients).domain
self._domain = MultiDomain.make(domain)
......
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