Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vasudevan, Rama K
pycroscopy
Commits
0e345f0f
Commit
0e345f0f
authored
Jul 02, 2020
by
ssomnath
Browse files
Throwing error if too few bins in wave
parent
b4880976
Changes
1
Hide whitespace changes
Inline
Side-by-side
pycroscopy/io/translators/df_utils/be_utils.py
View file @
0e345f0f
...
...
@@ -1146,7 +1146,7 @@ def createSpecVals(udvs_mat, spec_inds, bin_freqs, bin_wfm_type, parm_dict,
Get bins for current step based on waveform
"""
this_wave
=
np
.
where
(
bin_wfm_type
==
wave_form
[
step
])[
0
]
print
(
'
\t
'
*
6
+
'{}'
.
format
(
inSpecVals
[
step
]))
#
print('\t' * 6 + '{}'.format(inSpecVals[step]))
suffix
=
[
inSpecVals
[
step
][
0
]]
if
field_type
==
'in and out-of-field'
:
suffix
.
append
(
field
)
...
...
@@ -1159,6 +1159,8 @@ def createSpecVals(udvs_mat, spec_inds, bin_freqs, bin_wfm_type, parm_dict,
''
.
format
(
step
,
numsteps
,
suffix
))
print
(
'
\t
'
*
5
+
'this_wave of shape: {}'
''
.
format
(
this_wave
.
shape
))
if
len
(
this_wave
)
<
1
:
raise
ValueError
(
'Too few bins in this wave. Something wrong!'
)
"""
Loop over bins
"""
...
...
@@ -1176,7 +1178,7 @@ def createSpecVals(udvs_mat, spec_inds, bin_freqs, bin_wfm_type, parm_dict,
ds_spec_val_mat_2
.
append
(
col_val
)
if
verbose
and
step
==
0
and
len
(
ds_spec_val_mat_2
)
>
0
:
if
verbose
and
step
==
0
:
print
(
'
\t
'
*
5
+
'At step {} ds_spec_val_mat_2: ({}, {})'
''
.
format
(
step
,
len
(
ds_spec_val_mat_2
),
len
(
ds_spec_val_mat_2
[
0
])))
...
...
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