Skip to content
GitLab
Menu
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
fb06eff7
Commit
fb06eff7
authored
Jan 28, 2014
by
Marco Selig
Browse files
explicit 'demo_wf3.py' added.
parent
fc0ca7ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
fb06eff7
...
...
@@ -17,4 +17,5 @@ demos/*
!demos/demo_faraday_map.npy
!demos/demo_excaliwir.py
!demos/demo_wf1.py
!demos/demo_wf2.py
\ No newline at end of file
!demos/demo_wf2.py
!demos/demo_wf3.py
\ No newline at end of file
nifty_explicit.py
View file @
fb06eff7
...
...
@@ -1358,14 +1358,16 @@ class explicit_operator(operator):
interactive
=
pl
.
isinteractive
()
pl
.
matplotlib
.
interactive
(
not
bool
(
kwargs
.
get
(
"save"
,
False
)))
if
(
np
.
any
(
np
.
iscomplex
(
self
.
val
))):
X
=
self
.
get_matrix
(
bare
=
kwargs
.
get
(
"bare"
,
True
))
if
(
np
.
any
(
np
.
iscomplex
(
X
))):
about
.
infos
.
cprint
(
"INFO: absolute values and phases are plotted."
)
if
(
kwargs
.
has_key
(
"title"
)):
title
=
kwargs
.
get
(
"title"
)
+
" "
kwargs
.
__delitem__
(
"title"
)
else
:
title
=
""
self
.
get_plot
(
np
.
absolute
(
self
.
val
),
title
=
title
+
"(absolute)"
,
**
kwargs
)
self
.
get_plot
(
np
.
absolute
(
X
),
title
=
title
+
"(absolute)"
,
**
kwargs
)
if
(
kwargs
.
has_key
(
"vmin"
)):
kwargs
.
__delitem__
(
"vmin"
)
if
(
kwargs
.
has_key
(
"vmin"
)):
...
...
@@ -1376,9 +1378,9 @@ class explicit_operator(operator):
kwargs
[
"norm"
]
=
None
if
(
not
kwargs
.
has_key
(
"cmap"
)):
kwargs
[
"cmap"
]
=
pl
.
cm
.
hsv_r
self
.
get_plot
(
np
.
angle
(
self
.
val
,
deg
=
False
),
title
=
title
+
"(phase)"
,
vmin
=-
3.1416
,
vmax
=
3.1416
,
**
kwargs
)
## values in [-pi,pi]
self
.
get_plot
(
np
.
angle
(
X
,
deg
=
False
),
title
=
title
+
"(phase)"
,
vmin
=-
3.1416
,
vmax
=
3.1416
,
**
kwargs
)
## values in [-pi,pi]
else
:
self
.
get_plot
(
np
.
real
(
self
.
val
),
**
kwargs
)
self
.
get_plot
(
np
.
real
(
X
),
**
kwargs
)
pl
.
matplotlib
.
interactive
(
interactive
)
...
...
Write
Preview
Supports
Markdown
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