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
037a9476
Commit
037a9476
authored
6 years ago
by
Lukas Platz
Browse files
Options
Downloads
Patches
Plain Diff
add sugar.single_plot
parent
0b9700e9
No related branches found
No related tags found
1 merge request
!310
Single plot and cosmetics
Pipeline
#46590
passed
6 years ago
Stage: build_docker
Stage: test
Stage: demo_runs
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nifty5/sugar.py
+13
-1
13 additions, 1 deletion
nifty5/sugar.py
with
13 additions
and
1 deletion
nifty5/sugar.py
+
13
−
1
View file @
037a9476
...
@@ -29,6 +29,7 @@ from .multi_field import MultiField
...
@@ -29,6 +29,7 @@ from .multi_field import MultiField
from
.operators.block_diagonal_operator
import
BlockDiagonalOperator
from
.operators.block_diagonal_operator
import
BlockDiagonalOperator
from
.operators.diagonal_operator
import
DiagonalOperator
from
.operators.diagonal_operator
import
DiagonalOperator
from
.operators.distributors
import
PowerDistributor
from
.operators.distributors
import
PowerDistributor
from
.plot
import
Plot
__all__
=
[
'
PS_field
'
,
'
power_analyze
'
,
'
create_power_operator
'
,
__all__
=
[
'
PS_field
'
,
'
power_analyze
'
,
'
create_power_operator
'
,
'
create_harmonic_smoothing_operator
'
,
'
from_random
'
,
'
create_harmonic_smoothing_operator
'
,
'
from_random
'
,
...
@@ -37,7 +38,7 @@ __all__ = ['PS_field', 'power_analyze', 'create_power_operator',
...
@@ -37,7 +38,7 @@ __all__ = ['PS_field', 'power_analyze', 'create_power_operator',
'
sin
'
,
'
cos
'
,
'
tan
'
,
'
sinh
'
,
'
cosh
'
,
'
sin
'
,
'
cos
'
,
'
tan
'
,
'
sinh
'
,
'
cosh
'
,
'
absolute
'
,
'
one_over
'
,
'
clip
'
,
'
sinc
'
,
'
absolute
'
,
'
one_over
'
,
'
clip
'
,
'
sinc
'
,
'
conjugate
'
,
'
get_signal_variance
'
,
'
makeOp
'
,
'
domain_union
'
,
'
conjugate
'
,
'
get_signal_variance
'
,
'
makeOp
'
,
'
domain_union
'
,
'
get_default_codomain
'
]
'
get_default_codomain
'
,
'
single_plot
'
]
def
PS_field
(
pspace
,
func
):
def
PS_field
(
pspace
,
func
):
...
@@ -434,3 +435,14 @@ def get_default_codomain(domainoid, space=None):
...
@@ -434,3 +435,14 @@ def get_default_codomain(domainoid, space=None):
ret
=
[
dom
for
dom
in
domainoid
]
ret
=
[
dom
for
dom
in
domainoid
]
ret
[
space
]
=
domainoid
[
space
].
get_default_codomain
()
ret
[
space
]
=
domainoid
[
space
].
get_default_codomain
()
return
DomainTuple
.
make
(
ret
)
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
)
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