Changeset 626
- Timestamp:
- 05/05/05 12:30:37 (20 years ago)
- Location:
- trunk/python
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapfitter.py
r526 r626 132 132 if len(ps) == 0: 133 133 self.fitter.estimate() 134 self.fitter.fit() 134 try: 135 self.fitter.fit() 136 except RuntimeError, msg: 137 print msg 135 138 self._fittedrow = row 136 139 self.fitted = True … … 336 339 xlab = self.data._getabcissalabel(self._fittedrow) 337 340 m = self.data._getmask(self._fittedrow) 338 ylab = r'Flux'339 340 colours = ["grey60","grey80","red","orange","purple"," yellow","magenta", "cyan"]341 ylab = self.data._get_ordinate_label() 342 343 colours = ["grey60","grey80","red","orange","purple","green","magenta", "cyan"] 341 344 self._p.palette(1,colours) 342 345 self._p.set_line(label='Spectrum') -
trunk/python/asapplotter.py
r607 r626 80 80 self.set_cursor(refresh=False) 81 81 if self._panelling == 't': 82 maxrows = 982 maxrows = 25 83 83 if self._data[0].nrow() > maxrows: 84 84 if self._cursor["t"] is None or \ … … 148 148 y = None 149 149 m = None 150 if not self._title:150 if self._title is None: 151 151 tlab = scan._getsourcename(rowsel) 152 152 else: 153 if len(self._title) == n:153 if len(self._title) >= n: 154 154 tlab = self._title[rowsel] 155 155 else: … … 169 169 ylab = self._ordinate 170 170 else: 171 ylab = 'Flux ('+scan.get_fluxunit()+')'171 ylab = scan._get_ordinate_label() 172 172 m = scan._getmask(rowsel) 173 173 if self._lmap and len(self._lmap) > 0: … … 206 206 if self._rows and self._cols: 207 207 n = min(n,self._rows*self._cols) 208 self._plotter.set_panel (rows=self._rows,cols=self._cols,208 self._plotter.set_panels(rows=self._rows,cols=self._cols, 209 209 nplots=n) 210 210 else: 211 self._plotter.set_panel (rows=n,cols=0,nplots=n)211 self._plotter.set_panels(rows=n,cols=0,nplots=n) 212 212 else: 213 213 self._plotter.set_panels() 214 214 215 for scan in scans: 215 216 self._plotter.palette(1) … … 255 256 ylab = self._ordinate 256 257 else: 257 ylab = 'Flux ('+scan.get_fluxunit()+')'258 ylab = scan._get_ordinate_label() 258 259 m = scan._getmask(rowsel) 259 260 if self._lmap and len(self._lmap) > 0: … … 354 355 ylab = self._ordinate 355 356 else: 356 ylab = 'Flux ('+scan.get_fluxunit()+')'357 ylab = scan._get_ordinate_label() 357 358 m = scan._getmask(rowsel) 358 359 if colmode == 's' or colmode == 't': -
trunk/python/scantable.py
r596 r626 1066 1066 if mask is None: 1067 1067 from numarray import ones 1068 mask = list(ones(s can.nchan()))1068 mask = list(ones(self.nchan())) 1069 1069 from asap.asapfitter import fitter 1070 1070 f = fitter() … … 1428 1428 i = j 1429 1429 return segments 1430 def _get_ordinate_label(self): 1431 fu = "("+self.get_fluxunit()+")" 1432 import re 1433 lbl = "Intensity" 1434 if re.match(".K.",fu): 1435 lbl = "Brightness Temperature "+ fu 1436 elif re.match(".Jy.",fu): 1437 lbl = "Flux density "+ fu 1438 return lbl 1439
Note:
See TracChangeset
for help on using the changeset viewer.