Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
80667408
Commit
80667408
authored
Jul 02, 2018
by
Martin Reinecke
Browse files
tweaks
parent
ebb0f027
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/source/code.rst
View file @
80667408
...
@@ -13,10 +13,10 @@ recognized from a large distance, ignoring all technical details.
...
@@ -13,10 +13,10 @@ recognized from a large distance, ignoring all technical details.
From such a perspective,
From such a perspective,
- IFT problems largely consist of the combination of several high dimensional
- IFT problems largely consist of the combination of several high dimensional
*minimization* problems.
*minimization* problems.
- Within NIFTy, *models* are used to define the characteristic equations and
- Within NIFTy, *models* are used to define the characteristic equations and
properties of the problems.
properties of the problems.
- The equations are built mostly from the application of *linear operators*,
- The equations are built mostly from the application of *linear operators*,
but there may also be nonlinear functions involved.
but there may also be nonlinear functions involved.
- The unknowns in the equations represent either continuous physical *fields*,
- The unknowns in the equations represent either continuous physical *fields*,
...
@@ -238,22 +238,24 @@ Models
...
@@ -238,22 +238,24 @@ Models
======
======
Model classes (represented by NIFTy5's abstract :class:`Model` class) are used to construct
Model classes (represented by NIFTy5's abstract :class:`Model` class) are used to construct
the equations of a specific inference problem.
the equations of a specific inference problem.
Most models are defined via a position, which is a :class:`MultiField` object,
Most models are defined via a position, which is a :class:`MultiField` object,
their value at th
ese
position
s
, which is again a :class:`MultiField` object and a
j
acobian derivative,
their value at th
is
position, which is again a :class:`MultiField` object and a
J
acobian derivative,
which is a :class:`LinearOperator` and is needed for the minimization procedure.
which is a :class:`LinearOperator` and is needed for the minimization procedure.
Using the existing basic model classes one can construct more complicated models, as
Using the existing basic model classes one can construct more complicated models, as
NIFTy allows for easy and self-consinstent combination via pointwise multiplication,
NIFTy allows for easy and self-consinstent combination via point-wise multiplication,
addition and subtraction. The resulting model of these operations then automatically
addition and subtraction. The model resulting from these operations then automatically
contains the correct jacobians, positions and values.
contains the correct Jacobians, positions and values.
Notably, :class:`Constant` and :class:`Variable` allows for an easy way to turn on and off the
Notably, :class:`Constant` and :class:`Variable` allow for an easy way to turn
inference of specific quantities.
inference of specific quantities on and off.
The basic model classes also allow for more complex operations on models such as
The basic model classes also allow for more complex operations on models such as
the application of :class:`LinearOperators` or local non-linearities.
the application of :class:`LinearOperators` or local non-linearities.
As an example one may consider the following combination of ``x``, which is a model of type
As an example one may consider the following combination of ``x``, which is a model of type
:class:`Variable` and ``y``, which is a model of type :class:`Constant`::
:class:`Variable` and ``y``, which is a model of type :class:`Constant`::
z = x*x + y
z = x*x + y
``z`` will then be a model with position::
``z`` will then be a model with position::
...
@@ -263,27 +265,27 @@ As an example one may consider the following combination of ``x``, which is a mo
...
@@ -263,27 +265,27 @@ As an example one may consider the following combination of ``x``, which is a mo
Basic models
Basic models
------------
------------
Basic model classes provided by NIFTy are
Basic model classes provided by NIFTy are
- :class:`Constant` contains a constant value and has a zero valued
j
acobian.
- :class:`Constant` contains a constant value and has a zero valued
J
acobian.
I
t has
no
position
(?currently it still has one?), as the value is the same everywhere
.
Like other models, i
t has
a
position
, but its value does not depend on it
.
- :class:`Variable` returns the position as its value, its derivative is one.
- :class:`Variable` returns the position as its value, its derivative is one.
- :class:`LinearModel` applies a :class:`LinearOperator` on the model.
- :class:`LinearModel` applies a :class:`LinearOperator` on the model.
- :class:`LocalModel` applies a non-linearity locally on the model.
- :class:`LocalModel` applies a non-linearity locally on the model.
- :class:`MultiModel` combines various models into one. In this case the position,
- :class:`MultiModel` combines various models into one. In this case the position,
value and
j
acobian
get
combined into corresponding :class:`MultiField
s
` and operators.
value and
J
acobian
are
combined into corresponding :class:`MultiField`
s
and operators.
Advanced models
Advanced models
---------------
---------------
NIFTy also provides a library of more sophisticated models which are used for more
NIFTy also provides a library of more sophisticated models which are used for more
specific inference problems. Currently these are:
specific inference problems. Currently these are:
- :class:'AmplitudeModel', which returns a smooth power spectrum.
- :class:'AmplitudeModel', which returns a smooth power spectrum.
- :class:'PointModel', which models point
s
sources which follow a inverse gamma distribution.
- :class:'PointModel', which models point sources which follow a inverse gamma distribution.
- :class:'SmoothSkyModel', which models a diffuse lognormal field. It takes an amplitude model
- :class:'SmoothSkyModel', which models a diffuse lognormal field. It takes an amplitude model
to specify the correlation structure of the field.
to specify the correlation structure of the field.
...
...
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