def test_case(subDir): imgStack = BeadsImage(subDir, pathDir) allCircles = imgStack.makeHoughCircles() allNormDev = imgStack.makeAllLinePlots(allCircles, minRad=30) profile = RadialProfile(pathDir) fname = os.path.join(pathDir, subDir, 'test') profile.drawProfile(allNormDev, fname, nbrCircles=len(allCircles[0]))
def test_case(subDir): imgStack = BeadsImage(subDir,pathDir) allCircles = imgStack.makeHoughCircles() allNormDev = imgStack.makeAllLinePlots(allCircles,minRad=30) profile = RadialProfile(pathDir) fname = os.path.join(pathDir,subDir,'test') profile.drawProfile(allNormDev,fname,nbrCircles = len(allCircles[0]))
def combineExptPlots(pathDir,pklDir,radPlotDir): pep = 'TentagelNH2_JSPR011_2_EDC_' packedList = ( [(os.path.join(pklDir,pep+'Before_MeOH_50ms.meanLineProfile.dict.pkl'),'-','blue'), (os.path.join(pklDir,pep+'deFmoc_MeOH_50ms.meanLineProfile.dict.pkl'),'--','red'), (os.path.join(pklDir,pep+'Mock1_MeOH_50ms.meanLineProfile.dict.pkl'),'-.','orange'), (os.path.join(pklDir,pep+'Edman1_MeOH_50ms.meanLineProfile.dict.pkl'),':','green'), (os.path.join(pklDir,pep+'Edman2_MeOH_50ms.meanLineProfile.dict.pkl'),'-','purple') ]) fname = os.path.join(radPlotDir,'All_'+pep+'radialProfile') pf = RadialProfile(pathDir) pf.combinePlots(packedList,fname)
def drawRadialProfile(self,pklTag,fnameTag): pklF = os.path.join(self.pklDir,self.exptType+pklTag) fname = os.path.join(self.radPlotDir,self.exptType+'.'+fnameTag) nbrBeads,lineProfile,stdevProfile = pickle.load(open(pklF)) yPlus,yMinus = self.getYStdev(lineProfile,stdevProfile) rawXList = lineProfile.keys() xList = [x/self.xBin for x in rawXList] yList = lineProfile.values() pf = RadialProfile(self.pathDir) ymaxLimit = 1.2*np.amax(yPlus) ymaxredLimit = 30000 if 'reduced' in pklTag: ylim = ( 0,ymaxredLimit) else: ylim = (0, ymaxLimit) pf.drawProfileWstdev(xList,yList,yPlus,yMinus,fname,nbrCircles=nbrBeads,ylim=ylim) return True
def drawRadialProfile(self, pklTag, fnameTag): pklF = os.path.join(self.pklDir, self.exptType + pklTag) fname = os.path.join(self.radPlotDir, self.exptType + '.' + fnameTag) nbrBeads, lineProfile, stdevProfile = pickle.load(open(pklF)) yPlus, yMinus = self.getYStdev(lineProfile, stdevProfile) rawXList = lineProfile.keys() xList = [x / self.xBin for x in rawXList] yList = lineProfile.values() pf = RadialProfile(self.pathDir) ymaxLimit = 1.2 * np.amax(yPlus) ymaxredLimit = 30000 if 'reduced' in pklTag: ylim = (0, ymaxredLimit) else: ylim = (0, ymaxLimit) pf.drawProfileWstdev(xList, yList, yPlus, yMinus, fname, nbrCircles=nbrBeads, ylim=ylim) return True
def combineExptPlots(pathDir, pklDir, radPlotDir): pep = 'TentagelNH2_JSPR011_2_EDC_' packedList = ([ (os.path.join(pklDir, pep + 'Before_MeOH_50ms.meanLineProfile.dict.pkl'), '-', 'blue'), (os.path.join(pklDir, pep + 'deFmoc_MeOH_50ms.meanLineProfile.dict.pkl'), '--', 'red'), (os.path.join(pklDir, pep + 'Mock1_MeOH_50ms.meanLineProfile.dict.pkl'), '-.', 'orange'), (os.path.join(pklDir, pep + 'Edman1_MeOH_50ms.meanLineProfile.dict.pkl'), ':', 'green'), (os.path.join(pklDir, pep + 'Edman2_MeOH_50ms.meanLineProfile.dict.pkl'), '-', 'purple') ]) fname = os.path.join(radPlotDir, 'All_' + pep + 'radialProfile') pf = RadialProfile(pathDir) pf.combinePlots(packedList, fname)