Changeset 2741


Ignore:
Timestamp:
01/21/13 19:41:11 (11 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:

Put in Release Notes: No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Bug fix on handling IFNO and FREQ_ID when exporting scantable to MS.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MSWriter.cpp

    r2643 r2741  
    1212//
    1313#include <assert.h>
     14
     15#include <set>
    1416
    1517#include <casa/OS/File.h>
     
    10481050  void addSpectralWindow( Int sid, uInt fid )
    10491051  {
    1050     if ( !processedFreqId[fid] ) {
     1052    if (processedFreqId.find((uInt)fid) == processedFreqId.end()
     1053        || processedIFNO.find((uInt)sid) == processedIFNO.end() ) {
    10511054      uInt nrow = spwtab.nrow() ;
    10521055      while( (Int)nrow <= sid ) {
     
    10541057        nrow++ ;
    10551058      }
    1056       processedFreqId[fid] = True ;
     1059      processedFreqId.insert((uInt)fid);
     1060      processedIFNO.insert((uInt)sid);
    10571061    }
    10581062    else {
    10591063      return ;
    10601064    }
     1065     
    10611066
    10621067    Double rp = refpix[fid] ;
     
    11691174    Vector<Double> ic = iccol.getColumn() ;
    11701175    for ( uInt i = 0 ; i < id.nelements() ; i++ ) {
    1171       processedFreqId.insert( pair<uInt,Bool>( id[i], False ) ) ;
    11721176      refpix.insert( pair<uInt,Double>( id[i], rp[i] ) ) ;
    11731177      refval.insert( pair<uInt,Double>( id[i], rv[i] ) ) ;
     
    14621466  Block<Int> feedEntry;
    14631467  vector< Vector<Int> > polEntry;
    1464   map<uInt,Bool> processedFreqId;
     1468  set<uInt> processedFreqId;
     1469  set<uInt> processedIFNO;
    14651470  map<uInt,Double> refpix;
    14661471  map<uInt,Double> refval;
Note: See TracChangeset for help on using the changeset viewer.