Ignore:
Timestamp:
07/18/09 06:35:47 (15 years ago)
Author:
TakTsutsumi
Message:

New Development: No, merge with asap2.3.1

JIRA Issue: Yes CAS-1450

Ready to Release: Yes/No?

Interface Changes: Yes/No?

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes

Module(s): single dish

Description: Upgrade of alma branch based on ASAP2.2.0

(rev.1562) to ASAP2.3.1 (rev.1561)


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/src/RowAccumulator.cpp

    r1446 r1603  
    4444    Vector<Bool> dummymsk(m.nelements(), True);
    4545    spectrum_.setData(dummy, dummymsk);
    46     n_.setData(Vector<Float>(v.nelements(), 0.0), dummymsk);
     46    n_.setData(Vector<uInt>(v.nelements(), 0), dummymsk);
    4747    weightSum_.setData(Vector<Float>(v.nelements(), 0.0), dummymsk);
    4848    tsysSum_.resize(tsys.nelements()); tsysSum_=0.0;
     
    5050  // add spectrum related weights, so far it is variance only.
    5151  Float totalweight = 1.0;
    52   totalweight *= addTsys(tsys);
     52
    5353  // only add these if not everything masked
    5454  if ( !allEQ(m, False) ) {
     55    totalweight *= addTsys(tsys);
    5556    totalweight *= addInterval(interval);
    5657    addTime(time);
     
    7980  weightSum_ += wadd;
    8081  spectrum_ += data;
    81   const MaskedArray<Float> inc(Vector<Float>(m.nelements(),1.0), m);
     82  const MaskedArray<uInt> inc(Vector<uInt>(m.nelements(),1), m);
    8283  n_ += inc;
    8384}
     
    125126casa::Double asap::RowAccumulator::getTime( ) const
    126127{
    127   Float n = max(n_);
    128   if (n < 1.0) n = 1.0;
    129   return timeSum_/n;
     128  uInt n = max(n_);
     129  return timeSum_/Float(n);
    130130}
    131131
     
    138138{
    139139  // Return the "total" mask - False where no points have been accumulated.
    140   return (n_.getArray() > Float(0.0));
     140  return (n_.getArray() > uInt(0));
    141141}
    142142
     
    144144{
    145145  // @fixme this assumes tsys.nelements() == 1
    146   return tsysSum_/max(n_);
     146  return tsysSum_/Float(max(n_));
    147147}
    148148
     
    158158  return initialized_;
    159159}
     160
Note: See TracChangeset for help on using the changeset viewer.