Ignore:
Timestamp:
Mar 30, 2010 5:02:35 PM (13 years ago)
Author:
ajj
Message:

Various fixes. Remove some debug output, display motor value on click.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/utils/bt5/bt5plot2/BT5DataSet.py

    r582 r653  
    1313        self.alignvals = {} 
    1414        self.alignvalstring = '' 
     15        self.scanmot = '' 
    1516 
    1617        if (self.fileName != None): 
     
    2122        ''' 
    2223        Takes a filename and returns a dictionary of the detector values 
    23         keyed by varying value (ususally 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: 
    2728     
    2829            motlist = [] 
     
    5455            self.metadata['motorvals'] = motlist 
    5556         
     57            self.scanmot = inputdata[12].split()[0] 
     58         
    5659            for index in range(13, len(inputdata), 2): 
    5760                self.detdata[float(inputdata[index].split()[0])] = inputdata[index + 1].split(',')     
     
    6265     
    6366            inputfile.close() 
    64  
    65  
     67                     
    6668     
    6769     
     
    103105        self.alignvals['Monitor'] = self.detdata[motorval][0] 
    104106        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'] 
    111114     
    112115    def maxDetCount(self, detector): 
     
    304307        #This is frankly hideous. Surely there is a better way for me  
    305308        #to iterate through the contents of self.plot 
    306         print self.plot 
    307         print type(self.plot[0]).__name__ 
     309        #print self.plot 
     310        #print type(self.plot[0]).__name__ 
    308311        #Is it a plot with errorbars? 
    309312        if type(self.plot[0]) is tuple: 
    310             print "Split plot with errorbars" 
     313            #print "Split plot with errorbars" 
    311314            for splot in self.plot: 
    312315                splot[0].remove() 
     
    316319                    linec.remove() 
    317320        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" 
    319322            for splot in self.plot: 
    320323                splot.remove() 
    321324        elif type(self.plot[0]).__name__ == 'Line2D': 
    322             print "Plot with errorbars" 
     325            #print "Plot with errorbars" 
    323326            for line in self.plot[0:1]: 
    324327                axes = line.get_axes() 
Note: See TracChangeset for help on using the changeset viewer.