Opened 17 years ago

Closed 17 years ago

#88 closed defect (fixed)

scantabel.stats - No registered converter was able to produce a C++ rvalue of type bool

Reported by: darrell@… Owned by: Malte Marquarding
Priority: high Milestone: ASAP 2.2
Component: General Version: 2.0
Severity: critical Keywords: numpy, mask
Cc: darrell@…, jmcmulli@…

Description

Hi Malte,

I'm getting an error going though your mopra test case... below is what I do. This is with python 2.4.2 and with numpy 1.0. I'm wondering if you expect an old version of numpy? Because I had to change all of your import lines from:

from numarray import ...

to:

from numpy.numarray import ...

because it complained that there was no "numarray" package... since numarray is included beneath numpy (at least with numpy 1.0). Thanks for any help...

Darrell

CASA <1>: import asap as sd

CASA <2>: s = sd.scantable("mopra_dualif.rpf")
Auto averaging integrations
Importing mopra_dualif.rpf...

CASA <3>: q = s.auto_quotient()

CASA <4>: restfreqs = [110.201,86.243]

CASA <5>: q.set_restfreqs(restfreqs,"GHz")

CASA <6>: q.set_unit("km/s")

CASA <7>: q.set_freqframe("LSRK")

CASA <8>: q.auto_poly_baseline()
Wed Nov 1 15:34:32 2006      WARN MeasIERS::fillMeas(MeasIERS::Files, Double) (f
ile /usr/src/redhat/BUILD/casapy-20.0.199/code/measures/implement/Measures/MeasI
ERS.cc, line 94):
Requested JD53498.2 is outside the IERS table data range
Calculations will proceed with less precision
Wed Nov 1 15:34:32 2006      WARN MeasTable::dUT1(Double) (file /usr/src/redhat/
BUILD/casapy-20.0.199/code/measures/implement/Measures/MeasTable.cc, line 6437):
No requested dUT1 data available from IERS tables.
Proceeding with probably less precision.
Wed Nov 1 15:34:32 2006    SEVERE MeasTable::dUTC(Double) (file /usr/src/redhat/
BUILD/casapy-20.0.199/code/measures/implement/Measures/MeasTable.cc, line 6308):
Leap second table TAI_UTC seems out-of-date.
Until table is updated (see aips++ manager) times and coordinates
derived from UTC could be wrong by 1s or more.
Processing:
Scan[0] Beam[0] IF[0] Pol[0] Cycle[0]
  p0= -0.223352
Scan[0] Beam[0] IF[1] Pol[0] Cycle[0]
  p0= -0.593133

CASA <9>: q.convert_flux()
Converting to Jy
Looking up conversion factors
Using aperture efficiency data from 2004
Using aperture efficiency data from 2004


CASA <10>: msk = q.create_mask([-70,20], [20,70])
The current mask window unit is km/s


CASA <11>: rms = q.stats("rms",msk)
---------------------------------------------------------------------------
exceptions.TypeError                                 Traceback (most recent call
last)

/export/users/dschieb/<ipython console>

/usr/lib/casapy/20.0.199-02/lib/python2.4/asap/scantable.py in stats(self, stat,
mask)
    281                               "Please use setselection() to select indiv
idual IFs")
    282
--> 283         statvals = self._math._stats(self, mask, stat)
    284         out = ''
    285         axes = []

TypeError: No registered converter was able to produce a C++ rvalue of type bool
from this Python object of type numpy.float64

Change History (1)

comment:1 Changed 17 years ago by Malte Marquarding

Resolution: fixed
Status: newclosed

Removed dependency on numpy/numarray. Available in Release 2.1.1.

Note: See TracTickets for help on using tickets.