Changeset 1148 for trunk/python
- Timestamp:
- 08/16/06 13:14:25 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r1146 r1148 474 474 'i': scan.getif, 'p': scan.getpol, 't': scan._gettime } 475 475 476 polmodes = dict(zip(self._selection.get_pols(),self._selection.get_poltypes())) 477 n,nstack = self._get_selected_n(scan) 476 polmodes = dict(zip(self._selection.get_pols(), 477 self._selection.get_poltypes())) 478 # this returns either a tuple of numbers or a length (ncycles) 479 # convert this into lengths 480 n0,nstack0 = self._get_selected_n(scan) 481 n = len(n0) 482 if isinstance(n0, int): n = n0 483 nstack = len(nstack0) 484 if isinstance(nstack0, int): nstack = nstack0 478 485 maxpanel, maxstack = 16,8 479 486 if n > maxpanel or nstack > maxstack: 480 487 from asap import asaplog 488 maxn = 0 489 if nstack > maxstack: maxn = maxstack 490 if n > maxpanel: maxn = maxpanel 481 491 msg ="Scan to be plotted contains more than %d selections.\n" \ 482 "Selecting first %d selections..." % (max panel,maxpanel)492 "Selecting first %d selections..." % (maxn, maxn) 483 493 asaplog.push(msg) 484 494 print_log() 485 495 n = min(n,maxpanel) 486 496 nstack = min(nstack,maxstack) 487 488 497 if n > 1: 489 498 ganged = rcParams['plotter.ganged'] … … 598 607 599 608 def _get_selected_n(self, scan): 600 d1 = {'b': scan. nbeam, 's': scan.nscan,601 'i': scan. nif, 'p': scan.npol, 't': scan.ncycle }602 d2 = { 'b': len(self._selection.get_beams()),603 's': len(self._selection.get_scans()),604 'i': len(self._selection.get_ifs()),605 'p': len(self._selection.get_pols()),606 't': len(self._selection.get_cycles()) }609 d1 = {'b': scan.getbeamnos, 's': scan.getscannos, 610 'i': scan.getifnos, 'p': scan.getpolnos, 't': scan.ncycle } 611 d2 = { 'b': self._selection.get_beams(), 612 's': self._selection.get_scans(), 613 'i': self._selection.get_ifs(), 614 'p': self._selection.get_pols(), 615 't': self._selection.get_cycles() } 607 616 n = d2[self._panelling] or d1[self._panelling]() 608 617 nstack = d2[self._stacking] or d1[self._stacking]()
Note:
See TracChangeset
for help on using the changeset viewer.