In the course of my research, I've spend a good deal of time developing clean, Python interfaces to much of our lab equipment. I also tend to have strong opinions on the One True Way® to solve a problem. This means that I occasionaly end up writing script to run other people's experiment, especially when they don't take all that much time to write.

I wrote slow_bend for Liming Zhao, who was a postdoc in our lab from 2008 to 2010. Liming coated one side of an AFM cantilever with a film of cellulose and used slow bend.py (version 0.2) to monitor the cantilever deflection as he flushed in different buffers (paper). Unfortunately, the paper claims the data aquisition was carried out in LabView.

slow_bend is not a complicated program; it polls analog input channels using pycomedi (and optionally reads temperatures using backends from pypid). The polling continues until slow_bend recieves a KeyboardInterrupt.

$ slow_bend.py --version
0.4
$ slow_bend.py 0 3
#time (second)  chan 0 (bit)    chan 0 (volt)   chan 3 (bit)    chan 3 (volt)
1.81198e-05 34727   0.598001    39679   2.10925
4.00409 34956   0.667887    38033   1.60693
8.00408 35074   0.703899    36780   1.22454
12.0041 35041   0.693828    35814   0.929732
16.0041 34917   0.655985    35044   0.694743
^C