Skip to content

Commit

Permalink
Decode Axis Names (#390)
Browse files Browse the repository at this point in the history
* Decode Axis Names

* Changelog
  • Loading branch information
ksunden authored Jul 19, 2021
1 parent d356dd6 commit 2f966a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
- axes with whitespace don't necessarily fail
- Motortune Tunepoints only calculated if the checkbox is checked
- old "identity" behavior removed which caused splitting on "F" in axis names
- Decode when needed for axis dropdown in plot tab

### Added
- Widgets to control slit widths and mirror positions of monochromator
Expand Down
7 changes: 6 additions & 1 deletion yaqc_cmds/_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ def on_channels_changed(self):

def on_data_file_created(self):
with somatic._wt5.data_container as data:
allowed = [x.split("{")[0].strip() for x in data.attrs["axes"]]
try:
allowed = [x.decode().split("{")[0].strip() for x in data.attrs["axes"]]
except AttributeError:
allowed = [x.split("{")[0].strip() for x in data.attrs["axes"]]
except:
allowed = [None]
if "wa" in allowed:
allowed.remove("wa")
self.axis.set_allowed_values(allowed)
Expand Down

0 comments on commit 2f966a5

Please sign in to comment.