Opened 15 years ago

Last modified 14 years ago

#181 assigned defect

plotting a saved file with one IF doesn't work

Reported by: G.Fuller@… Owned by: Malte Marquarding
Priority: normal Milestone: ASAP 3.0
Component: General Version: 2.0
Severity: major Keywords:
Cc: Takeshi Nakazato

Description (last modified by Malte Marquarding)

Code to demo bug:

    d = scantable('2010-03-24_1445_316p81-0p06.rpf')

    m = d.auto_quotient()

    m.set_freqframe('LSRK')
    m.set_unit('GHz')
    m.freq_align()

    iffreqs = [23.6945e9,24.13939e9]

    m.set_restfreqs(iffreqs) # Set the (1,1) and (4,4) freFs
    pdq = m.average_pol(weight='tsys')
    av = average_time(pdq,weight='tsys',align=False)
    bsp = av.copy()
    
    bsp.save('blspec',overwrite=True)
    resp=scantable('blspec')
    plotter.plot(resp)

works but

    ifno=0
    sel=selector()	
    sel.set_ifs(ifno)
    bsp.set_selection(sel)

    bsp.save('only1IF',overwrite=True)
    resp=scantable('only1IF')
    plotter.plot(resp)

dies with the message

/usr/lib64/python2.6/site-packages/asap/asapplotter.py in _plot(self, scan)
    765                     y = scan._getspectrum(r, polmodes[scan.getpol(r)])
    766                 else:
--> 767                     y = scan._getspectrum(r)
    768                 m = scan._getmask(r)
    769                 from matplotlib.numerix import logical_not, logical_and

RuntimeError: Table DataManager error: Invalid operation: MSM: no array in row 0 of /local/home/gaf/DATA/Parkes/MMB_NH3/temp14634_856/table.f1

Change History (5)

comment:1 by Malte Marquarding, 15 years ago

Description: modified (diff)
Owner: changed from Malte Marquarding to Malte Marquarding
Status: newassigned

comment:2 by Malte Marquarding, 15 years ago

A quick workaround for now is to copy before save.

    ifno=0
    sel=selector()	
    sel.set_ifs(ifno)
    bsp.set_selection(sel)
    bspcp = bsp.copy()
    bspcp.save('only1IF',overwrite=True)
    resp=scantable('only1IF')
    plotter.plot(resp)

comment:3 by Malte Marquarding, 15 years ago

This is a bug in casacore and occurs only when

  • input table is a memory table (default in asap)
  • a selection has been set

I have added a temporary fix which copies the table before saving it to disk. This needs to be removed when a fix in casacore is available.

I believe ticket #182 is related to this.

comment:4 by Malte Marquarding, 14 years ago

This has been fixed in upstream casacore: http://code.google.com/p/casacore/source/detail?r=20889 The workaround can be remove now.

comment:5 by Takeshi Nakazato, 14 years ago

Cc: Takeshi Nakazato added
Note: See TracTickets for help on using tickets.