1 In [31]: for i in range(10) :
2 for nmPsRate in rates :
3 u.unfold(nmPsRate=nmPsRate, rel_setpoint=1, nmDist=800, sBindTime=4)
9 0.846952010376 <type 'float'>
10 0.846952010376 <type 'float'>
11 None <type 'NoneType'>
12 ---------------------------------------------------------------------------
13 <type 'exceptions.TypeError'> Traceback (most recent call last)
15 /thor/mroman/<ipython console> in <module>()
17 /home/wking/.python/unfold.py in unfold(self, setpoint, rel_setpoint, sBindTime, nmDist, nmStep, ppStep, nmPsRate, dataDirectory, fileID)
18 116 except ExceptionTooFar :
19 117 try : # try for a useful surface distance...
20 --> 118 surfPos = self.getSurfPos(setpoint)
21 119 print "Too far (surface at %g nm), stepping closer" % surfPos
22 120 except z_piezo_utils.poorFit, string : # ... oh well, print what we know
24 /home/wking/.python/unfold.py in getSurfPos(self, setpoint, textVerbose, plotVerbose)
26 267 def getSurfPos(self, setpoint=2, textVerbose=False, plotVerbose=False) :
27 --> 268 return self.zp.pos_out2nm(z_piezo_utils.getSurfPos(self.zp, self.zp.def_V2in(setpoint), textVerbose, plotVerbose))
28 269 def curDef(self) :
29 270 self.zp.updateInputs()
31 /home/wking/.python/z_piezo.py in def_V2in(self, physical)
32 139 def def_V2in(self, physical) :
33 140 print physical, type(physical) # temporary debugging printout
34 --> 141 return self._jump.phys_to_out(physical)
35 142 def curVals(self) :
36 143 return {'Z piezo output': self.curPos(),
38 /home/wking/.python/z_piezo.py in phys_to_out(self, physical)
39 254 return self.AO.comedi_to_phys(0, output)
40 255 def phys_to_out(self, physical) :
41 --> 256 return self.AO.phys_to_comedi(0, physical)
43 258 class _z_piezo_ramp :
45 /thor/wking/lib/python2.5/site-packages/pycomedi-0.1-py2.5.egg/pycomedi/common.py in phys_to_comedi(self, chan_index, phys)
47 363 def phys_to_comedi(self, chan_index, phys) :
48 --> 364 comedi = self._comedi.comedi_from_phys(phys, self._comedi_range[chan_index], self.maxdata[chan_index])
50 366 print "%g Volts = comedi %d on subdev %d, chan %d, range [%g, %g], max %d" % (phys, comedi, self.subdev, self.chan[chan_index], self._comedi_range[chan_index].max, self._comedi_range[chan_index].min, self.maxdata[chan_index])
52 <type 'exceptions.TypeError'>: in method 'comedi_from_phys', argument 1 of type 'double'