Changeset 35217 for trunk/ippToPsps/jython/plot.py
- Timestamp:
- Mar 1, 2013, 1:27:47 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/plot.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/plot.py
r35097 r35217 15 15 Constructor 16 16 ''' 17 def __init__(self, logger, skychunk, ippToPspsDb):17 def __init__(self, logger, skychunk, config, ippToPspsDb): 18 18 19 19 self.logger = logger 20 20 self.skychunk = skychunk 21 self.config = config 21 22 self.ippToPspsDb = ippToPspsDb 22 23 … … 25 26 ''' 26 27 def createDensityPlot(self, batchType, forCzartool=False): 27 28 28 29 tempFilename = "./" + self.skychunk.name + "_" + batchType + "_plotData.dat" 29 30 DATFILE = open(tempFilename,'w') 30 31 max = self.ippToPspsDb.createPendingDensityPlotData(batchType, DATFILE) 31 32 DATFILE.close() 32 33 33 if max == 0: max = 1 34 34 35 35 timestamp = time.strftime('%Y_%m%d_%H%M%S') 36 36 37 37 if forCzartool: 38 38 ## XXX from config?? 39 OUTPUTFILE = self. skychunk.czarPlotsPath + "/ippToPsps_density_" + self.skychunk.name + "_" + batchType + ".png"39 OUTPUTFILE = self.config.czarPlotsPath + "/ippToPsps_density_" + self.skychunk.name + "_" + batchType + ".png" 40 40 else: 41 41 OUTPUTFILE = self.skychunk.name + "_" + batchType + "_" + timestamp + ".png" 42 42 43 43 f = os.popen('/home/panstarrs/ipp/local/bin/gnuplot', 'w') 44 44 45 45 if 0: 46 46 TERM = "X11" 47 47 else: 48 48 TERM = "png font \"/usr/share/fonts/corefonts/arial.ttf\" 8" 49 49 print "output to : "+ OUTPUTFILE 50 50 print >> f, "set term " + TERM + "; \ 51 51 set output \"" + OUTPUTFILE + "\"; \ … … 57 57 set palette rgb 22,13,10; \ 58 58 set ylabel \"Dec\"; \ 59 set ylabel \"RA\"; \59 set xlabel \"RA\"; \ 60 60 set cbrange [0:" + str(max) + "]; \ 61 61 set datafile missing \"NaN\"; \
Note:
See TracChangeset
for help on using the changeset viewer.
