Commit b18ec7d8 authored by Philipp Arras's avatar Philipp Arras

Merge branch 'docs_lightcone' into 'NIFTy_5'

docstrings lightcone

See merge request ift/nifty-dev!205
parents ecedc71f d89d9c5d
......@@ -217,7 +217,7 @@ def dynamic_lightcone_operator(*,
'''Extends the functionality of :function: dynamic_operator to a Green's
'''Extends the functionality of :func:`dynamic_operator` to a Green's
function which is constrained to be within a light cone.
The resulting Green's function is constrained to be within a light cone.
......@@ -96,12 +96,39 @@ def _cone_arrays(c, domain, sigx, want_gradient):
class LightConeOperator(Operator):
'''Constructs a Light cone from a set of lightspeed parameters.
The resulting cone is defined as follows
.. math::
\\exp \\left(- \\frac{1}{2} \\Re \\left( \\Delta \\right)^2 \\right)
.. math::
\\Delta = \\sqrt{- \\left(t^2 - \\frac{x^\\dagger C^{-1} x}
{\\sigma_x^2} \\right)}
where t and x are the coordinates of the target space. Note that axis zero
of the space is interpreted as the time axis. C denotes the input
paramters of the operator and parametrizes the shape of the cone.
sigx is the width of the asymptotic Gaussian in x necessary for
domain : Domain, tuple of Domain or DomainTuple
The domain of the input parameters of the light cone, the values of the
lightspeed tensor.
target : Domain, tuple of Domain or DomainTuple
Output space on which the lightcone should be defined. The zeroth axis
of this space is interpreted as the time axis.
sigx : float
Width of the Gaussian for the discretized representation of the cone.
def __init__(self, domain, target, sigx):
self._domain = domain
self._target = target
self._domain = DomainTuple.make(domain)
self._target = DomainTuple.make(target)
self._sigx = sigx
def apply(self, x):
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