Changeset 2104


Ignore:
Timestamp:
04/05/11 18:04:35 (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...

Fill empty SPECTRAL_WINDOW rows that are created as dummy.


Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MSWriter.cpp

    r2098 r2104  
    444444    fillSysCal() ;
    445445
     446  // fill empty SPECTRAL_WINDOW rows
     447  infillSpectralWindow() ;
     448
    446449  // ASDM tables
    447450  const TableRecord &stKeys = table_->table().keywordSet() ;
     
    18961899  return diameter ;
    18971900}
    1898 }
     1901
     1902void MSWriter::infillSpectralWindow()
     1903{
     1904  MSSpectralWindow msSpw = mstable_->spectralWindow() ;
     1905  MSSpWindowColumns msSpwCols( msSpw ) ;
     1906  uInt nrow = msSpw.nrow() ;
     1907
     1908  ScalarColumn<Int> measFreqRefCol = msSpwCols.measFreqRef() ;
     1909  ArrayColumn<Double> chanFreqCol = msSpwCols.chanFreq() ;
     1910  ArrayColumn<Double> chanWidthCol = msSpwCols.chanWidth() ;
     1911  ArrayColumn<Double> effectiveBWCol = msSpwCols.effectiveBW() ;
     1912  ArrayColumn<Double> resolutionCol = msSpwCols.resolution() ;
     1913  Vector<Double> dummy( 1, 0.0 ) ;
     1914  for ( uInt irow = 0 ; irow < nrow ; irow++ ) {
     1915    if ( !(chanFreqCol.isDefined( irow )) ) {
     1916      measFreqRefCol.put( irow, 1 ) ;
     1917      chanFreqCol.put( irow, dummy ) ;
     1918      chanWidthCol.put( irow, dummy ) ;
     1919      effectiveBWCol.put( irow, dummy ) ;
     1920      resolutionCol.put( irow, dummy ) ;
     1921    }
     1922  }
     1923
     1924}
     1925
     1926}
  • trunk/src/MSWriter.h

    r2026 r2104  
    6767  void fillSysCal() ;
    6868
     69  // fill empty rows
     70  void infillSpectralWindow() ;
     71
    6972  // add rows to subtables
    7073  void addFeed( casa::Int id ) ;
Note: See TracChangeset for help on using the changeset viewer.