Opened 12 years ago

Closed 12 years ago

#269 closed defect (fixed)

rc parameter scantable.reference no longer works

Reported by: simon.ellingsen@… Owned by: Malte Marquarding
Priority: normal Milestone: Unified development
Component: General Version: 2.0
Severity: normal Keywords:
Cc:

Description

Hi Malte,

One of my students is running ASAP 4.0.0 under linux and we are having trouble getting the values in the .asaprc file recognised on startup.  I'm not sure if this is a bug, or something stupid that I'm doing.

The .asaprc file contains just a single line
scantable.reference        : .*(e|w|_R|\+R|\-R)$

The file has permissions 644 and I've had this setup working well under previous versions of ASAP.

On startup ASAP gives the following messages :
Loading ASAP...
loaded rc file /home/Ellen/.asaprc
Welcome to ASAP v4.0.0 (2011-10-05) - the ATNF Spectral Analysis Package

Please report any bugs via:
http://svn.atnf.csiro.au/trac/asap/simpleticket

but when we type list_rcparameters() we get the following for scantable.reference :
# Control the identification of reference (off) scans
# This is has to be a regular expression
scantable.reference        : .*(e|w|_R)$

The data from Hobart has the references labelled with +R, so until I can correct this we can't use the auto_quotient method, which is a major pain.

Regards

Simon

Change History (3)

comment:1 Changed 12 years ago by Malte Marquarding

Status: newassigned

A quick work around is:

def fixoff(s):
    s.set_selection(query="SRCNAME=regex('.*(\+R)$')")
    s._setsourcetype(1)
    s.set_selection() 

There are two issues:

  • setreferenceexpr in scantable was applied before the data is attached.
  • scantable.set_sourcetype was broken so the alternative didn't work either.

for future reference. scantable.set_sourcetype can be used for setting on/offs by hand. e.g.

myscan = scantable("blah.rpf")
myscan.set_sourcetype('.*(\\+R)$', 'regex', sourcetype='r')

comment:2 Changed 12 years ago by Malte Marquarding

This has been fixed in r2480 and will be available in asap-4.1.0.

comment:3 Changed 12 years ago by Malte Marquarding

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.