Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
037a9476
Commit
037a9476
authored
Apr 09, 2019
by
Lukas Platz
Browse files
add sugar.single_plot
parent
0b9700e9
Pipeline
#46590
passed with stages
in 8 minutes and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty5/sugar.py
View file @
037a9476
...
...
@@ -29,6 +29,7 @@ from .multi_field import MultiField
from
.operators.block_diagonal_operator
import
BlockDiagonalOperator
from
.operators.diagonal_operator
import
DiagonalOperator
from
.operators.distributors
import
PowerDistributor
from
.plot
import
Plot
__all__
=
[
'PS_field'
,
'power_analyze'
,
'create_power_operator'
,
'create_harmonic_smoothing_operator'
,
'from_random'
,
...
...
@@ -37,7 +38,7 @@ __all__ = ['PS_field', 'power_analyze', 'create_power_operator',
'sin'
,
'cos'
,
'tan'
,
'sinh'
,
'cosh'
,
'absolute'
,
'one_over'
,
'clip'
,
'sinc'
,
'conjugate'
,
'get_signal_variance'
,
'makeOp'
,
'domain_union'
,
'get_default_codomain'
]
'get_default_codomain'
,
'single_plot'
]
def
PS_field
(
pspace
,
func
):
...
...
@@ -434,3 +435,14 @@ def get_default_codomain(domainoid, space=None):
ret
=
[
dom
for
dom
in
domainoid
]
ret
[
space
]
=
domainoid
[
space
].
get_default_codomain
()
return
DomainTuple
.
make
(
ret
)
def
single_plot
(
field
,
**
kwargs
):
"""Creates a single plot using `Plot`.
Keyword arguments are passed to both `Plot.add` and `Plot.output`.
"""
p
=
Plot
()
p
.
add
(
field
,
**
kwargs
)
if
'title'
in
kwargs
:
del
(
kwargs
[
'title'
])
p
.
output
(
**
kwargs
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment