Changeset 393
- Timestamp:
- 02/08/05 15:48:29 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r391 r393 485 485 return msk 486 486 487 def set_restfreqs(self, freqs, unit='Hz'):488 """489 Set the restfrequency(s) for this scantable.490 Parameters:491 freqs: one or more frequencies492 unit: optional 'unit', default 'Hz'493 Example:494 scan.set_restfreqs([1000000000.0])495 """496 if type(freqs) is float or int:497 freqs = (freqs)498 sdtable._setrestfreqs(self,freqs, unit)499 return500 501 487 def get_restfreqs(self): 502 488 """ … … 510 496 return list(self._getrestfreqs()) 511 497 512 def select_restfreq(self, freq, unit='Hz', source=None, theif=None): 513 """ 514 Select the restfrequency for the specified source and IF 515 Parameters: 498 def set_restfreqs(self, freqs, unit='Hz', source=None, theif=None): 499 """ 500 Select the restfrequency for the specified source and IF OR 501 replace for all IFs. If the 'freqs' argument holds a scalar, 502 then that rest frequency will be applied to the selected 503 data (and added to the list of available rest frequencies). 504 In this way, you can set a rest frequency for each 505 source and IF combination. If the 'freqs' argument holds 506 a vector, then it MUST be of length the number of IFs 507 (and the available restfrequencies will be replaced by 508 this vector). In this case, *all* data ('source' and 509 'theif' are ignored) have the restfrequency set per IF according 510 to the corresponding value you give in the 'freqs' vector. 511 E.g. 'freqs=[1e9,2e9]' would mean IF 0 gets restfreq 1e9 and 512 IF 1 gets restfreq 2e9. 513 Parameters: 514 freqs: rest frequencies 515 unit: unit for rest frequency (default 'Hz') 516 516 source: Source name (blank means all) 517 517 theif: IF (-1 means all) 518 freq: rest frequency 519 unit: unit for rest frequency (default 'Hz') 520 Example: 521 scan.select_restfreq(freq=1.4e9, source='NGC253', theif=2) 518 Example: 519 scan.set_restfreqs(freqs=1.4e9, source='NGC253', theif=2) 520 scan.set_restfreqs(freqs=[1.4e9,1.67e9]) 522 521 """ 523 522 if source is None: … … 525 524 if theif is None: 526 525 theif = -1 527 sdtable._selectrestfreq(self, freq, unit, source, theif) 526 t = type(freqs) 527 if t is int or t is float: 528 freqs = [freqs] 529 sdtable._setrestfreqs(self, freqs, unit, source, theif) 528 530 return 529 531
Note:
See TracChangeset
for help on using the changeset viewer.