mkogg.py: Fix 'self.get_mp4_metadata(self, source)'
[blog.git] / posts / plotpick.mdwn
1 [[!meta  title="PlotPick program"]]
2 [[!meta  date="2008-10-01 23:55:03"]]
3 While calibrating my photodiodes, some of my surface bumps went out of
4 the linear-response range.  Since I'm not confident in my ability to
5 set boundaries programmatically at the moment, I thought I'd write up
6 a little utility to record clicks on key data points, so I could pick
7 out the “good data”.
8
9 Enter [[plotpick.py]] the raw-data version of [[clickloc]].  Hope you
10 like it :).  I've also written up a simple data generator
11 ([[random-data.py]]), which allows you to try out plotpick::
12
13   $ random-data.py -n 200 | plotpick.py
14
15 [[Matplotlib]] has supported the [`picker` infrastructure][picker] in
16 various guises [since `pickeps` in 2007][e26b7b9], but I only just
17 discovered it.  Before version 0.3, `plotpick.py` used a much less
18 elegant cursor implementation based on [cursor_demo.py][].
19
20 [[calibcant]], my modern cantilever calibration suite, [repositions
21 the piezo before every bump][reposition], so out-of-range bumps are no
22 longer an issue.
23
24 [picker]: http://matplotlib.org/users/event_handling.html#object-picking
25 [e26b7b9]: https://github.com/matplotlib/matplotlib/commit/e26b7b9a78785245d734e22a2cd8314dfa783c7c
26 [cursor_demo.py]: http://matplotlib.org/examples/pylab_examples/cursor_demo.html
27 [reposition]: http://git.tremily.us/?p=calibcant.git;a=commit;h=77e8244d80306dcea9ab1422cb45630a92494f85
28
29 [[!tag tags/code]]
30 [[!tag tags/linux]]
31 [[!tag tags/programming]]
32 [[!tag tags/python]]
33 [[!tag tags/theory]]