Changeset 1843
- Timestamp:
- 08/04/10 12:31:09 (14 years ago)
- Location:
- trunk/python
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1824 r1843 7 7 from asap.env import is_casapy 8 8 from asap._asap import Scantable 9 from asap._asap import filler 9 10 from asap.parameters import rcParams 10 11 from asap.logging import asaplog, print_log, print_log_dec … … 53 54 The default (True) is taken from .asaprc. 54 55 unit: brightness unit; must be consistent with K or Jy. 55 Over-rides the default selected by the reader56 Over-rides the default selected by the filler 56 57 (input rpfits/sdfits/ms) or replaces the value 57 58 in existing scantables … … 62 63 antenna: Antenna selection. integer (id) or string (name 63 64 or id). 64 parallactify: Ind cicate that the data had been parallatified.65 parallactify: Indicate that the data had been parallatified. 65 66 Default is taken form rc file. 66 67 """ … … 69 70 if getpt is None: 70 71 getpt = True 72 if antenna is not None: 73 asaplog.push("Antenna selection currently unsupported." 74 "Using '0'") 75 print_log('WARN') 71 76 if antenna is None: 72 77 antenna = '' 73 78 elif type(antenna) == int: 74 antenna = '%s' %antenna79 antenna = '%s' % antenna 75 80 elif type(antenna) == list: 76 81 tmpstr = '' … … 914 919 Flag the selected data in row-based manner. 915 920 Parameters: 916 rows: list of row numbers to be flagged. Default is no row (must be explicitly specified to execute row-based flagging). 921 rows: list of row numbers to be flagged. Default is no row 922 (must be explicitly specified to execute row-based flagging). 917 923 unflag: if True, unflag the data. 918 924 """ … … 1597 1603 def parallactify(self, pflag): 1598 1604 """ 1599 Set a flag to in idcate whether this data should be treated as having1605 Set a flag to indicate whether this data should be treated as having 1600 1606 been 'parallactified' (total phase == 0.0) 1601 1607 Parameters: 1602 pflag: Bool in idcating whether to turn this on (True) or1608 pflag: Bool indicating whether to turn this on (True) or 1603 1609 off (False) 1604 1610 """ … … 2361 2367 2362 2368 def _fill(self, names, unit, average, getpt, antenna): 2363 import os2364 from asap._asap import stfiller2365 2369 first = True 2366 2370 fullnames = [] … … 2372 2376 if rcParams['verbose']: 2373 2377 asaplog.push(msg) 2374 #print asaplog.pop().strip()2375 2378 print_log( 'ERROR' ) 2376 2379 return … … 2382 2385 for name in fullnames: 2383 2386 tbl = Scantable(stype) 2384 r = stfiller(tbl)2387 r = filler(tbl) 2385 2388 rx = rcParams['scantable.reference'] 2386 r. _setreferenceexpr(rx)2389 r.setreferenceexpr(rx) 2387 2390 msg = "Importing %s..." % (name) 2388 2391 asaplog.push(msg, False) 2389 2392 print_log() 2390 r. _open(name,antenna, -1, -1, getpt)2391 r. _read()2393 r.open(name)# antenna, -1, -1, getpt) 2394 r.fill() 2392 2395 if average: 2393 2396 tbl = self._math._average((tbl, ), (), 'NONE', 'SCAN') … … 2395 2398 tbl = self._math._merge([self, tbl]) 2396 2399 Scantable.__init__(self, tbl) 2397 r. _close()2400 r.close() 2398 2401 del r, tbl 2399 2402 first = False
Note:
See TracChangeset
for help on using the changeset viewer.