Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
fceca91a
Commit
fceca91a
authored
Jun 28, 2018
by
Julian Ruestig
📡
Browse files
Some polishing
parent
15306505
Changes
5
Hide whitespace changes
Inline
Side-by-side
nifty5/models/constant.py
View file @
fceca91a
...
...
@@ -20,9 +20,6 @@ from .model import Model
class
Constant
(
Model
):
"""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
----------
...
...
@@ -30,6 +27,12 @@ class Constant(Model):
The current position in parameter space.
constant : Field
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
def
__init__
(
self
,
position
,
constant
):
...
...
nifty5/models/linear_model.py
View file @
fceca91a
...
...
@@ -32,11 +32,9 @@ class LinearModel(Model):
Returns
-------
Model
Model with linear Operator applied:
- Model.value = LinOp (inp.value) [key-wise]
- Gradient = LinOp * inp.gradient
Model with linear Operator applied:
- Model.value = LinOp (inp.value) [key-wise]
- Gradient = LinOp * inp.gradient
"""
from
..operators.linear_operator
import
LinearOperator
super
(
LinearModel
,
self
).
__init__
(
inp
.
position
)
...
...
nifty5/models/local_nonlinearity.py
View file @
fceca91a
...
...
@@ -27,7 +27,7 @@ class LocalModel(Model):
"""
Computes nonlinearity(inp)
- LocalModel.value = nonlinearity(value) (pointwise)
- LocalModel.gradient = Outer Product
- LocalModel.gradient = Outer Product
of gradients
Parameters
----------
...
...
nifty5/models/multi_model.py
View file @
fceca91a
...
...
@@ -23,6 +23,7 @@ from .model import Model
class
MultiModel
(
Model
):
""" """
def
__init__
(
self
,
model
,
key
):
# TODO Rewrite it such that it takes a dictionary as input. Just like MultiFields.
super
(
MultiModel
,
self
).
__init__
(
model
.
position
)
...
...
nifty5/models/variable.py
View file @
fceca91a
...
...
@@ -21,9 +21,12 @@ from .model import Model
class
Variable
(
Model
):
"""
Changes MultiField to be a Variable model.
Returns the MultiField.
"""Changes (Multi-)Field to be a Variable model.
Parameters
----------
position : Field or MultiField
The current position in parameter space.
"""
def
__init__
(
self
,
position
):
super
(
Variable
,
self
).
__init__
(
position
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment