PEATDB/plugins/KineticsAnalysis.py
def makeKineticsHtml(self, run=None):
        """make html pages of kinetics raw and MM fits"""
        if run != None:
            runs=[run]
        else:
            runs=self.runs
        import gc
        ew = EkinWeb()
        path = os.path.join(self.path, 'plots')
        import copy
        rownames = copy.deepcopy(self.required)
        colnames = self.phlist
        sep='_'
        for r in runs:
            print 'doing run %s' %r
            kimages=[]
            mmimages=[]
            for name in self.required:
                gc.collect()
                E = EkinProject()
                E.openProject(os.path.join(self.path, name.replace(' ','')+'_'+str(r)))
                for ph in self.phlist:
                    dlist=[]
                    for s in self.subconcs:
                        dlist.append(ph+'_'+str(s))
                    fname = os.path.join(path, name.replace(' ','')+sep+str(r)+sep+ph+'_raw.png')
                    try:
                        E.plotDatasets(datasets=dlist, filename=fname, plotoption=3, legend=True, dpi=60)
                        kimages.append(os.path.basename(fname))
                    except:
                        kimages.append('dummy.png')

                    fname = os.path.join(path, name.replace(' ','')+sep+str(r)+'_mm_'+ph+'.png')
                    E.plotDatasets(datasets=ph, filename=fname, showfitvars=True, dpi=60)
                    mmimages.append(os.path.basename(fname))

            t='set '+self.setname+', run '+str(r)+' '+' raw kinetics fits'
            ew.makeHtml(kimages, outfile=os.path.join(self.path, 'run_'+str(r)+'_rawkinetics.html'),
                                imgpath='plots', columns=len(colnames), title=t,
                                colheader=colnames, rowheader=rownames)
            t='set '+self.setname+', run '+str(r)+' '+' mm fits'
            ew.makeHtml(mmimages, outfile=os.path.join(self.path, 'run_'+str(r)+'_MM.html'),
                                imgpath='plots', columns=len(colnames), title=t,
                                colheader=colnames, rowheader=rownames)
        return
make html pages of kinetics raw and MM fits
make html pages of kinetics raw and MM fits
make html pages of kinetics raw and MM fits
def makeKineticsHtml(self, run=None):
        if run != None:
            runs=[run]
        else:
            runs=self.runs
        import gc
        ew = EkinWeb()
        path = os.path.join(self.path, 'plots')
        import copy
        rownames = copy.deepcopy(self.required)
        colnames = self.phlist
        sep='_'
        for r in runs:
            print 'doing run %s' %r
            kimages=[]
            mmimages=[]
            for name in self.required:
                gc.collect()
                E = EkinProject()
                E.openProject(os.path.join(self.path, name.replace(' ','')+'_'+str(r)))
                for ph in self.phlist:
                    dlist=[]
                    for s in self.subconcs:
                        dlist.append(ph+'_'+str(s))
                    fname = os.path.join(path, name.replace(' ','')+sep+str(r)+sep+ph+'_raw.png')
                    try:
                        E.plotDatasets(datasets=dlist, filename=fname, plotoption=3, legend=True, dpi=60)
                        kimages.append(os.path.basename(fname))
                    except:
                        kimages.append('dummy.png')
                    fname = os.path.join(path, name.replace(' ','')+sep+str(r)+'_mm_'+ph+'.png')
                    E.plotDatasets(datasets=ph, filename=fname, showfitvars=True, dpi=60)
                    mmimages.append(os.path.basename(fname))
            t='set '+self.setname+', run '+str(r)+' '+' raw kinetics fits'
            ew.makeHtml(kimages, outfile=os.path.join(self.path, 'run_'+str(r)+'_rawkinetics.html'),
                                imgpath='plots', columns=len(colnames), title=t,
                                colheader=colnames, rowheader=rownames)
            t='set '+self.setname+', run '+str(r)+' '+' mm fits'
            ew.makeHtml(mmimages, outfile=os.path.join(self.path, 'run_'+str(r)+'_MM.html'),
                                imgpath='plots', columns=len(colnames), title=t,
                                colheader=colnames, rowheader=rownames)
        return
def makeKineticsHtml ( self , run = None ) : if run != None : runs = [ run ] else : runs = self . runs import gc ew = EkinWeb ( ) path = os . path . join ( self . path , 'plots' ) import copy rownames = copy . deepcopy ( self . required ) colnames = self . phlist sep = '_' for r in runs : print 'doing run %s' % r kimages = [ ] mmimages = [ ] for name in self . required : gc . collect ( ) E = EkinProject ( ) E . openProject ( os . path . join ( self . path , name . replace ( ' ' , '' ) + '_' + str ( r ) ) ) for ph in self . phlist : dlist = [ ] for s in self . subconcs : dlist . append ( ph + '_' + str ( s ) ) fname = os . path . join ( path , name . replace ( ' ' , '' ) + sep + str ( r ) + sep + ph + '_raw.png' ) try : E . plotDatasets ( datasets = dlist , filename = fname , plotoption = 3 , legend = True , dpi = 60 ) kimages . append ( os . path . basename ( fname ) ) except : kimages . append ( 'dummy.png' ) fname = os . path . join ( path , name . replace ( ' ' , '' ) + sep + str ( r ) + '_mm_' + ph + '.png' ) E . plotDatasets ( datasets = ph , filename = fname , showfitvars = True , dpi = 60 ) mmimages . append ( os . path . basename ( fname ) ) t = 'set ' + self . setname + ', run ' + str ( r ) + ' ' + ' raw kinetics fits' ew . makeHtml ( kimages , outfile = os . path . join ( self . path , 'run_' + str ( r ) + '_rawkinetics.html' ) , imgpath = 'plots' , columns = len ( colnames ) , title = t , colheader = colnames , rowheader = rownames ) t = 'set ' + self . setname + ', run ' + str ( r ) + ' ' + ' mm fits' ew . makeHtml ( mmimages , outfile = os . path . join ( self . path , 'run_' + str ( r ) + '_MM.html' ) , imgpath = 'plots' , columns = len ( colnames ) , title = t , colheader = colnames , rowheader = rownames ) return
make html pages of kinetics raw and MM fits
make html pages of kinetics raw and MM fits
"""make html pages of kinetics raw and MM fits"""
self
run