### Docstring fixups

parent 2f5ab8f3
 ... ... @@ -158,7 +158,7 @@ be extracted first, then changed, and a new field has to be created from the result. Fields defined on a MultiDomain ------------------------------ ------------------------------- The :class:MultiField class can be seen as a dictionary of individual :class:Field s, each identified by a name, which is defined on a ... ... @@ -300,7 +300,7 @@ As an example one may consider the following combination of x, which is an o Basic operators ------------ --------------- # FIXME All this is outdated! Basic operator classes provided by NIFTy are ... ...
 ... ... @@ -104,6 +104,7 @@ with :math:{R} the measurement response, which maps the continous signal field This is called a free theory, as the information Hamiltonian associate professor .. math:: \mathcal{H}(d,s)= -\log \mathcal{P}(d,s)= \frac{1}{2} s^\dagger S^{-1} s + \frac{1}{2} (d-R\,s)^\dagger N^{-1} (d-R\,s) + \mathrm{const} ... ... @@ -179,23 +180,22 @@ NIFTy takes advantage of this formulation in several ways: The reconstruction of a non-Gaussian signal with unknown covarinance from a non-trivial (tomographic) response is demonstrated in demos/getting_started_3.py. Here, the uncertainty of the field and the power spectrum of its generating process are probed via posterior samples provided by the MGVI algorithm. +-------------------------------------------------+ | .. image:: images/getting_started_3_setup.png | | :width: 30 % | +-------------------------------------------------+ | .. image:: images/getting_started_3_results.png | | :width: 30 % | +-------------------------------------------------+ | Output of tomography demo getting_started_3.py. | | **Top row:** Non-Gaussian signal field, | | data backprojected into the image domain, power | | spectrum of underlying Gausssian process. | | **Bottom row:** Posterior mean field signal | | reconstruction, its uncertainty, and the power | | spectrum of the process for different posterior | | samples in comparison to the correct one (thick | | orange line). | +-------------------------------------------------+ +----------------------------------------------------+ | **Output of tomography demo getting_started_3.py** | +----------------------------------------------------+ | .. image:: images/getting_started_3_setup.png | | | +----------------------------------------------------+ | Non-Gaussian signal field, | | data backprojected into the image domain, power | | spectrum of underlying Gausssian process. | +----------------------------------------------------+ | .. image:: images/getting_started_3_results.png | | | +----------------------------------------------------+ | Posterior mean field signal | | reconstruction, its uncertainty, and the power | | spectrum of the process for different posterior | | samples in comparison to the correct one (thick | | orange line). | +----------------------------------------------------+
 ... ... @@ -111,23 +111,27 @@ def _SlopePowerSpectrum(logk_space, sm, sv, im, iv): def AmplitudeOperator(s_space, Npixdof, ceps_a, ceps_k, sm, sv, im, iv, keys=['tau', 'phi'], zero_mode=True): ''' ''' Operator for parametrizing smooth power spectra. Computes a smooth power spectrum. Output is defined on a PowerSpace. Parameters ---------- Npixdof : #pix in dof_space ceps_a, ceps_k0 : Smoothness parameters in ceps_kernel eg. ceps_kernel(k) = (a/(1+(k/k0)**2))**2 a = ceps_a, k0 = ceps_k0 sm, sv : slope_mean = expected exponent of power law (e.g. -4), slope_variance (default=1) im, iv : y-intercept_mean, y-intercept_variance of power_slope Npixdof : int #pix in dof_space ceps_a : float Smoothness parameters in ceps_kernel eg. ceps_kernel(k) = (a/(1+(k/k0)**2))**2 a = ceps_a, k0 = ceps_k0 ceps_k0 : float Smoothness parameters in ceps_kernel eg. ceps_kernel(k) = (a/(1+(k/k0)**2))**2 a = ceps_a, k0 = ceps_k0 sm : float slope_mean = expected exponent of power law (e.g. -4) sv : float slope_variance (default=1) im : float y-intercept_mean iv : float y-intercept_variance of power_slope ''' from ..operators.exp_transform import ExpTransform ... ...
 ... ... @@ -23,18 +23,18 @@ from .linear_operator import LinearOperator class DomainTupleFieldInserter(LinearOperator): def __init__(self, domain, new_space, index, position): '''Writes the content of a field into one slice of a DomainTuple. '''Writes the content of a field into one slice of a DomainTuple. Parameters ---------- domain : Domain, tuple of Domain or DomainTuple new_space : Domain, tuple of Domain or DomainTuple index : Integer Index at which new_space shall be added to domain. position : tuple Slice in new_space in which the input field shall be written into. ''' Parameters ---------- domain : Domain, tuple of Domain or DomainTuple new_space : Domain, tuple of Domain or DomainTuple index : Integer Index at which new_space shall be added to domain. position : tuple Slice in new_space in which the input field shall be written into. ''' def __init__(self, domain, new_space, index, position): self._domain = DomainTuple.make(domain) tgt = list(self.domain) tgt.insert(index, new_space) ... ...
Supports Markdown
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