Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vasudevan, Rama K
pycroscopy
Commits
57803fef
Commit
57803fef
authored
Jul 02, 2020
by
ssomnath
Browse files
Attempting fix for scaling issue between spectroscopic and main dset bin numbers
parent
9ae4d419
Changes
1
Hide whitespace changes
Inline
Side-by-side
pycroscopy/io/translators/be_odf.py
View file @
57803fef
...
...
@@ -292,6 +292,24 @@ class BEodfTranslator(Translator):
'File will be padded with zeros.'
)
add_pix
=
True
# This would crash and fail later if not fixed here
# I don't like this hacky approach to solve this problem
if
isBEPS
and
tot_bins
%
1
==
0
and
parm_dict
[
'VS_mode'
]
!=
'Custom'
:
bins_per_step
=
parm_dict
[
'FORC_num_of_FORC_cycles'
]
*
\
parm_dict
[
'VS_number_of_cycles'
]
*
\
parm_dict
[
'VS_steps_per_full_cycle'
]
*
\
parm_dict
[
'BE_bins_per_read'
]
if
verbose
:
print
(
'
\t\t
Number of bins per step: calculated: {}, actual {}'
''
.
format
(
bins_per_step
,
tot_bins
))
if
bins_per_step
<
tot_bins
and
tot_bins
/
bins_per_step
%
1
==
0
:
scale
=
int
(
tot_bins
/
bins_per_step
)
warn
(
'Number of actual ({}) bins per step {}X larger than '
'calculated ({}) values. Will scale VS cycles to get '
'number of bins to match'
''
.
format
(
tot_bins
,
bins_per_step
,
scale
))
parm_dict
[
'VS_number_of_cycles'
]
*=
scale
tot_bins
=
int
(
tot_bins
)
*
tot_bins_multiplier
if
isBEPS
:
...
...
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