Changeset 895
- Timestamp:
- 03/08/06 14:29:58 (19 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/__init__.py
r880 r895 68 68 'scantable.autoaverage' : [True, _validate_bool], 69 69 'scantable.freqframe' : ['LSRK', str], #default frequency frame 70 'scantable.allaxes' : [True, _validate_bool], # apply action to all axes71 70 'scantable.plotter' : [True, _validate_bool], # use internal plotter 72 71 'scantable.verbosesummary' : [False, _validate_bool] … … 119 118 # scantable.set_freqfrmae is called 120 119 scantable.freqframe : LSRK 121 122 # apply action to all axes not just the cursor location123 scantable.allaxes : True124 125 # use internal plotter126 scantable.plotter : True127 120 128 121 # Control the level of information printed by summary … … 250 243 251 244 from asapfitter import * 252 #from asapreader import reader245 from asapreader import reader 253 246 254 247 from asapmath import * -
trunk/python/asapreader.py
r719 r895 1 from asap._asap import s dreader1 from asap._asap import stfiller 2 2 from asap import print_log 3 3 4 class reader(s dreader):4 class reader(stfiller): 5 5 """ 6 6 This class allows the user to import single dish files … … 46 46 from os.path import expandvars 47 47 filename = expandvars(filename) 48 s dreader.__init__(self, filename, theif, thebeam)48 stfiller.__init__(self, filename, theif, thebeam) 49 49 print_log() 50 50 51 def read(self ,integrations=None):51 def read(self): 52 52 """ 53 53 Reads in an returns a specified sequence of integrations. 54 54 If no list is given all integrations a read in. 55 Parameters:56 integrations: a 'range' of integration numbers, e.g.57 range(100) or [0,1,2,3,4,10,11,100]58 If not given (default) all integrations59 are read in60 Example:61 r.read([0,1,2,3,4]) # reads in the first 5 integatrions62 # NOT scans63 r.read(range(100)) # read in the first 100 integrations64 55 """ 65 56 from asap import scantable … … 68 59 integrations = [-1] 69 60 asaplog.push("Reading integrations from disk...") 70 sdreader._read(self,integrations) 71 tbl = sdreader._getdata(self) 72 sdreader._reset(self) # reset to the beginning of the file 61 stfiller._read(self) 62 tbl = stfiller._getdata(self) 73 63 if self.unit is not None: 74 64 tbl.set_fluxunit(self.unit) 75 65 print_log() 76 66 return scantable(tbl) 67 68 def close(self): 69 """ 70 Close the reader. 71 """ 72 self._close() 77 73 78 74 def summary(self, name=None): … … 85 81 r.summary() 86 82 """ 87 sdreader._reset(self) 88 sdreader._read(self,[-1]) 83 stfiller._read(self) 89 84 from asap import scantable 90 tbl = scantable(sdreader._getdata(self)) 91 sdreader._reset(self) 85 tbl = scantable(stfiller._getdata(self)) 92 86 tbl.summary(name) 87 del tbl 93 88 return -
trunk/src/STFiller.cpp
r878 r895 328 328 throw(AipsError("Reading error occured, data possibly corrupted.")); 329 329 } 330 331 330 return status; 332 331 } -
trunk/src/python_STFiller.cpp
r872 r895 43 43 .def("_open", &STFillerWrapper::open) 44 44 .def("_read", &STFillerWrapper::read) 45 .def("_close", &STFillerWrapper::close) 45 46 .def("_getdata", &STFillerWrapper::getScantable) 46 47 ;
Note:
See TracChangeset
for help on using the changeset viewer.