Commit 573a6f5e authored by Julian Ruestig's avatar Julian Ruestig 📡

add docu at local_nonlinearity, suggestion at model.py

parent 9286f40a
......@@ -20,8 +20,11 @@ from .model import Model
class Constant(Model):
"""A sky model with a constant 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
----------
position : Field or MultiField
......@@ -29,7 +32,6 @@ class Constant(Model):
constant : Field
The value of the model.
"""
# TODO Remove position
def __init__(self, position, constant):
super(Constant, self).__init__(position)
......
......@@ -26,6 +26,15 @@ class LocalModel(Model):
def __init__(self, inp, nonlinearity):
"""
Computes nonlinearity(inp)
- LocalModel.value = nonlinearity(value) (pointwise)
- LocalModel.gradient = Outer Product
Parameters
----------
inp : Model
The model for which the nonlinarity will be applied.
nonlinearity: Function
The nonlinearity to be applied to model.
"""
super(LocalModel, self).__init__(inp.position)
self._inp = inp
......
......@@ -40,6 +40,8 @@ class Model(NiftyMetaBase()):
Model
Model object at new position.
"""
# Maybe this is correct ??
# return self.__init__(position)
raise NotImplementedError
@property
......
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