Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
8ab64005
"vaspparser/parser_vasprun.py" did not exist on "abf9f966b6c584c450e49b57e29ed0de022becdc"
Commit
8ab64005
authored
6 years ago
by
Philipp Arras
Browse files
Options
Downloads
Patches
Plain Diff
Cosmetics for dynamic operator
parent
1628a721
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nifty5/library/dynamic_operator.py
+72
-31
72 additions, 31 deletions
nifty5/library/dynamic_operator.py
with
72 additions
and
31 deletions
nifty5/library/dynamic_operator.py
+
72
−
31
View file @
8ab64005
...
...
@@ -30,9 +30,19 @@ from ..sugar import makeOp
from
.light_cone_operator
import
LightConeOperator
,
_field_from_function
def
_make_dynamic_operator
(
domain
,
harmonic_padding
,
sm_s0
,
sm_x0
,
keys
=
[
'
f
'
,
'
c
'
],
causal
=
True
,
cone
=
True
,
minimum_phase
=
False
,
sigc
=
3.
,
quant
=
5.
):
def
_make_dynamic_operator
(
domain
,
harmonic_padding
,
sm_s0
,
sm_x0
,
cone
,
keys
,
causal
,
minimum_phase
,
sigc
=
None
,
quant
=
None
):
if
cone
and
(
sigc
is
None
or
quant
is
None
):
raise
RuntimeError
dom
=
DomainTuple
.
make
(
domain
)
if
not
isinstance
(
dom
[
0
],
RGSpace
):
raise
TypeError
(
"
RGSpace required
"
)
...
...
@@ -106,52 +116,74 @@ def _make_dynamic_operator(domain, harmonic_padding, sm_s0, sm_x0, keys=['f', 'c
m
=
m
.
exp
()
return
m
,
ops
def
dynamic_operator
(
domain
,
harmonic_padding
,
sm_s0
,
sm_x0
,
key
,
causal
=
True
,
minimum_phase
=
False
):
'''
Constructs an operator encoding the Greens function of a linear homogeneous dynamic system.
def
dynamic_operator
(
domain
,
harmonic_padding
,
sm_s0
,
sm_x0
,
key
,
causal
=
True
,
minimum_phase
=
False
):
'''
Constructs an operator encoding the Green
'
s function of a linear
homogeneous dynamic system.
Parameters
----------
domain : RGSpace
The space under consideration
The space under consideration
.
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.
Amount of central padding in harmonic space in pixels. If None the
field is not padded at all.
sm_s0 : float
Cutoff for dynamic smoothness prior
Cutoff for dynamic smoothness prior
.
sm_x0 : float, List of float
Scaling of dynamic smoothness along each axis
Scaling of dynamic smoothness along each axis
.
key : String
key for dynamics encoding parameter.
causal : boolean
Whether or not the reconstructed dynamics should be causal in time
Whether or not the reconstructed dynamics should be causal in time
.
minimum_phase: boolean
Whether or not the reconstructed dynamics should be minimum phase
Whether or not the reconstructed dynamics should be minimum phase
.
Returns
-------
Operator
The Operator encoding the dynamic Greens function in harmonic space.
Dictionary of Operator
A collection of sub-chains of Operators which can be used for plotting and evaluation.
A collection of sub-chains of Operators which can be used for plotting
and evaluation.
Notes
-----
Currently only supports RGSpaces.
Note that the first axis of the space is interpreted as the time axis.
'''
return
_make_dynamic_operator
(
domain
,
harmonic_padding
,
sm_s0
,
sm_x0
,
keys
=
[
key
],
causal
=
causal
,
cone
=
False
,
minimum_phase
=
minimum_phase
)
def
dynamic_lightcone_operator
(
domain
,
harmonic_padding
,
sm_s0
,
sm_x0
,
key
,
lightcone_key
,
sigc
,
quant
,
causal
=
True
,
minimum_phase
=
False
):
'''
Constructs an operator encoding the Greens function of a linear
homogeneous dynamic system. The Greens function is constrained
to be within a light cone.
dct
=
{
'
domain
'
:
domain
,
'
harmonic_padding
'
:
harmonic_padding
,
'
sm_s0
'
:
sm_s0
,
'
sm_x0
'
:
sm_x0
,
'
keys
'
:
[
key
],
'
causal
'
:
causal
,
'
cone
'
:
False
,
'
minimum_phase
'
:
minimum_phase
,
}
return
_make_dynamic_operator
(
**
dct
)
def
dynamic_lightcone_operator
(
domain
,
harmonic_padding
,
sm_s0
,
sm_x0
,
key
,
lightcone_key
,
sigc
,
quant
,
causal
=
True
,
minimum_phase
=
False
):
'''
Constructs an operator encoding the Green
'
s function of a linear
homogeneous dynamic system. The Greens function is constrained to be
within a light cone.
Parameters
----------
...
...
@@ -191,10 +223,19 @@ def dynamic_lightcone_operator(domain, harmonic_padding, sm_s0, sm_x0, key,
The first axis of the space is interpreted as the time axis.
Supports only RGSpaces currently.
'''
if
len
(
domain
.
shape
)
<
2
:
raise
ValueError
(
"
Space must be at least 2 dimensional!
"
)
return
_make_dynamic_operator
(
domain
,
harmonic_padding
,
sm_s0
,
sm_x0
,
keys
=
[
key
,
lightcone_key
],
causal
=
causal
,
cone
=
True
,
minimum_phase
=
minimum_phase
,
sigc
=
sigc
,
quant
=
quant
)
dct
=
{
'
domain
'
:
domain
,
'
harmonic_padding
'
:
harmonic_padding
,
'
sm_s0
'
:
sm_s0
,
'
sm_x0
'
:
sm_x0
,
'
keys
'
:
[
key
,
lightcone_key
],
'
causal
'
:
causal
,
'
cone
'
:
True
,
'
minimum_phase
'
:
minimum_phase
,
'
sigc
'
:
sigc
,
'
quant
'
:
quant
}
return
_make_dynamic_operator
(
**
dct
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment