Changeset 516 for trunk/python
- Timestamp:
- 02/28/05 16:56:53 (20 years ago)
- Location:
- trunk/python
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asaplinefind.py
r514 r516 15 15 else: 16 16 print "No lines found!" 17 sc2= poly_baseline(sc,fl.get_mask(),7)17 sc2=sc.poly_baseline(fl.get_mask(),7) 18 18 19 19 The algorithm involves a simple threshold criterion. The line is … … 79 79 if not scan: 80 80 raise RuntimeError, 'Please give a correct scan' 81 from asap import _is_sequence_or_number as _is_valid 82 83 if not _is_valid(edge, int): 84 raise RuntimeError, "Parameter 'edge' as to be an integer or \ 85 a pair of integers" 86 81 87 if len(edge)>2: 82 88 raise RuntimeError, "The edge parameter should have two \ … … 84 90 if mask is None: 85 91 from numarray import ones 86 self.finder.setscan(scan,ones(scan.nchan()), edge)92 self.finder.setscan(scan,ones(scan.nchan()),tuple(edge)) 87 93 else: 88 self.finder.setscan(scan,mask, edge)94 self.finder.setscan(scan,mask,tuple(edge)) 89 95 return 90 96 def find_lines(self,nRow=0): … … 121 127 else: 122 128 return self.finder.getlinerangesinchannels() 123 -
trunk/python/scantable.py
r513 r516 1103 1103 1104 1104 Example: 1105 sc 2=auto_poly_baseline(order=7)1105 scan2=scan.auto_poly_baseline(order=7) 1106 1106 """ 1107 1107 if insitu is None: insitu = rcParams['insitu'] … … 1112 1112 1113 1113 if not _is_valid(edge, int): 1114 print "Parameter 'edge' as to be an integer or a pair of integers"1115 return1114 raise RuntimeError, "Parameter 'edge' has to be an integer or a \ 1115 pair of integers specified as a tuple" 1116 1116 1117 1117 # setup fitter
Note:
See TracChangeset
for help on using the changeset viewer.