Commit fceca91a authored by Julian Ruestig's avatar Julian Ruestig 📡
Browse files

Some polishing

parent 15306505
...@@ -20,9 +20,6 @@ from .model import Model ...@@ -20,9 +20,6 @@ from .model import Model
class Constant(Model): class Constant(Model):
"""A sky model with a constant (multi-)field as value. """A sky model with a constant (multi-)field as value.
Since there is no model-function associated:
- Position has no influence on value.
- There is no gradient.
Parameters Parameters
---------- ----------
...@@ -30,6 +27,12 @@ class Constant(Model): ...@@ -30,6 +27,12 @@ class Constant(Model):
The current position in parameter space. The current position in parameter space.
constant : Field constant : Field
The value of the model. The value of the model.
Note
----
Since there is no model-function associated:
- Position has no influence on value.
- There is no gradient.
""" """
# TODO Remove position # TODO Remove position
def __init__(self, position, constant): def __init__(self, position, constant):
......
...@@ -32,11 +32,9 @@ class LinearModel(Model): ...@@ -32,11 +32,9 @@ class LinearModel(Model):
Returns Returns
------- -------
Model Model with linear Operator applied:
Model with linear Operator applied: - Model.value = LinOp (inp.value) [key-wise]
- Model.value = LinOp (inp.value) [key-wise] - Gradient = LinOp * inp.gradient
- Gradient = LinOp * inp.gradient
""" """
from ..operators.linear_operator import LinearOperator from ..operators.linear_operator import LinearOperator
super(LinearModel, self).__init__(inp.position) super(LinearModel, self).__init__(inp.position)
......
...@@ -27,7 +27,7 @@ class LocalModel(Model): ...@@ -27,7 +27,7 @@ class LocalModel(Model):
""" """
Computes nonlinearity(inp) Computes nonlinearity(inp)
- LocalModel.value = nonlinearity(value) (pointwise) - LocalModel.value = nonlinearity(value) (pointwise)
- LocalModel.gradient = Outer Product - LocalModel.gradient = Outer Product of gradients
Parameters Parameters
---------- ----------
......
...@@ -23,6 +23,7 @@ from .model import Model ...@@ -23,6 +23,7 @@ from .model import Model
class MultiModel(Model): class MultiModel(Model):
""" """
def __init__(self, model, key): def __init__(self, model, key):
# TODO Rewrite it such that it takes a dictionary as input. Just like MultiFields. # TODO Rewrite it such that it takes a dictionary as input. Just like MultiFields.
super(MultiModel, self).__init__(model.position) super(MultiModel, self).__init__(model.position)
......
...@@ -21,9 +21,12 @@ from .model import Model ...@@ -21,9 +21,12 @@ from .model import Model
class Variable(Model): class Variable(Model):
""" """Changes (Multi-)Field to be a Variable model.
Changes MultiField to be a Variable model.
Returns the MultiField. Parameters
----------
position : Field or MultiField
The current position in parameter space.
""" """
def __init__(self, position): def __init__(self, position):
super(Variable, self).__init__(position) super(Variable, self).__init__(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