Changeset 653 for sans/utils/bt5/bt5plot2/BT5DataSet.py
- Timestamp:
- Mar 30, 2010 5:02:35 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/utils/bt5/bt5plot2/BT5DataSet.py
r582 r653 13 13 self.alignvals = {} 14 14 self.alignvalstring = '' 15 self.scanmot = '' 15 16 16 17 if (self.fileName != None): … … 21 22 ''' 22 23 Takes a filename and returns a dictionary of the detector values 23 keyed by varying value (usu sally A2 or A5)24 ''' 25 26 if usans.isBT5Data(fileName) :24 keyed by varying value (usually A2 or A5) 25 ''' 26 27 if usans.isBT5Data(fileName) == 1: 27 28 28 29 motlist = [] … … 54 55 self.metadata['motorvals'] = motlist 55 56 57 self.scanmot = inputdata[12].split()[0] 58 56 59 for index in range(13, len(inputdata), 2): 57 60 self.detdata[float(inputdata[index].split()[0])] = inputdata[index + 1].split(',') … … 62 65 63 66 inputfile.close() 64 65 67 66 68 67 69 … … 103 105 self.alignvals['Monitor'] = self.detdata[motorval][0] 104 106 self.alignvals['Sum/Monitor'] = float(self.alignvals['Sum'])/float(self.alignvals['Monitor']) 105 106 self.alignvalstring = "#4: "+repr(self.alignvals['Central']) 107 self.alignvalstring += " Trans: "+repr(self.alignvals['Trans']) 108 self.alignvalstring += " Sum: "+repr(self.alignvals['Sum']) 109 self.alignvalstring += " MCR: "+repr(self.alignvals['Monitor']) 110 self.alignvalstring += " Sum/MCR: %5.3f" % self.alignvals['Sum/Monitor'] 107 108 self.alignvalstring = self.scanmot+": %5.2f" % motorval 109 self.alignvalstring += " #4: "+repr(self.alignvals['Central']) 110 self.alignvalstring += " Trans: "+repr(self.alignvals['Trans']) 111 self.alignvalstring += "\nSum: "+repr(self.alignvals['Sum']) 112 self.alignvalstring += " MCR: "+repr(self.alignvals['Monitor']) 113 self.alignvalstring += " Sum/MCR: %5.3f" % self.alignvals['Sum/Monitor'] 111 114 112 115 def maxDetCount(self, detector): … … 304 307 #This is frankly hideous. Surely there is a better way for me 305 308 #to iterate through the contents of self.plot 306 print self.plot307 print type(self.plot[0]).__name__309 #print self.plot 310 #print type(self.plot[0]).__name__ 308 311 #Is it a plot with errorbars? 309 312 if type(self.plot[0]) is tuple: 310 print "Split plot with errorbars"313 #print "Split plot with errorbars" 311 314 for splot in self.plot: 312 315 splot[0].remove() … … 316 319 linec.remove() 317 320 elif type(self.plot[0]).__name__ == 'Line2D' and type(self.plot[1]).__name__ == 'Line2D': 318 print "Split plot without errorbars"321 #print "Split plot without errorbars" 319 322 for splot in self.plot: 320 323 splot.remove() 321 324 elif type(self.plot[0]).__name__ == 'Line2D': 322 print "Plot with errorbars"325 #print "Plot with errorbars" 323 326 for line in self.plot[0:1]: 324 327 axes = line.get_axes()
Note: See TracChangeset
for help on using the changeset viewer.