Opened 17 years ago

Closed 17 years ago

#94 closed defect (fixed)

Segmentation Fault when averaging fully masked scans

Reported by: AndrewWalsh <andrew.walsh@…> Owned by: Malte Marquarding
Priority: low Milestone: ASAP 2.1
Component: General Version: 2.0
Severity: normal Keywords:
Cc: andrew.walsh@…

Description (last modified by Malte Marquarding)

I am trying to edit bad data in ASAP. Some scans are bad, so I want to mask the entire scan. When I do this, and later time-average the data, ASAP crashes on me. Here is the script I use that will cause a crash:


s = scantable('2006-11-29_1258-M179.rpf')
q = s.auto_quotient()
q.set_unit('channel')
#
# DROP BAD SCANS
#
sel2 = selector()
sel2.set_scans([1])
q.set_selection(sel2)
msk1 = q.create_mask([0,8200])
q.flag(msk1)
#
#
#
av=q.average_time(weight='tsys')

ASAP will crash on the last line of this script (called fail.py), with the following:

ASAP>execfile('fail.py')
Auto averaging integrations
Importing 2006-11-29_1258-M179.rpf...
The current mask window unit is channel

/usr/bin/asap: line 54: 29374 Segmentation fault      $ip -ipythondir "${HOME}/.asap" -p 'asap' $*

Note that if I change the script so that channels 0 to 200 are masked (or indeed any number of channels != to all channels), ASAP will happily average scans.

I have also tried this on many files which contain more than two scans, with the same result.

Later. Andrew xxx

Change History (2)

comment:1 Changed 17 years ago by Malte Marquarding

Cc: andrew.walsh@… added
Description: modified (diff)
Priority: normallow
Status: newassigned

You forgot to reset the selection

q.flag(msk1)

q.set_selection() # <------

av=q.average_time(weight='tsys')

Otherwise you are trying to average the flagged data only.

This should bow out gracefully though. It should work, but maybe use the more appropriate

qd = q.drop_scan([1])

instead of flagging.

comment:2 Changed 17 years ago by Malte Marquarding

Resolution: fixed
Status: assignedclosed

Fixed in trunk, available in the next release.

Note: See TracTickets for help on using tickets.