Exemple #1
0
    def start(self):

        if self.params['reconid'] is not None:
            self.recondata = apRecon.getRefineRunDataFromID(
                self.params['reconid'])
            print "Associated with", self.recondata[
                'name'], ":", self.recondata['path']
        if self.params['fulltomoid'] is not None:
            self.tomodata = apTomo.getFullTomoData(self.params['fulltomoid'])
            print "Associated with", self.tomodata['name'], ":", self.tomodata[
                'path']['path']
        if self.params['sessionname'] is not None:
            self.sessiondata = apDatabase.getSessionDataFromSessionName(
                self.params['sessionname'])
            self.params['projectId'] = apProject.getProjectIdFromSessionName(
                self.params['sessionname'])

        self.filename = os.path.basename(self.params['file'])
        self.newfile = os.path.join(self.params['rundir'], self.filename)
        if os.path.isfile(self.newfile):
            apDisplay.printError("File " + self.filename +
                                 " already exists in dir " +
                                 self.params['rundir'])
        shutil.copy(self.oldfile, self.newfile)

        # insert the info
        self.insertMisc()
 def setRunDir(self):
         if self.params['reconid'] is not None:
                 self.recondata = apRecon.getRefineRunDataFromID(self.params['reconid'])
                 path = self.recondata['path']['path']
         if self.params['fulltomoid'] is not None:
                 self.tomodata = apTomo.getFullTomoData(self.params['fulltomoid'])
                 path = self.tomodata['path']['path']
         if self.params['sessionname'] is not None:
                 sessiondata = apDatabase.getSessionDataFromSessionName(self.params['sessionname'])
                 path = self.getDefaultBaseAppionDir(self.sessiondata,[])
         self.params['rundir'] = os.path.join(path,"misc")
Exemple #3
0
 def setRunDir(self):
     if self.params['reconid'] is not None:
         self.recondata = apRecon.getRefineRunDataFromID(
             self.params['reconid'])
         path = self.recondata['path']['path']
     if self.params['fulltomoid'] is not None:
         self.tomodata = apTomo.getFullTomoData(self.params['fulltomoid'])
         path = self.tomodata['path']['path']
     if self.params['sessionname'] is not None:
         sessiondata = apDatabase.getSessionDataFromSessionName(
             self.params['sessionname'])
         path = self.getDefaultBaseAppionDir(self.sessiondata, [])
     self.params['rundir'] = os.path.join(path, "misc")
        def start(self):

                if self.params['reconid'] is not None:
                        self.recondata = apRecon.getRefineRunDataFromID(self.params['reconid'])
                        print "Associated with",self.recondata['name'],":",self.recondata['path']
                if self.params['fulltomoid'] is not None:
                        self.tomodata = apTomo.getFullTomoData(self.params['fulltomoid'])
                        print "Associated with",self.tomodata['name'],":",self.tomodata['path']['path']
                if self.params['sessionname'] is not None:
                        self.sessiondata = apDatabase.getSessionDataFromSessionName(self.params['sessionname'])
                        self.params['projectId'] = apProject.getProjectIdFromSessionName(self.params['sessionname'])

                self.filename = os.path.basename(self.params['file'])
                self.newfile = os.path.join(self.params['rundir'], self.filename)
                if os.path.isfile(self.newfile):
                        apDisplay.printError("File "+self.filename+" already exists in dir "+self.params['rundir'])
                shutil.copy(self.oldfile, self.newfile)

                # insert the info
                self.insertMisc()
                projectid = int(sys.argv[2])
        else:
                projectid = None
        if projectid is not None:
                apDisplay.printWarning("Using split database")
                # use a project database
                newdbname = apProject.getAppionDBFromProjectId(projectid)
                sinedon.setConfig('appiondata', db=newdbname)
                apDisplay.printColor("Connected to database: '"+newdbname+"'", "green")

        ### run the program
        if len(sys.argv) > 1:
                reconid = int(sys.argv[1])
                makeCoranKeepPlot(reconid)
        else:
                reconids = getAllCoranRecons()
                for reconid in reconids:
                        recondata = apRecon.getRefineRunDataFromID(reconid)
                        reconpath = recondata['path']['path']
                        print reconpath
                        os.chdir(reconpath)
                        try:
                                makeCoranKeepPlot(reconid)
                        except:
                                pass





Exemple #6
0
    print "Usage: apCoranPlot.py <reconid> <projectid>"

    ### setup correct database after we have read the project id
    if len(sys.argv) > 2:
        projectid = int(sys.argv[2])
    else:
        projectid = None
    if projectid is not None:
        apDisplay.printWarning("Using split database")
        # use a project database
        newdbname = apProject.getAppionDBFromProjectId(projectid)
        sinedon.setConfig('appiondata', db=newdbname)
        apDisplay.printColor("Connected to database: '" + newdbname + "'",
                             "green")

    ### run the program
    if len(sys.argv) > 1:
        reconid = int(sys.argv[1])
        makeCoranKeepPlot(reconid)
    else:
        reconids = getAllCoranRecons()
        for reconid in reconids:
            recondata = apRecon.getRefineRunDataFromID(reconid)
            reconpath = recondata['path']['path']
            print reconpath
            os.chdir(reconpath)
            try:
                makeCoranKeepPlot(reconid)
            except:
                pass