Opened 18 years ago
Last modified 17 years ago
#95 closed defect
Runtime error while using a mask with the auto_poly_baseline() function — at Initial Version
Reported by: | bugs | Owned by: | Malte Marquarding |
---|---|---|---|
Priority: | normal | Milestone: | ASAP 2.1 |
Component: | General | Version: | 2.0 |
Severity: | normal | Keywords: | poly_baseline, mask |
Cc: | cpurcell@… |
Description
Cormac Purcell (cpurcell_(AT)_jb.man.ac.uk
The following is the code snippet causing the error:
# Auto - baseline IF = 1, POL = 1 sc_quo.set_unit('channel') sel1=selector() sel1.set_ifs(ifs) sel1.set_polarisations(pols) sc_quo.set_selection(sel1) mask1 = sc_quo.create_mask([1,100],invert=True) sc_quo.auto_poly_baseline(insitu=True,order=0,mask=mask1,plot=True) sc_quo.set_selection()
The following is the text of the error message:
exceptions.TypeError Traceback (most recent call last)
/home/cpurcell/work_in_progress/RMS_Mopra/test/<ipython console>
/home/cpurcell/work_in_progress/RMS_Mopra/test/mops_funcs.py in mopslook(fname, crestfreq)
43 sc_quo.set_selection(sel1) 44 mask1 = sc_quo.create_mask([1,100],invert=True)
---> 45 sc_quo.auto_poly_baseline(insitu=True,order=0,mask=mask1,plot=True)
46 # sc_quo.set_selection() 47
/usr/lib/python2.4/site-packages/asap/scantable.py in auto_poly_baseline(self, mask, edge, order, threshold, plot, insitu)
1300 1301 # setup line finder
-> 1302 fl.find_lines(r, mask, curedge)
1303 f.set_scan(workscan, fl.get_mask()) 1304 f.x = workscan._getabcissa(r)
/usr/lib/python2.4/site-packages/asap/asaplinefind.py in find_lines(self, nRow, mask, edge)
100 raise RuntimeError, "The edge parameter should have two \ 101 or less elements"
--> 102 return self.finder.findlines(mask,list(edge),nRow)
103 def get_mask(self,invert=False): 104 """
TypeError: No registered converter was able to produce a C++ rvalue of type bool from this Python object of type boolscalar