Esempio n. 1
0
 def printCalibFiles (self) :
     """Print the list of calibration files for this object.
     """
     print '\nprintCalibFiles(): List of clib files:'
     msg = ''
     for type in self.list_of_clib_types :
         fname = findCalibFile (self.path_to_calib_types, type, self.run)
         msg += 'Calib type: %s has file: %s\n' % (type.ljust(15), fname)
     print msg
Esempio n. 2
0
    def getCalibPars (self, type, run=None) :
        """Returns the numpy array of calibration parameters for specified type and optional run.
        """
        if run!=None : self.run = run

        if not (type in self.list_of_clib_types) :
            msg = 'WARNING: THE REQUESTED TYPE OF CALIBRATION PARS "' + type + \
                   '" IS NOT FOUND IN THE AVAILABLE LIST:\n' + str(self.list_of_clib_types)
            print msg
            return None

        fname = findCalibFile (self.path_to_calib_types, type, self.run)
        return self.loadCalibParsFromFileOrDefault (fname, type)
Esempio n. 3
0
    def loadAllCalibPars (self) :
        """Loads all calibration parameters, if the files are available or set default.
        """
        self.cpars = {}

        for type in self.list_of_clib_types :
            fname = findCalibFile (self.path_to_calib_types, type, self.run)
            #print 'Load calibpars: ', fname

            cpars_for_type = self.loadCalibParsFromFileOrDefault (fname, type)

            print 'cpars_for_type.shape = ', cpars_for_type.shape
        
            # Special case of array shapes:
            if type == 'pedestals' \
            or type == 'pixel_status' : cpars_for_type.shape = (185,388,2)

            self.cpars[type] = cpars_for_type