Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycroscopy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vasudevan, Rama K.
pycroscopy
Commits
580acb30
Commit
580acb30
authored
7 years ago
by
Chris Smith
Browse files
Options
Downloads
Patches
Plain Diff
visualize_sho_results bugfix
Use the new get_attr in function
parent
1bb6b0e8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pycroscopy/viz/be_viz_utils.py
+3
-3
3 additions, 3 deletions
pycroscopy/viz/be_viz_utils.py
with
3 additions
and
3 deletions
pycroscopy/viz/be_viz_utils.py
+
3
−
3
View file @
580acb30
...
...
@@ -57,7 +57,7 @@ def visualize_sho_results(h5_main, save_plots=True, show_plots=True):
h5_file
=
h5_main
.
file
expt_type
=
h5_file
.
attrs
[
'
data_type
'
]
expt_type
=
get_attr
(
h5_file
,
'
data_type
'
)
if
expt_type
not
in
[
'
BEPSData
'
,
'
BELineData
'
]:
warn
(
'
Unsupported data format
'
)
return
...
...
@@ -74,7 +74,7 @@ def visualize_sho_results(h5_main, save_plots=True, show_plots=True):
grp_name
=
'
_
'
.
join
([
grp_name
,
sho_grp
.
name
.
split
(
'
/
'
)[
-
1
].
split
(
'
-
'
)[
0
],
h5_main
.
name
.
split
(
'
/
'
)[
-
1
]])
try
:
h5_pos
=
h5_file
[
h5_main
.
attrs
[
'
Position_Indices
'
]
]
h5_pos
=
h5_file
[
get_attr
(
h5_main
,
'
Position_Indices
'
)
]
except
KeyError
:
print
(
'
No Position_Indices found as attribute of {}
'
.
format
(
h5_main
.
name
))
print
(
'
Rows and columns will be calculated from dataset shape.
'
)
...
...
@@ -85,7 +85,7 @@ def visualize_sho_results(h5_main, save_plots=True, show_plots=True):
num_cols
=
len
(
np
.
unique
(
h5_pos
[:,
1
]))
try
:
h5_spec_vals
=
h5_file
[
h5_main
.
attrs
[
'
Spectroscopic_Values
'
]
]
h5_spec_vals
=
h5_file
[
get_attr
(
h5_main
,
'
Spectroscopic_Values
'
)
]
# except KeyError:
# warn('No Spectrosocpic Datasets found as attribute of {}'.format(h5_main.name))
# raise
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment