Changeset 340
- Timestamp:
- 01/31/05 21:28:33 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r334 r340 9 9 """ 10 10 11 def __init__(self, filename ):11 def __init__(self, filename, unit=None): 12 12 """ 13 13 Create a scantable from a saved one or make a reference … … 21 21 [advanced] a reference to an existing 22 22 scantable 23 unit: brightness unit; must be consistent with K or Jy. 24 Over-rides the default selected by the reader 25 (input rpfits/sdfits/ms) or replaces the value 26 in existing scantables 23 27 """ 24 28 self._vb = rcParams['verbose'] … … 28 32 if isinstance(filename,sdtable): 29 33 sdtable.__init__(self, filename) 34 if unit is not None: 35 print 'Setting brightness unit to ', unit 36 sdtable.set_fluxunit(unit) 30 37 else: 31 38 try: … … 38 45 if stat.S_ISREG(st(filename+'/table.info')[stat.ST_MODE]): 39 46 sdtable.__init__(self, filename) 47 if unit is not None: 48 print 'Setting brightness unit to ', unit 49 self.set_fluxunit(unit) 40 50 else: 41 51 print 'The given file is not a valid asap table' … … 45 55 46 56 from asap._asap import sdreader 47 r = sdreader(filename,-1,-1) 57 ifSel = -1 58 beamSel = -1 59 if unit is None: 60 unit = "" 61 r = sdreader(filename,unit,ifSel,beamSel) 48 62 print 'Importing data...' 49 63 r.read([-1])
Note:
See TracChangeset
for help on using the changeset viewer.