Commit e0bab832 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

fixes

parent dd7d3e4b
Pipeline #24452 failed with stage
in 60 minutes and 4 seconds
......@@ -77,5 +77,5 @@ if __name__ == "__main__":
proby(lambda z: HT(me2[0].curvature.inverse_times(HT.adjoint_times(z))))
sm = ift.FFTSmoothingOperator(signal_space, sigma=0.02)
variance = sm(proby.diagonal.weigHT(-1))
variance = sm(proby.diagonal.weight(-1))
ift.plot(variance, name='variance.png', **plotdict)
......@@ -11,8 +11,9 @@ NIFTy4 Tutorial
.. automodule:: nifty4
NIFTy4 enables the programming of grid and resolution independent algorithms.
In particular for signal inference algorithms, where a continuous signal field is to be recovered, this freedom is desirable.
It is achieved with an object-oriented infrastructure that comprises, among others, abstract classes for :ref:`Spaces <spaces>`, :ref:`Fields <fields>`, and :ref:`Operators <operators>`.
This freedom is particularly desirable for signal inference algorithms, where
a continuous signal field is to be recovered.
It is achieved by means of an object-oriented infrastructure that comprises, among others, abstract classes for :ref:`Domains <domains>`, :ref:`Fields <fields>`, and :ref:`Operators <operators>`.
All those are covered in this tutorial.
You should be able to import NIFTy4 like this after a successful `installation <install.html>`_.
......@@ -30,7 +31,7 @@ From such a perspective,
- IFT problems largely consist of *minimization* problems involving a large number of equations.
- The equations are built mostly from the application of *linear operators*, but there may also be nonlinear functions involved.
- The unknowns in the equations represent either continuous physical *fields*, or they are simply individual measured *data* points.
- The locations and volume elements attached to discretized *field* values are supplied by *space* objects. There are many variants of such discretized *spaces* supported by NIFTy4, including Cartesian and spherical geometries and their harmonic counterparts. *Fields* can live on arbitrary products of such *spaces*.
- The locations and volume elements attached to discretized *field* values are supplied by *domain* objects. There are many variants of such discretized *domain* supported by NIFTy4, including Cartesian and spherical geometries and their harmonic counterparts. *Fields* can live on arbitrary products of such *domains*.
In the following sections, the concepts briefly presented here will be discussed in more detail; this is done in reversed order of their introduction, to avoid forward references.
......@@ -46,44 +47,42 @@ A domain must be able to answer the following queries:
- its total number of data entries (pixels)
- the shape of the array that is supposed to hold them
- the pixel volume(s)
- the total volume
- equality/unequality to another :py:class:`DomainObject` instance
.. _spaces:
.. _domains:
Unstructured spaces
...................
Unstructured domains
....................
There are domains (e.g. the data domain) which have no geometry associated to the individual data values.
In NIFTy4 they are represented by the :py:class:`FieldArray` class, which is derived from
:py:class:`DomainObject` and simply returns 1.0 as the volume element for every pixel and the total
number of pixels as the total volume.
In NIFTy4 they are represented by the :py:class:`UnstructuredDomain` class, which is derived from
:py:class:`DomainObject`.
Structured Spaces
.................
Structured domains
..................
All domains defined on a geometrical manifold are derived from :py:class:`Space` (which is in turn derived from :py:class:`DomainObject`).
All domains defined on a geometrical manifold are derived from :py:class:`StructuredDomain` (which is in turn derived from :py:class:`DomainObject`).
In addition to the capabilities of :py:class:`DomainObject`, :py:class:`Space` offers the following functionality:
In addition to the capabilities of :py:class:`DomainObject`, :py:class:`StructuredDomain` offers the following functionality:
- methods returing the pixel volume(s) and the total volume
- a :py:attr:`harmonic` property
- (iff the space is harmonic) some methods concerned with Gaussian convolution and the absolute distances of the individual grid cells from the origin
- (iff the domain is harmonic) some methods concerned with Gaussian convolution and the absolute distances of the individual grid cells from the origin
Examples for structured spaces are
Examples for structured domains are
- :py:class:`RGSpace` (an equidistant Cartesian grid with a user-definable number of dimensions),
- :py:class:`GLSpace` (a Gauss-Legendre grid on the sphere), and
- :py:class:`LMSpace` (a grid storing spherical harmonic coefficients).
Among these, :py:class:`RGSpace` can be harmonic or not (depending on constructor arguments), :py:class:`GLSpace` is a pure position space (i.e. nonharmonic), and :py:class:`LMSpace` is always harmonic.
Among these, :py:class:`RGSpace` can be harmonic or not (depending on constructor arguments), :py:class:`GLSpace` is a pure position domain (i.e. nonharmonic), and :py:class:`LMSpace` is always harmonic.
Full domains
............
A field can live on a single space, but it can also live on a product of spaces (or no space at all, in which case it is a scalar).
The tuple of spaces on which a field lives is a called a *domain* in NIFTy terminology; it is described by a :py:class:`DomainTuple` object.
A field can live on a single domain, but it can also live on a product of domains (or no domain at all, in which case it is a scalar).
The tuple of domain on which a field lives is described by the :py:class:`DomainTuple` class.
A :py:class:`DomainTuple` object can be constructed from
- a single instance of anything derived from :py:class:`DomainTuple`
......
......@@ -36,7 +36,7 @@ class LogNormalWienerFilterEnergy(Energy):
d: Field,
the data.
R: Operator,
The response operator, describtion of the measurement process.
The response operator, description of the measurement process.
N: EndomorphicOperator,
The noise covariance in data space.
S: EndomorphicOperator,
......
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