Changeset 2244 for trunk/src


Ignore:
Timestamp:
07/22/11 16:03:36 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

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

Added maxRow = 1 in selection using TableExprNode when
finding at least one row is enough.

Minor bug fix on MSWriter.cpp


Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MSWriter.cpp

    r2211 r2244  
    10931093    else {
    10941094//       os_ << "NOT sorted at irow=" << irow << " ids[0]=" << ids[0] << LogIO::POST ;
    1095       t = stt( stt.col("ID") == ids[0] ) ;
     1095      t = stt( stt.col("ID") == ids[0], 1 ) ;
    10961096      Vector<Float> dummyC = tcalCol( 0 ) ;
    1097       tcal.resize( npol, dummyC.size() ) ;
     1097      tcal.resize( npol, dummyC.size(), True ) ;
    10981098      tcal.row( 0 ) = dummyC ;
    10991099    }
     
    11051105      else {
    11061106//         os_ << "NOT sorted at irow=" << irow << " ids[1]=" << ids[1] << LogIO::POST ;
    1107         t = stt( stt.col("ID") == ids[1] ) ;
     1107        t = stt( stt.col("ID") == ids[1], 1 ) ;
    11081108        tcalCol.attach( t, "TCAL" ) ;
    1109         tcal.row( 1 ) = tcalCol( 1 ) ;
     1109        tcal.row( 1 ) = tcalCol( 0 ) ;
    11101110      }
    11111111    }
     
    11141114        tcal.row( 1 ) = tcalCol( ids[2] ) ;
    11151115      else {
    1116         t = stt( stt.col("ID") == ids[2] ) ;
     1116        t = stt( stt.col("ID") == ids[2], 1 ) ;
    11171117        tcalCol.attach( t, "TCAL" ) ;
    11181118        tcal.row( 1 ) = tcalCol( 0 ) ;
     
    11211121        tcal.row( 2 ) = tcalCol( ids[1] ) ;
    11221122      else {
    1123         t = stt( stt.col("ID") == ids[1] ) ;
     1123        t = stt( stt.col("ID") == ids[1], 1 ) ;
    11241124        tcalCol.attach( t, "TCAL" ) ;
    11251125        tcal.row( 2 ) = tcalCol( 0 ) ;
     
    11301130        tcal.row( 1 ) = tcalCol( ids[2] ) ;
    11311131      else {
    1132         t = stt( stt.col("ID") == ids[2] ) ;
     1132        t = stt( stt.col("ID") == ids[2], 1 ) ;
    11331133        tcalCol.attach( t, "TCAL" ) ;
    11341134        tcal.row( 1 ) = tcalCol( 0 ) ;
     
    11371137        tcal.row( 2 ) = tcalCol( ids[3] ) ;
    11381138      else {
    1139         t = stt( stt.col("ID") == ids[3] ) ;
     1139        t = stt( stt.col("ID") == ids[3], 1 ) ;
    11401140        tcalCol.attach( t, "TCAL" ) ;
    11411141        tcal.row( 2 ) = tcalCol( 0 ) ;
     
    11441144        tcal.row( 2 ) = tcalCol( ids[1] ) ;
    11451145      else {
    1146         t = stt( stt.col("ID") == ids[1] ) ;
     1146        t = stt( stt.col("ID") == ids[1], 1 ) ;
    11471147        tcalCol.attach( t, "TCAL" ) ;
    11481148        tcal.row( 3 ) = tcalCol( 0 ) ;
     
    13241324  if ( srcIdArr.size() != 0 ) {
    13251325    srcId = srcIdArr[0] ;
    1326     MSSource msSrcSel = msSrc( msSrc.col("SOURCE_ID") == srcId ) ;
     1326    MSSource msSrcSel = msSrc( msSrc.col("SOURCE_ID") == srcId, 1 ) ;
    13271327    ROMSSourceColumns msSrcCols( msSrcSel ) ;
    13281328    Vector<Double> srcDir = msSrcCols.direction()( 0 ) ;
  • trunk/src/Scantable.cpp

    r2193 r2244  
    672672    // take the first SCANNO,POLNO,BEAMNO,CYCLENO as nbeam shouldn't
    673673    // vary with these
    674     Table t = table_(table_.col("IFNO") == ifno);
     674    Table t = table_(table_.col("IFNO") == ifno, 1);
    675675    if ( t.nrow() == 0 ) return 0;
    676676    ROArrayColumn<Float> v(t, "SPECTRA");
     
    10181018  oss << setw(15) << "Rest Freqs:";
    10191019  for (int i=0; i<nid; i++) {
    1020       Table t = table_(table_.col("MOLECULE_ID") == i);
     1020    Table t = table_(table_.col("MOLECULE_ID") == i, 1);
    10211021      if (t.nrow() >  0) {
    10221022          Vector<Double> vec(moleculeTable_.getRestFrequency(i));
Note: See TracChangeset for help on using the changeset viewer.