Ignore:
Timestamp:
04/18/07 16:18:40 (17 years ago)
Author:
mar637
Message:

Fix for Ticket #104; protect the user from flagging the whole scantable. This has performance penalties.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/RowAccumulator.cpp

    r1314 r1333  
    125125casa::Double asap::RowAccumulator::getTime( ) const
    126126{
    127   return timeSum_/max(n_);
     127  Float n = max(n_);
     128  if (n < 1.0) n = 1.0;
     129  return timeSum_/n;
    128130}
    129131
     
    135137casa::Vector< casa::Bool > RowAccumulator::getMask( ) const
    136138{
     139  // if no elements accumulated the mask is all True
     140  // we have to return everything False
     141  if (max(n_) < 1.0) return !spectrum_.getMask();
    137142  return spectrum_.getMask();
    138143}
Note: See TracChangeset for help on using the changeset viewer.