Skip to content

Commit

Permalink
Handle auxiliary signals that contain the main signal.
Browse files Browse the repository at this point in the history
Strictly, the main signal in a NXdata group should not be included in the `auxiliary_signals` attribute, but this commit handles cases where the rule is violated.
  • Loading branch information
rayosborn committed May 27, 2024
1 parent 4e624f0 commit 9abdb98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nexpy/gui/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,8 @@ def multiplot_lines(self):
self.treeview.status_message(node)
signals = [node.nxsignal]
signals.extend([node[signal] for signal
in node.attrs['auxiliary_signals']])
in node.attrs['auxiliary_signals']
if signal != node.nxsignal.nxname])
colors = get_colors(len(signals))
for i, signal in enumerate(signals):
if i == 0:
Expand All @@ -1492,6 +1493,7 @@ def multiplot_lines(self):
else:
signal.oplot(marker='None', linestyle='-',
color=colors[i])
self.plotview.ax.set_title(node.nxroot.nxname + node.nxpath)
self.plotview.otab.home()
self.plotview.legend(signal=True)
self.plotview.make_active()
Expand Down
1 change: 1 addition & 0 deletions src/nexpy/gui/treeview.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def reload(self, name):

def get_name(self, filename):
return get_name(filename, self._shell)

def get_new_name(self):
ind = []
for key in self._shell:
Expand Down

0 comments on commit 9abdb98

Please sign in to comment.