Changeset 1419 for trunk/monitor/cgi-bin
- Timestamp:
- 05/21/08 15:35:49 (17 years ago)
- Location:
- trunk/monitor/cgi-bin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/monitor/cgi-bin/asapconfig.py
r1403 r1419 5 5 'lines' : {} } 6 6 7 asapmonhome = "/var/www/htdocs" 8 asapmonrel = "/asapmon/" 7 9 import os,sys 8 #os.environ["AIPSPATH"]="/opt/share/asap linux_gnu somewhere localhost"9 10 # This is needed for plotting with matplotlib11 # where matplotlib data is located12 #os.environ["MATPLOTLIBDATA"]="/opt/share/matplotlib"13 10 # where matplotlib puts it temporary font files 14 11 # this location can also have a custom .matplotlibrc 15 os.environ["HOME"]="/var/www/ asapmon/tmp"12 os.environ["HOME"]="/var/www/htdocs/asapmon/tmp" -
trunk/monitor/cgi-bin/asapmon.py
r1295 r1419 7 7 from simpletal import simpleTAL, simpleTALES 8 8 9 #absolute home10 abspath= "/var/www/asapmon/"11 cgiloc = "/cgi-bin/asapmon/"12 tmppath = os.path.join(abspath,"tmp/")13 htmlloc = "/asapmon/"14 tmploc = "/asapmon/tmp/"15 16 9 from obsconfig import * 10 11 tmppath = os.path.join(asapmonhome,"tmp/") 12 tmppath = os.path.join(asapmonrel,"tmp/") 17 13 18 14 # a redirection object for stdout/stderr … … 28 24 sys.stderr = logsink2 29 25 import asap 26 asap.rc('scantable', storage="memory") 30 27 sys.stdout = sys.__stdout__ 31 28 sys.stderr = sys.__stderr__ … … 58 55 def decodeWindow(self,window): 59 56 if not len(window.strip()): return None,None 60 x = window.split(", 57 x = window.split(",") 61 58 return [float(x[0].strip()), float(x[1].strip())] 62 59 … … 167 164 else: 168 165 # get only the last source in the table if not averaging 169 s = s.get_scan(self.fields['sourcenames'][-1]) 170 #self.fields['debug'] = "DEBUG" 166 # This doesn't work anymore, but works on the command-line?? 167 # Use explict selection 168 #s = s.get_scan(str(self.fields['sourcenames'][-1])) 169 sel = asap.selector() 170 sel.set_name(str(self.fields['sourcenames'][-1])) 171 s.set_selection(sel) 172 s = s.copy() 171 173 self.fields['csource'] = s.get_sourcename()[-1] 172 174 if self.fields['cunit'] == 1: 173 srest = s._getrestfreqs() 174 if isinstance(srest, tuple) and len(srest) != s.nif(): 175 s.set_restfreqs(restfs, unit="GHz") 175 s.set_restfreqs(restfs, unit="GHz") 176 176 s.set_unit(self.fields['units'][self.fields['cunit']]) 177 177 s.set_freqframe(self.form.getfirst("frame", "LSRK")) … … 213 213 rcp['figure.subplot.wspace'] = 0.3 214 214 rcp['figure.subplot.hspace'] = 0.3 215 del asap.plotter215 #del asap.plotter 216 216 # plotter without GUI 217 217 asap.plotter = asap.asapplotter(False) … … 259 259 self.setDefaultFields() 260 260 title = "ASAP %s Online Monitor" % (observatory['name']) 261 tmplname = a bspath+"asapmon.html.template"261 tmplname = asapmonhome+"asapmon.html.template" 262 262 if ( self.form.has_key("plot")): 263 263 self.plotForm()
Note:
See TracChangeset
for help on using the changeset viewer.