Changeset 2164


Ignore:
Timestamp:
05/11/11 00:41:49 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CSV-929

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs:

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Bug fix on filling TCAL subtable to support the case when only
TCAL_SPECTRUM exists.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MSFiller.cpp

    r2159 r2164  
    13841384    return ;
    13851385  }
    1386   ROArrayColumn<Float> *tmpTcalCol = new ROArrayColumn<Float>( sctabsel, "TCAL" ) ;
     1386  ROArrayColumn<Float> *tmpTcalCol = new ROArrayColumn<Float>( sctabsel, colTcal_ ) ;
     1387  // return if any rows without Tcal value exists
     1388  Bool notDefined = False ;
     1389  for ( uInt irow = 0 ; irow < sctabsel.nrow() ; irow++ ) {
     1390    if ( !tmpTcalCol->isDefined( irow ) ) {
     1391      notDefined = True ;
     1392      break ;
     1393    }
     1394  }
     1395  if ( notDefined ) {
     1396    os_ << "No TCAL value" << LogIO::POST ;
     1397    delete tmpTcalCol ;
     1398    table_->tcal().table().addRow(1,True) ;
     1399    Vector<Float> defaultTcal( 1, 1.0 ) ;
     1400    ArrayColumn<Float> tcalCol( table_->tcal().table(), "TCAL" ) ;
     1401    tcalCol.put( 0, defaultTcal ) ;
     1402    return ;
     1403  }   
    13871404  uInt npol = tmpTcalCol->shape( 0 )(0) ;
    13881405  delete tmpTcalCol ;
Note: See TracChangeset for help on using the changeset viewer.