Skip to content

Commit e954e29

Browse files
committed
MNT: tweaks to x-ray examples
1 parent 86d04c5 commit e954e29

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

05-spectral/spectral.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,7 @@ def update(lo, hi):
7575

7676
ret = plot_all_chan_spectrum(spectrum, bins)
7777
plt.show()
78+
79+
80+
# Exercise (15 minutes)
81+
# - add span selector to top axes to change curve in right axes

06-xrf/xrf_interact.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def _pixel_select(self, event):
152152
x, y = event.xdata, event.ydata
153153
# get index by assuming even spacing
154154
# TODO use kdtree?
155-
diff = np.hypot((self.x_pos - x), (self.y_pos - y))
155+
diff = np.hypot((self.x_pos - x), (self.y_pos - y))
156156
y_ind, x_ind = np.unravel_index(np.argmin(diff), diff.shape)
157157

158158
# get the spectrum for this point

0 commit comments

Comments
 (0)