Changeset 1496 for branches/alma
- Timestamp:
- 02/04/09 11:01:51 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/python/scantable.py
r1457 r1496 12 12 """ 13 13 14 def __init__(self, filename, average=None, unit=None ):14 def __init__(self, filename, average=None, unit=None, getpt=None): 15 15 """ 16 16 Create a scantable from a saved one or make a reference … … 33 33 if average is None: 34 34 average = rcParams['scantable.autoaverage'] 35 if getpt is None: 36 getpt = False 35 37 varlist = vars() 36 38 from asap._asap import stmath … … 58 60 if unit is not None: 59 61 self.set_fluxunit(unit) 60 self.set_freqframe(rcParams['scantable.freqframe']) 62 # do not reset to the default freqframe 63 #self.set_freqframe(rcParams['scantable.freqframe']) 61 64 else: 62 65 msg = "The given file '%s'is not a valid " \ … … 68 71 raise IOError(msg) 69 72 else: 70 self._fill([filename], unit, average )73 self._fill([filename], unit, average, getpt) 71 74 elif (isinstance(filename, list) or isinstance(filename, tuple)) \ 72 75 and isinstance(filename[-1], str): 73 self._fill(filename, unit, average )76 self._fill(filename, unit, average, getpt) 74 77 self._add_history("scantable", varlist) 75 78 print_log() … … 1890 1893 return (sum(nchans)/len(nchans) == nchans[0]) 1891 1894 1892 def _fill(self, names, unit, average ):1895 def _fill(self, names, unit, average, getpt): 1893 1896 import os 1894 1897 from asap._asap import stfiller … … 1915 1918 asaplog.push(msg, False) 1916 1919 print_log() 1917 r._open(name, -1, -1 )1920 r._open(name, -1, -1, getpt) 1918 1921 r._read() 1919 1922 #tbl = r._getdata()
Note:
See TracChangeset
for help on using the changeset viewer.