Custom Query (241 matches)
Results (109 - 111 of 241)
Ticket | Owner | Reporter | Resolution | Summary |
---|---|---|---|---|
#92 | duplicate | Various problems encountered (as emailed when ticketing not working) | ||
Description |
Chris & Malte No, I'm not pestering you about not having ASAP working this time! No, I'm pestering you about some bugs I've found, some of which are rather annoying, and some of which are merely a nuisance. The first two are illustrated in the first sequence of commands below. The first has to do with the file name. You will see that the section "SCAN0_CYCLE0_BEAM0_IF0" is added to the name of every file I create, despite the fact that I actually specify the name I want in q1.save. The second has to do with actually writing these files out. In the sequence below I am trying to create files for spectra in 7 IFs. The spectra themselves are fine (I can see them on the Plotter). But for only the first 2 IFs can I actually write a file. You will see the error below ("Illegal ro number") - which happens for IFs 2 to 6 in my case. When this happens just a partial header is written: ###################################################################### # Name: imlup # # Position: J2000 15:56:09.1 -37.56.05.8 # # Time: 2006/07/20/09:24:39 # # Flux Unit: K # # Pol Type: stokes # but no data appears in the file! This partial header happens for IFs 2 & 3. For IFs 4, 5 & 6 the file is completely empty! Its worse if I try to save the files as a SDFITS. In this case Python itself crashes! ASAP>q1.save('iras13481_SO_','SDFITS','overwrite') /Library/Frameworks/Python.framework/Versions/Current/bin/asap: line 54: 708 Bus error $ip -ipythondir "${HOME}/.asap" -p 'asap' $* mgb12:~/Desktop/Mopra DQS stuff/Spectra mgb$
SEQUENCE ONE ASAP>sel = selector() ASAP>plotter.set_range() ASAP> ASAP>sel.set_ifs([0]) ASAP>q1.set_selection(sel) ASAP>q1.save('imlup_SO_','ASCII','overwrite') Wrote imlup_SO_SCAN0_CYCLE0_BEAM0_IF0.txt ASAP>plotter.set_title(IM Lup SO 109.252 GHz) ASAP>plotter.plot(q1) ASAP>plotter.save('imlup_SO.png') Written file imlup_SO.png ASAP> ASAP>sel.set_ifs([1]) ASAP>q1.set_selection(sel) ASAP>q1.save('imlup_C18O_','ASCII','overwrite') Wrote imlup_C18O_SCAN0_CYCLE0_BEAM0_IF1.txt ASAP>plotter.set_title(IM Lup C18O 109.782 GHz) ASAP>plotter.plot(q1) ASAP>plotter.save('imlup_C18O.png') Written file imlup_C18O.png ASAP> ASAP>sel.set_ifs([2]) ASAP>q1.set_selection(sel) ASAP>q1.save('imlup_HNCO_','ASCII','overwrite') Traceback (most recent call last):
RuntimeError: Illegal ro number ASAP>plotter.set_title(IM Lup HNCO 109.905 GHz) ASAP>plotter.plot(q1) ASAP>plotter.save('imlup_HNCO.png') Written file imlup_HNCO.png ASAP>
The next problem is trying to read in a line list, for instance the example below. File: moleculelist.txt mol1 109220 100.0 1.0 mol2 109770 100.0 1.0 mol3 109910 100.0 1.0 mol4 110190 100.0 1.0 mol5 112390 100.0 1.0 mol6 113220 100.0 1.0 mol7 115290 100.0 1.0 The line catalogue cant then be read; see sequence two below. I have been able to enter line frequencies by hand, eg q1.set_restfreqs([109252.212,109782.173,109905.753,110201.353,112358.988,113191,115271.202],'MHz') but this rather defeats the purpose of having a catalogue! * SEQUENCE TWO ASAP>mols = linecatalog('moleculelist.txt') ASAP>mols.save('mols.tbl') ASAP>mols=linecatalog('mols.tbl') ASAP>mols.summary() Traceback (most recent call last):
RuntimeError: Invalid Table data type when accessing column in ROScalarColumn ctor for column Column2 ASAP> * A third problem is trying to print out a stack of spectra. In sequence three below I have to set the IFs range to be (0,7) despite there only be 7 IFs (ie I should really only have to have the range to be (0,6) since the first IF is #0). If I dont do this the final spectrum is missed and I only get 6 spectra, not 7. When the spectra are plotted, the y-axis is automatically chosen to be that appropriate to the largest y-range for the various spectra. However, since some lines are very much stronger than others, I'd prefer it if each plot could be auto-scaled (or its range set individually). However I couldn't work out how to do this. Have I missed something, or is this a feature you can add to the software? * SEQUENCE THREE plotter.set_layout(7,1) plotter.set_mode('t','i') sel = selector() sel.set_ifs(range(0,7)) q1.set_selection(sel) plotter.set_range(-80,-30) plotter.set_legend(mode=-1) plotter.set_title(['IRAS13481-6124 HC3N','C18O','HNCO','13CO','C17O','CN','12CO']) plotter.plot(q1) plotter.save('iras1341-6124_alllines.png') * Thanks very much - it is nice to be able to see the data now! Cheers Michael |
|||
#95 | worksforme | Runtime error while using a mask with the auto_poly_baseline() function | ||
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 |
|||
#96 | fixed | TypeError exception in fitter.plot | ||
Description |
Hi Malte, When we updated casapy to python2.5, I started to see the following error. matplotlib-0.87.7 in casapy uses numpy as default array package. Tak CASA <77>: f.plot() --------------------------------------------------------------------------- <type 'exceptions.TypeError'> Traceback (most recent call last) /export/home/minor/alma/SingleDish/ALMATST5/data/GBT_spectralline/<ipython console> in <module>() /export/home/minor/casa/devel/linux_gnu/python/2.5/asap/asapfitter.py in plot(self, residual, components, plotparms, filename) 500 m = logical_and(self.mask, 501 array(self.data._getmask(self._fittedrow)), --> 502 copy=False) 503 504 ylab = self.data._get_ordinate_label() <type 'exceptions.TypeError'>: 'copy' is an invalid keyword to logical_and |