Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vasudevan, Rama K
pycroscopy
Commits
9160f662
Commit
9160f662
authored
Dec 04, 2017
by
syz
Browse files
moved add_loop_parameters to be_viz_utils
parent
f3ecbdf3
Changes
2
Hide whitespace changes
Inline
Side-by-side
pycroscopy/viz/be_viz_utils.py
View file @
9160f662
...
...
@@ -1388,3 +1388,31 @@ def plot_loop_sho_raw_comparison(h5_loop_parameters, selected_loop_parm=None, se
widgets
.
interact
(
_update_loop_parm
,
selected_loop_parm
=
loop_parm_widget
)
widgets
.
interact
(
_update_loop_cycle
,
selected_loop_cycle
=
loop_cycle_widget
)
widgets
.
interact
(
_update_spec_step
,
selected_step
=
spec_step_widget
)
def
_add_loop_parameters
(
axes
,
switching_coef_vec
):
"""
Add the loop parameters for the given loop to a list of axes
Parameters
----------
axes : list of matplotlib.pyplo.axes
Plot axes to add the coeffients to
switching_coef_vec : 1D numpy.ndarray
Array of loop parameters arranged by position
Returns
-------
axes : list of matplotlib.pyplo.axes
"""
positions
=
np
.
linspace
(
0
,
switching_coef_vec
.
shape
[
0
]
-
1
,
len
(
axes
.
flat
),
dtype
=
np
.
int
)
for
ax
,
pos
in
zip
(
axes
.
flat
,
positions
):
ax
.
axvline
(
switching_coef_vec
[
pos
][
'V+'
],
c
=
'k'
,
label
=
'V+'
)
ax
.
axvline
(
switching_coef_vec
[
pos
][
'V-'
],
c
=
'r'
,
label
=
'V-'
)
ax
.
axvline
(
switching_coef_vec
[
pos
][
'Nucleation Bias 1'
],
c
=
'k'
,
ls
=
':'
,
label
=
'Nucleation Bias 1'
)
ax
.
axvline
(
switching_coef_vec
[
pos
][
'Nucleation Bias 2'
],
c
=
'r'
,
ls
=
':'
,
label
=
'Nucleation Bias 2'
)
ax
.
axhline
(
switching_coef_vec
[
pos
][
'R+'
],
c
=
'k'
,
ls
=
'-.'
,
label
=
'R+'
)
ax
.
axhline
(
switching_coef_vec
[
pos
][
'R-'
],
c
=
'r'
,
ls
=
'-.'
,
label
=
'R-'
)
return
axes
pycroscopy/viz/plot_utils.py
View file @
9160f662
...
...
@@ -268,34 +268,6 @@ def discrete_cmap(num_bins, base_cmap=default_cmap):
return
base_cmap
def
_add_loop_parameters
(
axes
,
switching_coef_vec
):
"""
Add the loop parameters for the given loop to a list of axes
Parameters
----------
axes : list of matplotlib.pyplo.axes
Plot axes to add the coeffients to
switching_coef_vec : 1D numpy.ndarray
Array of loop parameters arranged by position
Returns
-------
axes : list of matplotlib.pyplo.axes
"""
positions
=
np
.
linspace
(
0
,
switching_coef_vec
.
shape
[
0
]
-
1
,
len
(
axes
.
flat
),
dtype
=
np
.
int
)
for
ax
,
pos
in
zip
(
axes
.
flat
,
positions
):
ax
.
axvline
(
switching_coef_vec
[
pos
][
'V+'
],
c
=
'k'
,
label
=
'V+'
)
ax
.
axvline
(
switching_coef_vec
[
pos
][
'V-'
],
c
=
'r'
,
label
=
'V-'
)
ax
.
axvline
(
switching_coef_vec
[
pos
][
'Nucleation Bias 1'
],
c
=
'k'
,
ls
=
':'
,
label
=
'Nucleation Bias 1'
)
ax
.
axvline
(
switching_coef_vec
[
pos
][
'Nucleation Bias 2'
],
c
=
'r'
,
ls
=
':'
,
label
=
'Nucleation Bias 2'
)
ax
.
axhline
(
switching_coef_vec
[
pos
][
'R+'
],
c
=
'k'
,
ls
=
'-.'
,
label
=
'R+'
)
ax
.
axhline
(
switching_coef_vec
[
pos
][
'R-'
],
c
=
'r'
,
ls
=
'-.'
,
label
=
'R-'
)
return
axes
def
rainbow_plot
(
ax
,
ao_vec
,
ai_vec
,
num_steps
=
32
,
cmap
=
default_cmap
,
**
kwargs
):
"""
Plots the input against the output waveform (typically loops).
...
...
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