Changeset 1757 for branches/alma/python/asapmath.py
- Timestamp:
- 06/09/10 19:03:06 (14 years ago)
- Location:
- branches/alma
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma
-
Property
svn:ignore
set to
.sconf_temp
.sconsign.dblite
-
Property
svn:mergeinfo
set to
/branches/asap-3.x merged eligible
-
Property
svn:ignore
set to
-
branches/alma/python/asapmath.py
r1693 r1757 1 1 from asap.scantable import scantable 2 2 from asap import rcParams 3 from asap import print_log 3 from asap import print_log, print_log_dec 4 4 from asap import selector 5 5 from asap import asaplog 6 6 from asap import asaplotgui 7 7 8 #@print_log_dec 8 9 def average_time(*args, **kwargs): 9 10 """ … … 29 30 # without using a mask 30 31 scanav = average_time(scana,scanb) 31 32 32 # or equivalent 33 # scanav = average_time([scana, scanb]) 33 34 # return the (time) averaged scan, i.e. the average of 34 35 # all correlator cycles … … 122 123 return s 123 124 125 #@print_log_dec 124 126 def dototalpower(calon, caloff, tcalval=0.0): 125 127 """ … … 140 142 return s 141 143 144 #@print_log_dec 142 145 def dosigref(sig, ref, smooth, tsysval=0.0, tauval=0.0): 143 146 """ … … 160 163 return s 161 164 165 #@print_log_dec 162 166 def calps(scantab, scannos, smooth=1, tsysval=0.0, tauval=0.0, tcalval=0.0, verify=False): 163 167 """ … … 442 446 return ress 443 447 448 #@print_log_dec 444 449 def calnod(scantab, scannos=[], smooth=1, tsysval=0.0, tauval=0.0, tcalval=0.0, verify=False): 445 450 """ … … 682 687 return resspec 683 688 689 #@print_log_dec 684 690 def calfs(scantab, scannos=[], smooth=1, tsysval=0.0, tauval=0.0, tcalval=0.0, verify=False): 685 691 """ … … 889 895 return resspec 890 896 891 def simple_math(left, right, op='add', tsys=True): 892 """ 893 Apply simple mathematical binary operations to two 894 scan tables, returning the result in a new scan table. 895 The operation is applied to both the correlations and the TSys data 896 The cursor of the output scan is set to 0 897 Parameters: 898 left: the 'left' scan 899 right: the 'right' scan 900 op: the operation: 'add' (default), 'sub', 'mul', 'div' 901 tsys: if True (default) then apply the operation to Tsys 902 as well as the data 903 """ 904 #print "simple_math is deprecated use +=/* instead." 905 asaplog.push( "simple_math is deprecated use +=/* instead." ) 906 print_log('WARN') 907 897 #@print_log_dec 908 898 def merge(*args): 909 899 """ … … 914 904 Example: 915 905 myscans = [scan1, scan2] 916 917 918 906 allscans = merge(myscans) 907 # or equivalent 908 sameallscans = merge(scan1, scan2) 919 909 """ 920 910 varlist = vars()
Note: See TracChangeset
for help on using the changeset viewer.