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
4f359bef
Commit
4f359bef
authored
Jul 02, 2020
by
ssomnath
Browse files
Moving parm standardization to common area
parent
e5eac3d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
pycroscopy/io/translators/be_odf.py
View file @
4f359bef
...
...
@@ -155,23 +155,6 @@ class BEodfTranslator(Translator):
print
(
'
\t
reading parameters from text file'
)
isBEPS
,
parm_dict
=
parmsToDict
(
path_dict
[
'parm_txt'
])
# Initial text files named some parameters differently
if
parm_dict
[
'VS_mode'
]
==
'AC modulation mode'
:
warn
(
'Updating parameter "VS_mode" from invalid value'
' of "AC modulation mode" to "AC modulation mode with '
'time reversal"'
)
parm_dict
[
'VS_mode'
]
=
'AC modulation mode with time reversal'
if
parm_dict
[
'BE_phase_content'
]
==
'chirp'
:
warn
(
'Updating parameter "BE_phase_content" from older value'
' of "chirp" to "chirp-sinc hybrid"'
)
parm_dict
[
'BE_phase_content'
]
=
'chirp-sinc hybrid'
if
parm_dict
[
'BE_amplitude_[V]'
]
<
1E-2
:
new_val
=
0.5151
warn
(
'Updating parameter "BE_amplitude_[V]" from invalid value'
' of {} to {}'
.
format
(
parm_dict
[
'BE_amplitude_[V]'
],
new_val
))
parm_dict
[
'BE_amplitude_[V]'
]
=
new_val
elif
'old_mat_parms'
in
path_dict
.
keys
():
if
self
.
_verbose
:
print
(
'
\t
reading parameters from old mat file'
)
...
...
@@ -183,6 +166,23 @@ class BEodfTranslator(Translator):
else
:
raise
FileNotFoundError
(
'No parameters file found! Cannot translate this dataset!'
)
# Initial text / mat files named some parameters differently
if
parm_dict
[
'VS_mode'
]
==
'AC modulation mode'
:
warn
(
'Updating parameter "VS_mode" from invalid value'
' of "AC modulation mode" to "AC modulation mode with '
'time reversal"'
)
parm_dict
[
'VS_mode'
]
=
'AC modulation mode with time reversal'
if
parm_dict
[
'BE_phase_content'
]
==
'chirp'
:
warn
(
'Updating parameter "BE_phase_content" from older value'
' of "chirp" to "chirp-sinc hybrid"'
)
parm_dict
[
'BE_phase_content'
]
=
'chirp-sinc hybrid'
if
parm_dict
[
'BE_amplitude_[V]'
]
<
1E-2
:
new_val
=
0.5151
warn
(
'Updating parameter "BE_amplitude_[V]" from invalid value'
' of {} to {}'
.
format
(
parm_dict
[
'BE_amplitude_[V]'
],
new_val
))
parm_dict
[
'BE_amplitude_[V]'
]
=
new_val
if
self
.
_verbose
:
keys
=
list
(
parm_dict
.
keys
())
keys
.
sort
()
...
...
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