Changeset 1940


Ignore:
Timestamp:
09/30/10 14:28:10 (14 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: s=sd.scantable('sdfile')

s.save('output.ms',format='MS2')

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Filling empty arrays by dummy values for POLARIZATION and SPECTRAL_WINDOW
subtables.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/asap4casa3.1.0/external-alma/atnf/PKSIO/PKSMS2writer.cc

    r1771 r1940  
    732732  // Extend the DATA_DESCRIPTION subtable.
    733733  while (Int(cDataDescription.nrow()) < IFno) {
    734     cDataDescription.addRow();
     734    cDataDescription.addRow(1,True);
    735735  }
    736736  Int n = IFno - 1;
     
    966966{
    967967  // Extend the POLARIZATION subtable.
     968  Int nr = cPolarization.nrow() ;
    968969  while (Int(cPolarization.nrow()) < IFno) {
    969     cPolarization.addRow();
     970    cPolarization.addRow(1,True);
    970971  }
    971972  Int n = IFno - 1;
     
    985986  corrType(1) = Stokes::YY;
    986987  }
     988  // initialization
     989  for ( Int i = nr ; i < n ; i++ )
     990    cPolarizationCols->corrType().put( i, corrType ) ;
    987991  cPolarizationCols->corrType().put(n, corrType);
    988992
     
    10921096{
    10931097  // Extend the SPECTRAL_WINDOW subtable.
     1098  Int nr = cSpectralWindow.nrow() ;
    10941099  while (Int(cSpectralWindow.nrow()) < IFno) {
    1095     cSpectralWindow.addRow();
     1100    cSpectralWindow.addRow(1,True);
    10961101  }
    10971102  Int n = IFno - 1;
     
    11111116    freqs(i) = refFreq + (i - refChan)*freqInc;
    11121117  }
     1118  // initialization
     1119  for ( Int i = nr ; i < n ; i++ )
     1120    cSpWindowCols->chanFreq().put( i, freqs ) ;
    11131121  cSpWindowCols->chanFreq().put(n, freqs);
    11141122
    11151123  Vector<Double> chanWidths(nChan, freqInc);
     1124  // initialization
     1125  for ( Int i = nr ; i < n ; i++ ) {
     1126    cSpWindowCols->chanWidth().put( i, chanWidths ) ;
     1127    cSpWindowCols->effectiveBW().put( i, chanWidths ) ;
     1128  }
    11161129  cSpWindowCols->chanWidth().put(n, chanWidths);
    11171130
     
    11201133
    11211134  Vector<Double> resolution(nChan, fabs(freqInc));
     1135  // initialization
     1136  for ( Int i = nr ; i < n ; i++ )
     1137    cSpWindowCols->resolution().put( i, resolution ) ;
    11221138  cSpWindowCols->resolution().put(n, resolution);
    11231139
Note: See TracChangeset for help on using the changeset viewer.