Opened 17 years ago

Closed 17 years ago

#92 closed defect (duplicate)

Various problems encountered (as emailed when ticketing not working)

Reported by: bugs Owned by: Malte Marquarding
Priority: normal Milestone:
Component: General Version: 2.0
Severity: major Keywords:
Cc:

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):

File "<ipython console>", line 1, in ? File "/Library/Frameworks/Python?.framework/Versions/2.4/lib/python2.4/site-packages/asap/scantable.py", line 120, in save

writer.write(self, name)

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):

File "<ipython console>", line 1, in ? File "/Library/Frameworks/Python?.framework/Versions/2.4/lib/python2.4/site-packages/asap/linecatalog.py", line 45, in summary

pager(lcbase.summary(self, -1))

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

Change History (1)

comment:1 Changed 17 years ago by Malte Marquarding

Resolution: duplicate
Status: newclosed

Hi Micheal,

these had been submitted as seperate ones by me already. You should have been cc'ed

Note: See TracTickets for help on using tickets.