Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIFTy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
037a9476
Commit
037a9476
authored
Apr 09, 2019
by
Lukas Platz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
nifty5/sugar.py
nifty5/sugar.py
+13
-1
No files found.
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
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