def updatetabs(self, infile): name=str(infile) imlist=self.obsdict[name] detmode=imlist[headerList.index('DETMODE')].strip().upper() obsmode=imlist[headerList.index('OBSMODE')].strip().upper() #update the information panel try: self.infoTab.update(name, self.obsdict[name]) print "UPDATING tabs with %s" % name except Exception, e: print e return
def getitem(self, key): i=headerList.index(key) try: value=str(self.imlist[i]) except IndexError: value='' return value
def updateextract(self, y1, y2): print y1, y2 name=self.specTab.name iminfo=self.obsdict[name] lampid=iminfo[headerList.index('LAMPID')].strip().upper() objsection='[%i:%i]' % (y1, y2) if self.specTab.defaultBox.checkState(): print "Updating Object Section" self.objsection=objsection else: self.objsection=None outpath='./' outfile=outpath+'smbxp'+name logfile='saltclean.log' verbose=True y1, y2=quickap(outfile, objsection=objsection, clobber=True, logfile=logfile, verbose=verbose) #quickspec(outfile, lampid, findobj=False, objsection=objsection, clobber=True, logfile=logfile, verbose=verbose) self.specTab.updaterange(y1,y2) self.updatespecview(name)
sdbloadfits(filename, sdb, log, False) print 'SDBLOADFITS: SUCCESS' except Exception, e: print 'SDBLOADFITSERROR:', e #display the image if display_image: print "Displaying %s" % outfile try: display(outfile) except Exception, e: print e #if the images are imaging data, run sextractor on them name=iminfo[0] propcode=iminfo[headerList.index('PROPID')].strip().upper() obsmode=iminfo[headerList.index('OBSMODE')].strip().upper() detmode=iminfo[headerList.index('DETMODE')].strip().upper() obstype=iminfo[headerList.index('CCDTYPE')].strip().upper() target=iminfo[headerList.index('OBJECT')].strip().upper() lampid=iminfo[headerList.index('LAMPID')].strip().upper() print detmode if (obsmode=='IMAGING' or obsmode=='FABRY-PEROT' ) and (detmode=='NORMAL' or detmode=='FT' or detmode=='FRAME TRANSFER'): i=headerList.index('CCDSUM') ccdbin=int(iminfo[i].split()[0]) pix_scale=0.14*ccdbin r_ap=1.5/pix_scale #measure the photometry print "RUNNING PHOTOMETRY" quickphot(outfile, r_ap, pix_scale, self.sexfile, clobber, logfile, verbose)