Changeset 3058 for trunk/src


Ignore:
Timestamp:
11/10/15 15:57:08 (9 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-8062

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Do not add redundant row to POINTING table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MSWriter.cpp

    r3033 r3058  
    676676    : BaseMSWriterVisitor(table),
    677677      ms(mstable),
    678       addScanrate_(False)
     678      addScanrate_(False),
     679      pointingTimeList_(table.nrow(), -1.0),
     680      referenceBeam_(-1)
    679681  {
    680682    rowidx = 0 ;
     
    752754   
    753755    feedId = (Int)columnValue ;
     756    if (referenceBeam_ < 0) {
     757      referenceBeam_ = feedId;
     758      LogIO os;
     759      os << "Reference beam is " << referenceBeam_ << LogIO::POST;
     760    }
    754761
    755762    // put value
     
    806813    Double interval = intervalCol.asdouble( recordNo ) ;
    807814
    808     if ( ptName.empty() ) {
     815    // add POINTING row only when 1) BEAMNO is 0 and
     816    // 2) there is no row corresponding to the current timestamp
     817    //LogIO os;
     818    //os << "feedId = " << feedId << LogIO::POST;
     819    if ( ptName.empty() && //feedId == referenceBeam_ &&
     820        (potab.nrow() == 0 || allNE(pointingTimeList_(Slice(0, potab.nrow())), timeSec))) {
     821      LogIO os;
     822      os << LogIO::DEBUGGING << "ROW " << recordNo << " Beam " << feedId
     823          << ": adding pointing row, potab.nrow() = " << potab.nrow() << LogIO::POST;
     824      pointingTimeList_[potab.nrow()] = timeSec;
    809825      Vector<Double> dir = directionCol( recordNo ) ;
    810826      Vector<Double> rate = scanRateCol( recordNo ) ;
     827      if (feedId != referenceBeam_) {
     828        os << LogIO::DEBUGGING << "TODO: Need to store pointing direction of reference beam"
     829            << " if only non-reference beam row is available for certain timestamp" << LogIO::POST;
     830      }
    811831      //if ( anyNE( rate, 0.0 ) ) {
    812832      if (addScanrate_) {
     
    15321552  Record srcRec;
    15331553  map< Int, Matrix<Int> > corrProductTemplate;
     1554  Vector<Double> pointingTimeList_;
     1555  Int referenceBeam_;
    15341556};
    15351557
Note: See TracChangeset for help on using the changeset viewer.