def onInit(self): if 'sessionname' not in self.params.keys(): self.params['sessionname'] = leginondata.SessionData( ).direct_query(self.params['expid'])['name'] self.dd = apDDprocess.initializeDDFrameprocess( self.params['sessionname'], self.params['wait']) self.dd.setRunDir(self.params['rundir']) # The gain/dark corrected ddstack is unlikely to be on local disk if 'tempdir' not in self.params.keys(): self.dd.setTempDir() else: self.dd.setTempDir(self.params['tempdir']) self.dd.setNewBinning(self.rundata['params']['bin']) # Get the unfinished ddstack run parameters to apply them here jobdata = apDatabase.getJobDataFromPathAndType( self.rundata['path']['path'], 'makeddrawframestack') self.ddstack_script_params = apScriptLog.getScriptParamValuesFromRunname( self.rundata['runname'], self.rundata['path'], jobdata) if 'no-keepstack' in self.ddstack_script_params.keys(): self.dd.setKeepStack(False) self.dd.setDoseFDriftCorrOptions(self.ddstack_script_params) # Give an unique lockname self.setLockname('ddalign') self.success_count = 0
def getStackRunParams(self): stackdata = self.getOriginalStackMadeByMakeStack() stackruns = apStack.getStackRunsFromStack(stackdata) # To Do: need to handle combined stack stackrun = stackruns[0] self.originalStackParamData = stackrun['stackParams'] self.stackrunlogparams = apScriptLog.getScriptParamValuesFromRunname(stackrun['stackRunName'],stackdata['path'],jobdata=None)
def setScriptParams(self): # Some parameters of a stack are stored in ScriptProgramRun, ScriptParamValue, and ScriptParamName. # You basically need to know what you are looking for to see if a param name is in there for a particular # program run. self._stackrunlogparams = apScriptLog.getScriptParamValuesFromRunname( self.stackRunName, self.originalStack['path'], jobdata=None) self.reverse = 'reverse' in self._stackrunlogparams.keys()
def onInit(self): if 'sessionname' not in self.params.keys(): self.params['sessionname'] = leginondata.SessionData().direct_query(self.params['expid'])['name'] self.dd = apDDprocess.initializeDDFrameprocess(self.params['sessionname'],self.params['wait']) self.dd.setRunDir(self.params['rundir']) # The gain/dark corrected ddstack is unlikely to be on local disk if 'tempdir' not in self.params.keys(): self.dd.setTempDir() else: self.dd.setTempDir(self.params['tempdir']) self.dd.setNewBinning(self.rundata['params']['bin']) # Get the unfinished ddstack run parameters to apply them here jobdata = apDatabase.getJobDataFromPathAndType(self.rundata['path']['path'], 'makeddrawframestack') self.ddstack_script_params = apScriptLog.getScriptParamValuesFromRunname(self.rundata['runname'],self.rundata['path'],jobdata) if 'no-keepstack' in self.ddstack_script_params.keys(): self.dd.setKeepStack(False) # Give an unique lockname self.setLockname('ddalign') self.success_count = 0
def setScriptParams(self): # Some parameters of a stack are stored in ScriptProgramRun, ScriptParamValue, and ScriptParamName. # You basically need to know what you are looking for to see if a param name is in there for a particular # program run. self._stackrunlogparams = apScriptLog.getScriptParamValuesFromRunname( self.stackRunName, self.originalStack['path'], jobdata=None ) self.reverse = 'reverse' in self._stackrunlogparams.keys()