Changeset 2900 for trunk/python
- Timestamp:
- 03/12/14 12:23:31 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapmath.py
r2845 r2900 823 823 824 824 @asaplog_post_dec 825 def merge(*args ):825 def merge(*args, **kwargs): 826 826 """ 827 827 Merge a list of scanatables, or comma-sperated scantables into one … … 829 829 Parameters: 830 830 A list [scan1, scan2] or scan1, scan2. 831 freq_tol: frequency tolerance for merging IFs. numeric values 832 in units of Hz (1.0e6 -> 1MHz) and string ('1MHz') 833 is allowed. 831 834 Example: 832 835 myscans = [scan1, scan2] … … 834 837 # or equivalent 835 838 sameallscans = merge(scan1, scan2) 839 # with freqtol 840 allscans = merge(scan1, scan2, freq_tol=1.0e6) 841 # or equivalently 842 allscans = merge(scan1, scan2, freq_tol='1MHz') 836 843 """ 837 844 varlist = vars() … … 842 849 else: 843 850 lst = tuple(args) 851 if kwargs.has_key('freq_tol'): 852 freq_tol = str(kwargs['freq_tol']) 853 else: 854 freq_tol = '' 844 855 varlist["args"] = "%d scantables" % len(lst) 845 856 # need special formatting her for history... … … 850 861 msg = "Please give a list of scantables" 851 862 raise TypeError(msg) 852 s = scantable(stm._merge(lst ))863 s = scantable(stm._merge(lst, freq_tol)) 853 864 s._add_history("merge", varlist) 854 865 return s
Note:
See TracChangeset
for help on using the changeset viewer.