- Timestamp:
- 05/02/05 09:23:58 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Release-1-fixes/python/asapplotter.py
r597 r601 82 82 maxrows = 9 83 83 if self._data[0].nrow() > maxrows: 84 print "Scan to be plotted contains more than %d rows.\n" \ 85 "Selecting first %d rows..." % (maxrows,maxrows) 86 self._cursor["t"] = range(maxrows) 84 if self._cursor["t"] is None or \ 85 (isinstance(self._cursor["t"],list) and \ 86 len(self._cursor["t"]) > maxrows ): 87 print "Scan to be plotted contains more than %d rows.\n" \ 88 "Selecting first %d rows..." % (maxrows,maxrows) 89 self._cursor["t"] = range(maxrows) 87 90 self._plot_time(self._data[0], self._stacking) 88 91 elif self._panelling == 's': … … 172 175 else: 173 176 if colmode == 'p': 174 if polmode == "stokes": 175 llab = scan._getpolarizationlabel(0,1,0) 176 elif polmode == "stokes2": 177 llab = scan._getpolarizationlabel(0,1,1) 178 elif polmode == "circular": 179 llab = scan._getpolarizationlabel(0,0,0) 180 else: 181 llab = scan._getpolarizationlabel(1,0,0) 177 llab = self._get_pollabel(scan, polmode) 182 178 else: 183 179 llab = self._ldict.get(colmode)+' '+str(j) … … 265 261 else: 266 262 if colmode == 'p': 267 if polmode == "stokes": 268 llab = scan._getpolarizationlabel(0,1,0) 269 elif polmode == "stokes2": 270 llab = scan._getpolarizationlabel(0,1,1) 271 elif polmode == "circular": 272 llab = scan._getpolarizationlabel(0,0,0) 273 else: 274 llab = scan._getpolarizationlabel(1,0,0) 263 llab = self._get_pollabel(scan, polmode) 275 264 else: 276 265 llab = self._ldict.get(colmode)+' '+str(j) … … 377 366 tlab = self._title[ii] 378 367 else: 379 tlab = self._ldict.get(self._panelling)+' '+str(i) 368 if self._panelling == 'p': 369 tlab = self._get_pollabel(scan, polmode) 370 else: 371 tlab = self._ldict.get(self._panelling)+' '+str(i) 380 372 if self._lmap and len(self._lmap) > 0: 381 373 llab = self._lmap[jj] 382 374 else: 383 375 if colmode == 'p': 384 if polmode == "stokes": 385 llab = scan._getpolarizationlabel(0,1,0) 386 elif polmode == "stokes2": 387 llab = scan._getpolarizationlabel(0,1,1) 388 elif polmode == "circular": 389 llab = scan._getpolarizationlabel(0,0,0) 390 else: 391 llab = scan._getpolarizationlabel(1,0,0) 376 llab = self._get_pollabel(scan, polmode) 392 377 else: 393 378 llab = self._ldict.get(colmode)+' '+str(j) 394 if self._panelling == 'p':395 if polmode == "stokes":396 tlab = scan._getpolarizationlabel(0,1,0)397 elif polmode == "stokes2":398 tlab = scan._getpolarizationlabel(0,1,1)399 elif polmode == "circular":400 tlab = scan._getpolarizationlabel(0,0,0)401 else:402 tlab = scan._getpolarizationlabel(1,0,0)403 379 self._plotter.set_line(label=llab) 404 380 self._plotter.plot(x,y,m) … … 646 622 if self._data and refresh: self.plot() 647 623 624 def _get_pollabel(self, scan, polmode): 625 tlab = "" 626 if polmode == "stokes": 627 tlab = scan._getpolarizationlabel(0,1,0) 628 elif polmode == "stokes2": 629 tlab = scan._getpolarizationlabel(0,1,1) 630 elif polmode == "circular": 631 tlab = scan._getpolarizationlabel(0,0,0) 632 else: 633 tlab = scan._getpolarizationlabel(1,0,0) 634 return tlab 648 635 649 636 if __name__ == '__main__':
Note:
See TracChangeset
for help on using the changeset viewer.