Changeset 2159


Ignore:
Timestamp:
05/02/11 12:32:01 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-2718, CSV-929

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...

Support input of MS with non-empty SYSCAL table without TCAL column.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MSFiller.cpp

    r2102 r2159  
    224224    isSysCal_ = False ;
    225225  else {
    226     if ( !caltab.tableDesc().isColumn( colTcal_ ) )
     226    if ( !caltab.tableDesc().isColumn( colTcal_ ) ) {
    227227      colTcal_ = "TCAL" ;
    228     if ( !caltab.tableDesc().isColumn( colTsys_ ) )
     228      if ( !caltab.tableDesc().isColumn( colTcal_ ) )
     229        colTcal_ = "NONE" ;
     230    }
     231    if ( !caltab.tableDesc().isColumn( colTsys_ ) ) {
    229232      colTsys_ = "TSYS" ;
     233      if ( !caltab.tableDesc().isColumn( colTcal_ ) )
     234        colTsys_ = "NONE" ;
     235    }
    230236  }
    231237//   colTcal_ = "TCAL" ;
     
    643649            scInterval = scIntervalCol->getColumn() ;
    644650            delete scIntervalCol ;
    645             scTsysCol.attach( caltabsel, colTsys_ ) ;
     651            if ( colTsys_ != "NONE" )
     652              scTsysCol.attach( caltabsel, colTsys_ ) ;
    646653          }
    647654
     
    806813                // TSYS
    807814                Matrix<Float> tsys ;
    808                 if ( sysCalIdx[irow] != -1 )
     815                if ( sysCalIdx[irow] != -1 && colTsys_ != "NONE" )
    809816                  tsys = scTsysCol( irow ) ;
    810817                else
     
    813820                // TCAL_ID
    814821                Block<uInt> tcalids( npol, 0 ) ;
    815                 if ( sysCalIdx[irow] != -1 ) {
     822                if ( sysCalIdx[irow] != -1 && colTcal_ != "NONE" ) {
    816823                  tcalids = getTcalId( feedId, spwId, scTime[sysCalIdx[irow]] ) ;
    817824                }
     
    13571364  }
    13581365
     1366  if ( colTcal_ == "NONE" ) {
     1367    // add dummy row
     1368    os_ << "No TCAL column" << LogIO::POST ;
     1369    table_->tcal().table().addRow(1,True) ;
     1370    Vector<Float> defaultTcal( 1, 1.0 ) ;
     1371    ArrayColumn<Float> tcalCol( table_->tcal().table(), "TCAL" ) ;
     1372    tcalCol.put( 0, defaultTcal ) ;
     1373    return ;
     1374  }
     1375
    13591376  Table sctab = mstable_.sysCal() ;
    13601377  if ( sctab.nrow() == 0 ) {
Note: See TracChangeset for help on using the changeset viewer.