Index: /branches/sj_ippTests_branch_20080929/ippTests/compIPPphoto.py
===================================================================
--- /branches/sj_ippTests_branch_20080929/ippTests/compIPPphoto.py	(revision 20559)
+++ /branches/sj_ippTests_branch_20080929/ippTests/compIPPphoto.py	(revision 20560)
@@ -94,5 +94,5 @@
 
 def mergePlots(summaryTable,plotcol_1frame_tlist=plotcol_1frame_tlist,filtlist=['u','g','r','i','z'],\
-                   workdir='/IPP/data/SDSS/stripe82/coadd/compare'):
+                   workdir='/IPP/data/SDSS/stripe82/coadd/compare',gzip=False):
     from subprocess import call
     from glob import glob
@@ -109,6 +109,11 @@
         print "Making %s" %(outname)
         call(cmdstr,shell=True)
-        print "gzipping %s" %(outname)
-        call("gzip -f %s" %(outname),shell=True)
+        if gzip:
+            print "gzipping %s" %(outname)
+            call("gzip -f %s" %(outname),shell=True)
+        print "Deleting individual .eps files"
+        for file in filelist:
+            os.remove(file)
+        
 
 def compIPPphoto(summaryTable,mode,plotcol_1frame_tlist=plotcol_1frame_tlist,\
@@ -232,5 +237,5 @@
     # all the explict sm. and smLib. calls should be wrapped into
     # functions that can be called for other plotting packages
-    smSetTitle(re.sub('(\.[sc]mf|\.fits?)$','',re.sub('_','\_',matchtable)))
+    smSetTitle(re.sub('(\.[sc]mf|\.fits?)$','',matchtable))
     i=0
     for troika in plotcol_tlist:
@@ -292,10 +297,16 @@
                 # Which one *am* I plotting first???
                 smHistoPlot(values2,ltype=0,nbins=Nbins,minbin=minbin,maxbin=maxbin,\
-                                xlab=col1name,ylab="N",expand=expand)
+                                xlab=col2name+" \line 0 1000",ylab="N",expand=expand)
                 smHistoPlot(values1,append=True,minbin=minbin,maxbin=maxbin,nbins=Nbins,\
                             ltype=2,expand=expand)
+                smSetWindowTitle(col1name+" \line 2 1000")
             firstplot = False
     smClosePlot()
     return all_outname
+
+def smSetWindowTitle(titlestr):
+    import sm, re
+    sm.frelocate(0.5,1.05)
+    sm.putlabel(5,re.sub('_','\_',titlestr))
 
 def smSetTitle(titlestr):
@@ -304,6 +315,5 @@
     sm.window(1,1,1,1)
     sm.location(3500,31000,3500,31000)
-    sm.frelocate(0.5,1.05)
-    sm.putlabel(5,titlestr)
+    smSetWindowTitle(titlestr)
 
 
@@ -434,7 +444,9 @@
     h = table.header
     table_data = table.data
+    #delete h0 = infile_handle[0].header
     # Header names that are going to be copied to output table as
     # "reference columns"
     outhash = {}
+    #print "Looking for FWHM_MAJ in table %s" %(tablename)
     if 'FWHM_MAJ' in copyfields_list and 'FWHM_MAJ' not in h.ascardlist().keys():
         copyfields_list.remove('FWHM_MAJ')
@@ -980,5 +992,5 @@
 def makePlan(fpObjcDir = '/IPP/data/SDSS/stripe82/coadd/input/fpObjcs/',\
                  cmfDir = '/IPP/data/SDSS/stripe82/coadd/prod/run_ipp_20080815/',\
-                 lastcamcol=1,\
+                 lastcamcol=6,\
                  runlist=[1056,1755,3388,3434,3465,4145,4192,4203,4247,4263,5052],\
                  firstfield_h = {
