Changeset 2477


Ignore:
Timestamp:
04/24/12 10:34:06 (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...

Update IF group properly when more than one tables should be copied.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMath.cpp

    r2476 r2477  
    32223222
    32233223    // print membership
    3224     //oss.str("") ;
    3225     //for ( uInt i = 0 ; i < insize ; i++ ) {
    3226     //oss << "Table " << i << endl ;
    3227     //for ( uInt j = 0 ; j < groups[i].size() ; j++ ) {
    3228     //oss << "   FREQ_ID " <<  setw( 2 ) << freqid[i][j] << ": " ;
    3229     //for ( uInt k = 0 ; k < groups[i][j].size() ; k++ ) {
    3230     //oss << setw( 2 ) << groups[i][j][k] << " " ;
    3231     //}
    3232     //oss << endl ;
    3233     //}
    3234     //}
    3235     //os << oss.str() << LogIO::POST ;
     3224//     oss.str("") ;
     3225//     for ( uInt i = 0 ; i < insize ; i++ ) {
     3226//       oss << "Table " << i << endl ;
     3227//       for ( uInt j = 0 ; j < groups[i].size() ; j++ ) {
     3228//         oss << "   FREQ_ID " <<  setw( 2 ) << freqid[i][j] << ": " ;
     3229//         for ( uInt k = 0 ; k < groups[i][j].size() ; k++ ) {
     3230//           oss << setw( 2 ) << groups[i][j][k] << " " ;
     3231//         }
     3232//         oss << endl ;
     3233//       }
     3234//     }
     3235//     os << oss.str() << LogIO::POST ;
    32363236
    32373237    // set back coordinfo
     
    32933293
    32943294    // udpate ifgrp
     3295    uInt offset = insize ;
    32953296    for ( uInt itable = 0 ; itable < insize ; itable++ ) {
    32963297      for ( uInt iadd = 0 ; iadd < addtable[itable] ; iadd++ ) {
     
    32993300            uInt igrp = groups[itable][ifrow][iadd+1] ;
    33003301            for ( uInt imem = 0 ; imem < ifgrp[igrp].size()/2 ; imem++ ) {
    3301               if ( ifgrp[igrp][2*imem] == newtableids[iadd+insize] && ifgrp[igrp][2*imem+1] == freqid[newtableids[iadd+insize]][ifrow] ) {
    3302                 ifgrp[igrp][2*imem] = insize + iadd ;
     3302              if ( ifgrp[igrp][2*imem] == newtableids[offset+iadd] && ifgrp[igrp][2*imem+1] == freqid[newtableids[offset+iadd]][ifrow] ) {
     3303                ifgrp[igrp][2*imem] = offset + iadd ;
    33033304              }
    33043305            }
     
    33063307        }
    33073308      }
     3309      offset += addtable[itable] ;
    33083310    }
    33093311
    33103312    // print IF groups again for debug
    3311     //oss.str( "" ) ;
    3312     //oss << "IF Group summary: " << endl ;
    3313     //oss << "   GROUP_ID [FREQ_MIN, FREQ_MAX]: (TABLE_ID, FREQ_ID)" << endl ;
    3314     //for ( uInt i = 0 ; i < ifgrp.size() ; i++ ) {
    3315     //oss << "   GROUP " << setw( 2 ) << i << " [" << ifgfreq[2*i] << "," << ifgfreq[2*i+1] << "]: " ;
    3316     //for ( uInt j = 0 ; j < ifgrp[i].size()/2 ; j++ ) {
    3317     //oss << "(" << ifgrp[i][2*j] << "," << ifgrp[i][2*j+1] << ") " ;
    3318     //}
    3319     //oss << endl ;
    3320     //}
    3321     //oss << endl ;
    3322     //os << oss.str() << LogIO::POST ;
     3313//     oss.str( "" ) ;
     3314//     oss << "IF Group summary: " << endl ;
     3315//     oss << "   GROUP_ID [FREQ_MIN, FREQ_MAX]: (TABLE_ID, FREQ_ID)" << endl ;
     3316//     for ( uInt i = 0 ; i < ifgrp.size() ; i++ ) {
     3317//       oss << "   GROUP " << setw( 2 ) << i << " [" << ifgfreq[2*i] << "," << ifgfreq[2*i+1] << "]: " ;
     3318//       for ( uInt j = 0 ; j < ifgrp[i].size()/2 ; j++ ) {
     3319//         oss << "(" << ifgrp[i][2*j] << "," << ifgrp[i][2*j+1] << ") " ;
     3320//       }
     3321//       oss << endl ;
     3322//     }
     3323//     oss << endl ;
     3324//     os << oss.str() << LogIO::POST ;
    33233325
    33243326    // reset SCANNO and IFNO/FREQ_ID: IF is reset by the result of sortation
Note: See TracChangeset for help on using the changeset viewer.