Ejemplo n.º 1
0
    def __init__(self):
        """Takes in the file name of a file created by the NI temperature
        logger program and generates a Temp_log object."""

        

        self.units = None
        
        self.temp_collection = SortedCollection([],lambda x:x[0])
Ejemplo n.º 2
0
    def addFile(self,fname):
        """Adds the data from a file to this log """
        (tmp,units) = self._parseFile(fname)
        if (self.units is not None) and (units != self.units):
            print units
            print self.units
            raise Exception('units must match')

        tmp.extend(self.temp_collection._items)
        
        self.temp_collection = SortedCollection(tmp,self.temp_collection._getkey())