Changeset 876 for trunk/python/asapmath.py
- Timestamp:
- 03/06/06 11:51:04 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapmath.py
r720 r876 45 45 # need special formatting her for history... 46 46 47 from asap._asap import average as _av 47 from asap._asap import stmath 48 stm = stmath() 48 49 for s in lst: 49 50 if not isinstance(s,scantable): … … 54 55 else: 55 56 raise TypeError(msg) 56 s = scantable(_av(lst, mask, scanAv, weight)) 57 if scanAv: scanAv = "SCAN" 58 else: scanAv = "NONE" 59 s = scantable(stm._average(lst, mask, weight, scanAv, False)) 57 60 s._add_history("average_time",varlist) 58 61 print_log() 59 62 return s 60 63 61 def quotient(source, reference, preserve=True):62 """63 Return the quotient of a 'source' (signal) scan and a 'reference' scan.64 The reference can have just one row, even if the signal has many. Otherwise65 they must have the same number of rows.66 The cursor of the output scan is set to 067 Parameters:68 source: the 'on' scan69 reference: the 'off' scan70 preserve: you can preserve (default) the continuum or71 remove it. The equations used are72 preserve: Output = Toff * (on/off) - Toff73 remove: Output = Toff * (on/off) - Ton74 """75 varlist = vars()76 from asap._asap import quotient as _quot77 s = scantable(_quot(source, reference, preserve))78 s._add_history("quotient",varlist)79 print_log()80 return s64 # def quotient(source, reference, preserve=True): 65 # """ 66 # Return the quotient of a 'source' (signal) scan and a 'reference' scan. 67 # The reference can have just one row, even if the signal has many. Otherwise 68 # they must have the same number of rows. 69 # The cursor of the output scan is set to 0 70 # Parameters: 71 # source: the 'on' scan 72 # reference: the 'off' scan 73 # preserve: you can preserve (default) the continuum or 74 # remove it. The equations used are 75 # preserve: Output = Toff * (on/off) - Toff 76 # remove: Output = Toff * (on/off) - Ton 77 # """ 78 # varlist = vars() 79 # from asap._asap import quotient as _quot 80 # s = scantable(_quot(source, reference, preserve)) 81 # s._add_history("quotient",varlist) 82 # print_log() 83 # return s 81 84 82 85 def simple_math(left, right, op='add', tsys=True): … … 94 97 """ 95 98 varlist = vars() 99 print "Not yet available in asap" 100 return 96 101 if not isinstance(left,scantable) and not isinstance(right,scantable): 97 102 msg = "Please provide two scantables as input"
Note: See TracChangeset
for help on using the changeset viewer.