Opened 17 years ago

Closed 17 years ago

#89 closed defect (fixed)

IF selection doesn't allow export to ascii/sdfits

Reported by: bugs Owned by: Malte Marquarding
Priority: high Milestone: ASAP 2.1
Component: General Version: 2.0
Severity: major Keywords: selector, export
Cc: mgb@…

Description

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 &

  1. 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$ 
    
    
    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
    

Change History (1)

comment:1 Changed 17 years ago by Malte Marquarding

Resolution: fixed
Status: newclosed

This has been fixed and will be available in Release 2.1.1.

SDFITS might still not work properly as having e.g. IF3 only, does not go well with the IF table definition. For the time being even if you export only one IF, the number of IFs will still be that in the original table.

Note: See TracTickets for help on using tickets.