Changeset 296
- Timestamp:
- 01/25/05 14:58:20 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapmath.py
r273 r296 57 57 return scantable(_quot(source, reference, preserve)) 58 58 59 def simple_math(left, right, op='add' ):59 def simple_math(left, right, op='add', tsys=True): 60 60 """ 61 61 Apply simple mathematical binary operations to two … … 66 66 right: the 'right' scan 67 67 op: the operation: 'add' (default), 'sub', 'mul', 'div' 68 tsys: if True (default) then apply the operation to Tsys 69 as well as the data 68 70 """ 69 71 if not isinstance(left,scantable) and not isinstance(right,scantable): … … 71 73 return 72 74 from asap._asap import b_operate as _bop 73 return scantable(_bop(left, right, op ))74 75 def scale(scan, factor, insitu=None, allaxes=None ):75 return scantable(_bop(left, right, op, tsys)) 76 77 def scale(scan, factor, insitu=None, allaxes=None, tsys=True): 76 78 """ 77 79 Return a scan where all spectra are scaled by the give 'factor' … … 85 87 apply only to the selected (beam/pol/if)spectra only. 86 88 The default is taken from .asaprc (True) 89 tsys: if True (default) then apply the operation to Tsys 90 as well as the data 87 91 """ 88 92 if allaxes is None: allaxes = rcParams['scantable.allaxes'] … … 90 94 if not insitu: 91 95 from asap._asap import scale as _scale 92 return scantable(_scale(scan, factor, allaxes ))96 return scantable(_scale(scan, factor, allaxes, tsys)) 93 97 else: 94 98 from asap._asap import scale_insitu as _scale 95 _scale(scan, factor, allaxes )99 _scale(scan, factor, allaxes, tsys) 96 100 return 97 101
Note:
See TracChangeset
for help on using the changeset viewer.