Example #1
0
    def __init__(self, ednaOutputFile):
        """
        Parse
        
        ControlInterfaceToMXCuBEv1_3_dataOutput.xml
        
        """

        self.ednaOutputFile = ednaOutputFile
        self.log = localLogger.LocalLogger("edna")
        self.log.logger.debug("Parsing edna Output File file: " +
                              self.ednaOutputFile)

        # Workaround to process old EDNA characterisation XML format
        # ControlInterfaceToMXCuBEv1_2/CCP4i/Characterisation/ControlCharacterisationv1_2_dataOutput.xml
        if self.ednaOutputFile.find('ControlCharacterisationv1_2') > 0:
            self._outputXMLContent = XSDataMXv1.XSDataCharacterisation.parseString(
                open(self.ednaOutputFile, "rb").read())
        # Workaround to read file sent by Sandor
        elif self.ednaOutputFile.find('mxv1StrategyResult') > 0:
            self._outputXMLContent = XSDataMXv1.XSDataResultStrategy.parseString(
                open(self.ednaOutputFile, "rb").read())
        else:
            self._outputXMLContent = XSDataMXCuBEv1_3.XSDataResultMXCuBE.parseString(
                open(self.ednaOutputFile, "rb").read())
        # variables
        self.subWedgesList = []  # list of dictionaries for parsed subwedges
Example #2
0
 def getParTestFile ( self, section, option, default = None ):
     """
     
     ini.getPar("BEST", "besthome")
     
     Same but tests if file exists and give complete path
     
     """
     if self.cfg.has_section ( section ):
         #print 'Has Section'
         if self.cfg.has_option ( section, option ):
             #print 'Has Option'
             value = self.cfg.get ( section, option ).strip()
         else:
             value = default
     else:
         value = default
     
     
     completeFilePath = self.testIfFileExists(value)
     
     if completeFilePath is None :
         localLogger.LocalLogger("ini").logger.error("Trying tro fetch a file that does not exist: " + value)
         return None
     else :
         return completeFilePath
Example #3
0
 def __init__(self, xdsRunFolder):
     self.xdsRunFolder = xdsRunFolder
     self.log = localLogger.LocalLogger("xds")
     self.cell = None
     self.spaceGroupNumber = None
     self.firstImage = None
     self.lastImage = None
     self.referenceDataSet = None
Example #4
0
 def __init__(self, processPath, ednaPath, keysFileName):
     self._ednaRaddoseExecutable = os.path.join(
         ednaPath,
         ini.Ini().getPar("EDNA", "edna_raddose_executable"))
     self.log = localLogger.LocalLogger("raddose")
     self._keywords = None
     self.results = None
     self.realAbsorbedDoseRate = None
     self.keysFileName = keysFileName
     self.log.logger.debug("Using raddose keywords file: " +
                           self.keysFileName)
Example #5
0
    def __init__(self, wedge):
        '''
        Constructor:

        @param wedge: wedgeHandler - the folder name contents parsed...

        '''
        self.wedge = wedge

        self.log = localLogger.LocalLogger("burntWedge")
        self.log.logger.debug("BurntWedgesHandler...")

        self.wedgeList = []
Example #6
0
    def __init__(self, x, y):
        '''
        Constructor
        '''

        self.log = localLogger.LocalLogger("fitting")

        self.discrete_x = x
        self.discrete_y = y

        self.continuous_x = None
        self.continuous_y = None

        self.function = None
        self.coefficients = None
        self.error = None
Example #7
0
    def __init__(self, wedgeFolderPath):
        '''
        Constructor
        
        Two types of wedgeFolderPath
    
        # old : /data/id23eh1/inhouse/opid231/20100930/HUM/Ricardo/Lyso1/process/xds_t4w1_run1_1
        # new : /data/id23eh1/inhouse/opid231/20101103/PROCESSED_DATA/LYS_T/xds_t3w7_run1_1
    
        '''

        self.log = localLogger.LocalLogger("wedge")

        # normalize path (just for safety...)
        if os.path.isabs(wedgeFolderPath) and os.path.exists(wedgeFolderPath):
            self.wedgeFolderPath = os.path.normpath(wedgeFolderPath)
        # if is relative path, build complete path
        elif not os.path.isabs(wedgeFolderPath) and os.path.exists(
                os.path.abspath(wedgeFolderPath)):
            self.wedgeFolderPath = os.path.abspath(wedgeFolderPath)
        else:
            self.log.logger.error("Wedge folder does not exist: " +
                                  wedgeFolderPath)
            sys.exit(-1)

        self.log.logger.debug("Parsing: " + self.wedgeFolderPath)

        #
        self.baseFolderPath = None
        self.processFolderPath = None
        self._getBaseFolderPath()
        #
        self.wedgeFolderName = None
        self.wedgeSoftware = None
        self.wedgeName = None
        self.subWedgeNumber = None
        self.wedgeRunNumber = None
        self.wedgeDatasetNumber = None
        self._parseCurrentWedgeNumber()
Example #8
0
 def __init__(self,condorRunFolder) :
     self.condorRunFolder = condorRunFolder
     self.log = localLogger.LocalLogger("condor")
Example #9
0
 def __init__(self, oarRunFolder):
     self.oarRunFolder = oarRunFolder
     self.log = localLogger.LocalLogger("oar")
Example #10
0
 def __init__(self, runFolder):
     self.runFolder = runFolder
     self.log = localLogger.LocalLogger("best")
Example #11
0
                    return 2

    except Usage, err:
        print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg)
        print >> sys.stderr, ""
        print >> sys.stderr, "For help use the -h or the --help option."
        print >> sys.stderr, ""
        return 2

    #===============================================================================
    # Fun starts here!!
    #===============================================================================

    # Mandatory initialisations!
    ini.Ini(configIniFileName)
    myLog = localLogger.LocalLogger()
    #

    if ednaFolderName is None and (wedgeFolderPath is None
                                   or wedgeFolderTemplate is None):
        myLog.logger.info("InducedRadDam v0.3")
        myLog.logger.info(
            "Both ednaFolderName and wedgeFolderPath are mandatory!")
        sys.exit(0)

    # get wedge details from the wedgeFolderPath
    wedge = wedgeHandler.WedgeHandler(wedgeFolderPath)

    wedge.buildEdnaFolderPath(ednaFolderName)

    if currentQueueItem is None:
Example #12
0
 def __init__(self):
     '''
     Constructor
     '''
     self.log = localLogger.LocalLogger("data")
     self.listOfDicts = []
Example #13
0
 def __init__(self):
     '''
     Constructor
     
     '''
     self.log = localLogger.LocalLogger("plot")