Changeset 1859 for trunk/python/asapplotter.py
- Timestamp:
- 08/05/10 14:40:38 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r1858 r1859 102 102 if not self._data and not scan: 103 103 msg = "Input is not a scantable" 104 if rcParams['verbose']:105 #print msg106 asaplog.push( msg )107 print_log( 'ERROR' )108 return109 104 raise TypeError(msg) 110 105 if scan: self.set_data(scan,refresh=False) … … 277 272 # end matplotlib.axes fowarding functions 278 273 274 @print_log_dec 279 275 def set_data(self, scan, refresh=True): 280 276 """ … … 299 295 msg = "A new scantable is set to the plotter. The masks and data selections are reset." 300 296 asaplog.push( msg ) 301 print_log( 'INFO' )302 297 else: 303 298 self._data = scan … … 305 300 else: 306 301 msg = "Input is not a scantable" 307 if rcParams['verbose']:308 #print msg309 asaplog.push( msg )310 print_log( 'ERROR' )311 return312 302 raise TypeError(msg) 313 303 … … 320 310 if refresh: self.plot() 321 311 322 312 @print_log_dec 323 313 def set_mode(self, stacking=None, panelling=None, refresh=True): 324 314 """ … … 343 333 if not self.set_panelling(panelling) or \ 344 334 not self.set_stacking(stacking): 345 if rcParams['verbose']: 346 #print msg 347 asaplog.push( msg ) 348 print_log( 'ERROR' ) 349 return 350 else: 351 raise TypeError(msg) 335 raise TypeError(msg) 352 336 if refresh and self._data: self.plot(self._data) 353 337 return … … 745 729 return 746 730 747 731 @print_log_dec 748 732 def set_mask(self, mask=None, selection=None, refresh=True): 749 733 """ … … 763 747 if not self._data: 764 748 msg = "Can only set mask after a first call to plot()" 765 if rcParams['verbose']: 766 #print msg 767 asaplog.push( msg ) 768 print_log( 'ERROR' ) 769 return 770 else: 771 raise RuntimeError(msg) 749 raise RuntimeError(msg) 772 750 if len(mask): 773 751 if isinstance(mask, list) or isinstance(mask, tuple): … … 1171 1149 # plot total power data 1172 1150 # plotting in time is not yet implemented.. 1151 @print_log_dec 1173 1152 def plottp(self, scan=None, outfile=None): 1174 1153 if self._plotter.is_dead: … … 1182 1161 if not self._data and not scan: 1183 1162 msg = "Input is not a scantable" 1184 if rcParams['verbose']:1185 #print msg1186 asaplog.push( msg )1187 print_log( 'ERROR' )1188 return1189 1163 raise TypeError(msg) 1190 1164 if isinstance(scan, scantable): … … 1216 1190 self._plotter.tidy() 1217 1191 self._plotter.show(hardrefresh=False) 1218 print_log()1219 1192 return 1220 1193 … … 1277 1250 1278 1251 # printing header information 1252 @print_log_dec 1279 1253 def print_header(self, plot=True, fontsize=9, logger=False, selstr='', extrastr=''): 1280 1254 """ … … 1288 1262 extrastr: additional string to print (not verified) 1289 1263 """ 1290 if not plot and not logger: return 1291 if not self._data: raise RuntimeError("No scantable has been set yet.") 1264 if not plot and not logger: 1265 return 1266 if not self._data: 1267 raise RuntimeError("No scantable has been set yet.") 1292 1268 # Now header will be printed on plot and/or logger. 1293 1269 # Get header information and format it. … … 1322 1298 asaplog.push(extrastr) 1323 1299 asaplog.push(ssum[ssum.find('Beams:'):]) 1324 print_log()1325 1300 del ssum
Note: See TracChangeset
for help on using the changeset viewer.