IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20560


Ignore:
Timestamp:
Nov 6, 2008, 3:09:19 AM (18 years ago)
Author:
Sebastian Jester
Message:

Label histograms correctly; don't gzip by default in mergePlots, but
delete input .eps files that went into the merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sj_ippTests_branch_20080929/ippTests/compIPPphoto.py

    r20551 r20560  
    9494
    9595def mergePlots(summaryTable,plotcol_1frame_tlist=plotcol_1frame_tlist,filtlist=['u','g','r','i','z'],\
    96                    workdir='/IPP/data/SDSS/stripe82/coadd/compare'):
     96                   workdir='/IPP/data/SDSS/stripe82/coadd/compare',gzip=False):
    9797    from subprocess import call
    9898    from glob import glob
     
    109109        print "Making %s" %(outname)
    110110        call(cmdstr,shell=True)
    111         print "gzipping %s" %(outname)
    112         call("gzip -f %s" %(outname),shell=True)
     111        if gzip:
     112            print "gzipping %s" %(outname)
     113            call("gzip -f %s" %(outname),shell=True)
     114        print "Deleting individual .eps files"
     115        for file in filelist:
     116            os.remove(file)
     117       
    113118
    114119def compIPPphoto(summaryTable,mode,plotcol_1frame_tlist=plotcol_1frame_tlist,\
     
    232237    # all the explict sm. and smLib. calls should be wrapped into
    233238    # functions that can be called for other plotting packages
    234     smSetTitle(re.sub('(\.[sc]mf|\.fits?)$','',re.sub('_','\_',matchtable)))
     239    smSetTitle(re.sub('(\.[sc]mf|\.fits?)$','',matchtable))
    235240    i=0
    236241    for troika in plotcol_tlist:
     
    292297                # Which one *am* I plotting first???
    293298                smHistoPlot(values2,ltype=0,nbins=Nbins,minbin=minbin,maxbin=maxbin,\
    294                                 xlab=col1name,ylab="N",expand=expand)
     299                                xlab=col2name+" \line 0 1000",ylab="N",expand=expand)
    295300                smHistoPlot(values1,append=True,minbin=minbin,maxbin=maxbin,nbins=Nbins,\
    296301                            ltype=2,expand=expand)
     302                smSetWindowTitle(col1name+" \line 2 1000")
    297303            firstplot = False
    298304    smClosePlot()
    299305    return all_outname
     306
     307def smSetWindowTitle(titlestr):
     308    import sm, re
     309    sm.frelocate(0.5,1.05)
     310    sm.putlabel(5,re.sub('_','\_',titlestr))
    300311
    301312def smSetTitle(titlestr):
     
    304315    sm.window(1,1,1,1)
    305316    sm.location(3500,31000,3500,31000)
    306     sm.frelocate(0.5,1.05)
    307     sm.putlabel(5,titlestr)
     317    smSetWindowTitle(titlestr)
    308318
    309319
     
    434444    h = table.header
    435445    table_data = table.data
     446    #delete h0 = infile_handle[0].header
    436447    # Header names that are going to be copied to output table as
    437448    # "reference columns"
    438449    outhash = {}
     450    #print "Looking for FWHM_MAJ in table %s" %(tablename)
    439451    if 'FWHM_MAJ' in copyfields_list and 'FWHM_MAJ' not in h.ascardlist().keys():
    440452        copyfields_list.remove('FWHM_MAJ')
     
    980992def makePlan(fpObjcDir = '/IPP/data/SDSS/stripe82/coadd/input/fpObjcs/',\
    981993                 cmfDir = '/IPP/data/SDSS/stripe82/coadd/prod/run_ipp_20080815/',\
    982                  lastcamcol=1,\
     994                 lastcamcol=6,\
    983995                 runlist=[1056,1755,3388,3434,3465,4145,4192,4203,4247,4263,5052],\
    984996                 firstfield_h = {
Note: See TracChangeset for help on using the changeset viewer.