def loopCommitToDatabase(self, imgdata): """ Over-writes the particleLoop commit and uses the appionLoop commit """ tiltdata = apTiltPair.getTiltPair(imgdata) if tiltdata is None: apDisplay.printWarning("Tilt data not found; not commiting data") return False ### insert the runid self.commitRunToDatabase(imgdata['session'], True) if self.assess is not None: #note runid is overrided to be 'run1' apDatabase.insertImgAssessmentStatus(imgdata, self.params['runname'], self.assess) apDatabase.insertImgAssessmentStatus(tiltdata, self.params['runname'], self.assess) if len(self.peaktree1) < 3 or len(self.peaktree1) < 3: apDisplay.printWarning("Not enough particle picks; not commiting transform or particle data") return False ### insert the transform transdata = apTiltPair.insertTiltTransform(imgdata, tiltdata, self.tiltparams, self.params) ### insert the particles self.insertParticlePeakPairs(imgdata, tiltdata, transdata)
def loopCommitToDatabase(self, imgdata): """ Over-writes the particleLoop commit and uses the appionLoop commit """ tiltdata = apTiltPair.getTiltPair(imgdata) if tiltdata is None: apDisplay.printWarning("Tilt data not found; not commiting data") return False ### insert the runid self.commitRunToDatabase(imgdata['session'], True) if len(self.peaktree1) < 3 or len(self.peaktree2) < 3: apDisplay.printWarning("Not enough particle picks; not commiting transform or particle data") return False ### insert the transform transdata = apTiltPair.insertTiltTransform(imgdata, tiltdata, self.data, self.params) ### insert the particles self.insertParticlePeakPairs(imgdata, tiltdata, transdata)