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
581024cf
Commit
581024cf
authored
Jan 14, 2019
by
Philipp Frank
Browse files
docs
parent
4069eb00
Changes
3
Hide whitespace changes
Inline
Side-by-side
nifty5/domains/log_rg_space.py
View file @
581024cf
...
...
@@ -31,8 +31,8 @@ class LogRGSpace(StructuredDomain):
shape : int or tuple of int
Number of grid points or numbers of gridpoints along each axis.
bindistances : float or tuple of float
D
istance between two grid points along each axis.
These are
measured on logarithmic scale and are constant therefore
.
Logarithmic d
istance between two grid points along each axis.
Equidistant spacing of bins on logarithmic scale is assumed
.
t_0 : float or tuple of float
Coordinate of pixel ndim*(1,).
harmonic : bool, optional
...
...
@@ -87,12 +87,34 @@ class LogRGSpace(StructuredDomain):
return
LogRGSpace
(
self
.
shape
,
codomain_bindistances
,
self
.
_t_0
,
True
)
def
get_k_length_array
(
self
):
"""Produces array of distances to origin of the space.
Returns
-------
numpy.ndarray(numpy.float64) with shape self.shape
Distances to origin of the space.
If any index of the array is zero then the distance
is np.nan if self.harmonic True.
Raises
------
NotImplementedError: if self.harmonic is False
"""
if
not
self
.
harmonic
:
raise
NotImplementedError
ks
=
self
.
get_k_array
()
return
Field
.
from_global_data
(
self
,
np
.
linalg
.
norm
(
ks
,
axis
=
0
))
def
get_k_array
(
self
):
"""Produces coordinates of the space.
Returns
-------
numpy.ndarray(numpy.float64) with shape (len(self.shape),) + self.shape
Coordinates of the space.
If one index of the array is zero the corresponding coordinate is
-np.inf (np.nan) if self.harmonic is False (True).
"""
ndim
=
len
(
self
.
shape
)
k_array
=
np
.
zeros
((
ndim
,)
+
self
.
shape
)
dist
=
self
.
bindistances
...
...
nifty5/library/dynamic_operator.py
View file @
581024cf
...
...
@@ -147,7 +147,7 @@ def dynamic_operator(domain,
Parameters
----------
domain : RGSpace
The
space under consideration
.
The
position space in which the Green's function should be constructed
.
harmonic_padding : None, int, list of int
Amount of central padding in harmonic space in pixels. If None the
field is not padded at all.
...
...
@@ -158,9 +158,9 @@ def dynamic_operator(domain,
key : String
key for dynamics encoding parameter.
causal : boolean
Whether or not the re
constructed dynamics
should be causal in time.
Whether or not the
G
re
en's function
should be causal in time.
minimum_phase: boolean
Whether or not the re
constructed dynamics
should be minimum phase.
Whether or not the
G
re
en's function
should be
a
minimum phase
filter
.
Returns
-------
...
...
@@ -197,14 +197,14 @@ def dynamic_lightcone_operator(domain,
quant
,
causal
=
True
,
minimum_phase
=
False
):
'''Constructs an operator encoding the Green's function of a linear
homogeneous dynamic system. The Green's function is constrained to be
within a light cone.
'''Extends the functionality of :function: dynamic_operator to a Green's
function which is constrained to be within a light cone.
Parameters
----------
domain : RGSpace
The space under consideration. Must have dim > 1.
The position space in which the Green's function should be constructed.
Dim > 1 required.
harmonic_padding : None, int, list of int
Amount of central padding in harmonic space in pixels. If None the
field is not padded at all.
...
...
@@ -221,18 +221,17 @@ def dynamic_lightcone_operator(domain,
quant : float
Quantization of the light cone in pixels.
causal : boolean
Whether or not the re
constructed dynamics
should be causal in time.
Whether or not the
G
re
en's function
should be causal in time.
minimum_phase: boolean
Whether or not the re
constructed dynamics
should be minimum phase.
Whether or not the
G
re
en's function
should be
a
minimum phase
filter
.
Returns
-------
Operator
The Operator encoding the dynamic Green's function in harmonic space
when evaluated.
dict
A collection of sub-chains of Operator which can be used
for plotting and evaluation.
The Operator encoding the dynamic Green's function in harmonic space.
Dictionary of Operator
A collection of sub-chains of Operator which can be used for plotting
and evaluation.
Notes
-----
...
...
nifty5/operators/slope_operator.py
View file @
581024cf
...
...
@@ -32,7 +32,7 @@ class SlopeOperator(LinearOperator):
the operator. Being a LogRGSpace each pixel has a well-defined coordinate
value.
# FIXME Say something about t0
.
y-intercept is defined to be the value at t_0 of the target
.
Parameters
----------
...
...
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