Changeset 2382


Ignore:
Timestamp:
12/22/11 13:19:50 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-2816

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

Replaced gridAll() with gridPerPol(), which performs grigging for each
polarization components separately.

nchunk_ is tentatively set to 10000.


Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STGrid.cpp

    r2381 r2382  
    383383  selectData() ;
    384384  setupArray() ;
    385   sortData() ;
    386385
    387386  if ( npol_ > 1 ) {
     
    392391  if ( wtype_.compare("UNIFORM") != 0 &&
    393392       wtype_.compare("TINT") != 0 &&
     393       wtype_.compare("TSYS") != 0 &&
    394394       wtype_.compare("TINTSYS") != 0 ) {
    395395    LogIO os( LogOrigin("STGrid", "grid", WHERE) ) ;
     
    401401
    402402  if ( doAll )
    403     gridAll() ;
    404   else
     403    gridPerPol() ;
     404  else {
     405    sortData() ;
    405406    gridPerRow() ;
     407  }
    406408}
    407409
     
    410412  // TODO: nchunk_ must be determined from nchan_, npol_, and (nx_,ny_)
    411413  //       by considering data size to be allocated for ggridsd input/output
    412   nchunk_ = 100 ;
     414  nchunk_ = 10000 ;
    413415  Bool b = nchunk_ >= nrow_ ;
    414416  nchunk_ = min( nchunk_, nrow_ ) ;
     
    416418}
    417419
    418 void STGrid::gridAll()
    419 {
    420   LogIO os( LogOrigin("STGrid", "gridAll", WHERE) ) ;
    421 
    422   // retrieve data
    423   Array<Complex> spectra ;
    424   Array<Double> direction ;
    425   Array<Int> flagtra ;
    426   Array<Int> rflag ;
    427   Array<Float> weight ;
     420void STGrid::gridPerPol()
     421{
     422  LogIO os( LogOrigin("STGrid", "gridPerPol", WHERE) ) ;
    428423  double t0, t1 ;
    429   t0 = mathutil::gettimeofday_sec() ;
    430   getData( spectra, direction, flagtra, rflag, weight ) ;
    431   t1 = mathutil::gettimeofday_sec() ;
    432   os << "getData: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
    433   IPosition sshape = spectra.shape() ;
    434   //os << "spectra.shape()=" << spectra.shape() << LogIO::POST ;
    435   //os << "max(spectra) = " << max(spectra) << LogIO::POST ;
    436   //os << "weight = " << weight << LogIO::POST ;
    437424
    438425  // grid parameter
     
    455442  //cout << "convFunc=" << convFunc << endl ;
    456443
    457   // world -> pixel
    458   Array<Double> xypos( direction.shape(), 0.0 ) ;
    459   t0 = mathutil::gettimeofday_sec() ;
    460   toPixel( direction, xypos ) ; 
    461   t1 = mathutil::gettimeofday_sec() ;
    462   //os << "xypos=" << xypos << LogIO::POST ;
    463   os << "toPixel: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
    464  
    465   // call ggridsd
    466   Bool deletePos, deleteData, deleteWgt, deleteFlag, deleteFlagR, deleteConv, deleteDataG, deleteWgtG ;
    467   Double *xypos_p = xypos.getStorage( deletePos ) ;
    468   const Complex *data_p = spectra.getStorage( deleteData ) ;
    469   const Float *wgt_p = weight.getStorage( deleteWgt ) ;
    470   //const Int *flag_p = flagI.getStorage( deleteFlag ) ;
    471   //const Int *rflag_p = rflagI.getStorage( deleteFlagR ) ;
    472   const Int *flag_p = flagtra.getStorage( deleteFlag ) ;
    473   const Int *rflag_p = rflag.getStorage( deleteFlagR ) ;
    474   Float *conv_p = convFunc.getStorage( deleteConv ) ;
    475   // Extend grid plane with convSupport_
     444  // prepare grid data storage
    476445  Int gnx = nx_ ;
    477446  Int gny = ny_ ;
     447//   // Extend grid plane with convSupport_
    478448//   Int gnx = nx_+convSupport_*2 ;
    479449//   Int gny = ny_+convSupport_*2 ;
     
    486456  data_ = 0.0 ;
    487457  Array<Float> gwgtArr( data_ ) ;
    488   Complex *gdata_p = gdataArrC.getStorage( deleteDataG ) ;
    489   Float *wdata_p = gwgtArr.getStorage( deleteWgtG ) ;
     458
     459  // to read data from the table
     460  IPosition mshape( 2, nchan_, nrow_ ) ;
     461  Array<Complex> spectra( mshape ) ;
     462  Array<Double> direction( IPosition(2,2,nrow_) ) ;
     463  Array<Int> flagtra( mshape ) ;
     464  Array<Int> rflag( IPosition(1,nrow_) ) ;
     465  Array<Float> weight( mshape ) ;
     466
     467  // maps
    490468  Int *chanMap = new Int[nchan_] ;
    491469  {
     
    496474    }
    497475  }
    498   Int *polMap = new Int[npol_] ;
    499   {
    500     Int *work_p = polMap ;
    501     for ( Int i = 0 ; i < npol_ ; i++ ) {
    502       *work_p = i ;
    503       work_p++ ;
    504     }
    505   }
    506   t0 = mathutil::gettimeofday_sec() ;
    507   Int irow = -1 ;
    508   call_ggridsd( xypos_p,
    509                 data_p,
    510                 &npol_,
    511                 &nchan_,
    512                 flag_p,
    513                 rflag_p,
    514                 wgt_p,
    515                 &nrow_,
    516                 &irow,
    517                 gdata_p,
    518                 wdata_p,
    519                 &gnx,
    520                 &gny,
    521                 &npol_,
    522                 &nchan_,
    523                 &convSupport_,
    524                 &convSampling_,
    525                 conv_p,
    526                 chanMap,
    527                 polMap ) ;
    528   t1 = mathutil::gettimeofday_sec() ;
    529   os << "ggridsd: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
    530   xypos.putStorage( xypos_p, deletePos ) ;
    531   spectra.freeStorage( data_p, deleteData ) ;
    532   weight.freeStorage( wgt_p, deleteWgt ) ;
    533   flagtra.freeStorage( flag_p, deleteFlag ) ;
    534   rflag.freeStorage( rflag_p, deleteFlagR ) ;
    535   convFunc.putStorage( conv_p, deleteConv ) ;
     476  Int *polMap = new Int[1] ;
     477  Int nvispol = 1 ;
     478 
     479  for ( Int ipol = 0 ; ipol < npol_ ; ipol++ ) {
     480    t0 = mathutil::gettimeofday_sec() ;
     481    initPol( ipol ) ;
     482    t1 = mathutil::gettimeofday_sec() ;
     483    os << "initPol: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
     484
     485    // retrieve data
     486    t0 = mathutil::gettimeofday_sec() ;
     487    getDataPerPol( spectra, direction, flagtra, rflag, weight ) ;
     488    t1 = mathutil::gettimeofday_sec() ;
     489    os << "getData: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
     490    IPosition sshape = spectra.shape() ;
     491   
     492    // world -> pixel
     493    Array<Double> xypos( direction.shape(), 0.0 ) ;
     494    t0 = mathutil::gettimeofday_sec() ;
     495    toPixel( direction, xypos ) ; 
     496    t1 = mathutil::gettimeofday_sec() ;
     497    //os << "xypos=" << xypos << LogIO::POST ;
     498    os << "toPixel: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
     499   
     500    // call ggridsd
     501    Bool deletePos, deleteData, deleteWgt, deleteFlag, deleteFlagR, deleteConv, deleteDataG, deleteWgtG ;
     502    Double *xypos_p = xypos.getStorage( deletePos ) ;
     503    const Complex *data_p = spectra.getStorage( deleteData ) ;
     504    const Float *wgt_p = weight.getStorage( deleteWgt ) ;
     505    const Int *flag_p = flagtra.getStorage( deleteFlag ) ;
     506    const Int *rflag_p = rflag.getStorage( deleteFlagR ) ;
     507    Float *conv_p = convFunc.getStorage( deleteConv ) ;
     508    Complex *gdata_p = gdataArrC.getStorage( deleteDataG ) ;
     509    Float *wdata_p = gwgtArr.getStorage( deleteWgtG ) ;
     510    polMap[0] = ipol ;
     511    t0 = mathutil::gettimeofday_sec() ;
     512    Int irow = -1 ;
     513    call_ggridsd( xypos_p,
     514                  data_p,
     515                  &nvispol,
     516                  &nchan_,
     517                  flag_p,
     518                  rflag_p,
     519                  wgt_p,
     520                  &nrow_,
     521                  &irow,
     522                  gdata_p,
     523                  wdata_p,
     524                  &gnx,
     525                  &gny,
     526                  &npol_,
     527                  &nchan_,
     528                  &convSupport_,
     529                  &convSampling_,
     530                  conv_p,
     531                  chanMap,
     532                  polMap ) ;
     533    t1 = mathutil::gettimeofday_sec() ;
     534    os << "ggridsd: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
     535    xypos.putStorage( xypos_p, deletePos ) ;
     536    spectra.freeStorage( data_p, deleteData ) ;
     537    weight.freeStorage( wgt_p, deleteWgt ) ;
     538    flagtra.freeStorage( flag_p, deleteFlag ) ;
     539    rflag.freeStorage( rflag_p, deleteFlagR ) ;
     540    convFunc.putStorage( conv_p, deleteConv ) ;
     541    gdataArrC.putStorage( gdata_p, deleteDataG ) ;
     542    gwgtArr.putStorage( wdata_p, deleteWgtG ) ;
     543  }
     544
     545  // delete maps
    536546  delete polMap ;
    537547  delete chanMap ;
    538   gdataArrC.putStorage( gdata_p, deleteDataG ) ;
    539   gwgtArr.putStorage( wdata_p, deleteWgtG ) ;
     548
    540549  setData( gdataArrC, gwgtArr ) ;
    541   //Matrix<Double> sumWeight( IPosition( 2, npol_, nchan_ ), sumw_p, TAKE_OVER ) ;
    542   //cout << "sumWeight = " << sumWeight << endl ;
    543550//   os << "gdataArr = " << gdataArr << LogIO::POST ;
    544551//   os << "gwgtArr = " << gwgtArr << LogIO::POST ;
    545552//   os << "data_ " << data_ << LogIO::POST ;
     553}
     554
     555void STGrid::initPol( Int ipol )
     556{
     557  ptab_ = tab_( tab_.col("POLNO") == (uInt)ipol ) ;
     558
     559  attach( ptab_ ) ;
    546560}
    547561
     
    720734    os << LogIO::EXCEPTION ;
    721735  }
    722   attach() ;
    723 }
    724 
    725 void STGrid::attach()
     736  attach( tab_ ) ;
     737}
     738
     739void STGrid::attach( Table &tab )
    726740{
    727741  // attach to table
    728   spectraCol_.attach( tab_, "SPECTRA" ) ;
    729   flagtraCol_.attach( tab_, "FLAGTRA" ) ;
    730   directionCol_.attach( tab_, "DIRECTION" ) ;
    731   flagRowCol_.attach( tab_, "FLAGROW" ) ;
    732   tsysCol_.attach( tab_, "TSYS" ) ;
    733   intervalCol_.attach( tab_, "INTERVAL" ) ;
     742  spectraCol_.attach( tab, "SPECTRA" ) ;
     743  flagtraCol_.attach( tab, "FLAGTRA" ) ;
     744  directionCol_.attach( tab, "DIRECTION" ) ;
     745  flagRowCol_.attach( tab, "FLAGROW" ) ;
     746  tsysCol_.attach( tab, "TSYS" ) ;
     747  intervalCol_.attach( tab, "INTERVAL" ) ;
    734748//   Vector<String> colnames( 6 ) ;
    735749//   colnames[0] = "SPECTRA" ;
     
    749763}
    750764
    751 void STGrid::getData( Array<Complex> &spectra,
    752                       Array<Double> &direction,
    753                       Array<uChar> &flagtra,
    754                       Array<uInt> &rflag,
    755                       Array<Float> &weight )
    756 {
    757   LogIO os( LogOrigin("STGrid","getData",WHERE) ) ;
    758 //   os << "start" << LogIO::POST ;
    759 //   os << "npol_ = " << npol_ << LogIO::POST ;
    760 //   os << "nchan_ = " << nchan_ << LogIO::POST ;
    761 //   os << "nrow_ = " << nrow_ << LogIO::POST ;
    762   IPosition cshape( 3, npol_, nchan_, nrow_ ) ;
    763   IPosition mshape( 2, npol_, nrow_ ) ;
    764   IPosition vshape( 1, nrow_ ) ;
    765   spectra.resize( cshape ) ;
    766   flagtra.resize( cshape ) ;
    767   rflag.resize( vshape ) ;
    768   Vector<uInt> rflagPerPol( rflag ) ;
    769   direction.resize( IPosition(2,2,nrow_) ) ;
    770   Array<Float> tsys( cshape ) ;
    771   Array<Double> tint( mshape ) ;
    772 
    773   ArrayIterator<uChar> fli( flagtra, IPosition(2,1,2) ) ;
    774   ArrayIterator<Float> tsi( tsys, IPosition(2,1,2) ) ;
    775   ArrayIterator<Double> tii( tint, IPosition(1,1) ) ;
    776  
    777   // boolean for pointer access
    778   Bool bsp, bsps ;
    779   // pointer to the data
    780   Complex *sp_p = spectra.getStorage( bsp ) ;
    781   // working pointer
    782   Complex *wsp_p = sp_p ;
    783   uInt len = nchan_ * nrow_ ;
    784   IPosition mshape2( 2, nchan_, nrow_ ) ;
    785   Vector<Float> spSlice( nchan_ ) ;
    786   const Float *sps_p = spSlice.getStorage( bsps ) ;
    787   long cincr = npol_ ;
    788   long rincr = npol_ * nchan_ ;
    789   for ( Int ipol = 0 ; ipol < npol_ ; ipol++ ) {
    790     Table subt = tab_( tab_.col("POLNO") == pollist_[ipol] ) ;
    791     ROArrayColumn<Float> spectraCol( subt, "SPECTRA" ) ;
    792     ROArrayColumn<Double> directionCol( subt, "DIRECTION" ) ;
    793     ROArrayColumn<uChar> flagtraCol( subt, "FLAGTRA" ) ;
    794     ROScalarColumn<uInt> rflagCol( subt, "FLAGROW" ) ;
    795     ROArrayColumn<Float> tsysCol( subt, "TSYS" ) ;
    796     ROScalarColumn<Double> tintCol( subt, "INTERVAL" ) ;
    797     for ( Int irow = 0 ; irow < nrow_ ; irow++ ) {
    798       spectraCol.get( irow, spSlice ) ;
    799       const Float *wsps_p = sps_p ;
    800       wsp_p = sp_p + (long)ipol + rincr * (long)irow ;
    801       for ( Int ichan = 0 ; ichan < nchan_ ; ichan++ ) {
    802         *wsp_p = *wsps_p ;
    803         wsps_p++ ;
    804         wsp_p += cincr ;
    805       }
    806     }
    807     Array<uChar> flSlice = fli.array() ;
    808     flagtraCol.getColumn( flSlice ) ;
    809     if ( ipol == 0 ) {
    810       directionCol.getColumn( direction ) ;
    811       rflagCol.getColumn( rflagPerPol ) ;
    812     }
    813     else {
    814       rflagPerPol += rflagCol.getColumn() ;
    815     }
    816     Vector<Float> tmpF = tsysCol( 0 ) ;
    817     Array<Float> tsSlice = tsi.array() ;
    818     if ( tmpF.nelements() == (uInt)nchan_ ) {
    819       tsysCol.getColumn( tsSlice ) ;
    820     }
    821     else {
    822       tsSlice = tmpF( 0 ) ;
    823     }
    824     Vector<Double> tmpD = tii.array() ;
    825     tintCol.getColumn( tmpD ) ;
    826 
    827     wsp_p += len ;
    828 
    829     fli.next() ;
    830     tsi.next() ;
    831     tii.next() ;
    832   }
    833   spSlice.freeStorage( sps_p, bsps ) ;
    834   spectra.putStorage( sp_p, bsp ) ;
    835 
    836 //   os << "spectra=" << spectra << LogIO::POST ;
    837 //   os << "flagtra=" << flagtra << LogIO::POST ;
    838 //   os << "rflag=" << rflag << LogIO::POST ;
    839 //   os << "direction=" << direction << LogIO::POST ;
    840 
    841   weight.resize( IPosition(2,nchan_,nrow_) ) ;
    842   getWeight( weight, tsys, tint ) ;
    843 }
    844 
    845 void STGrid::getData( Array<Complex> &spectra,
    846                       Array<Double> &direction,
    847                       Array<Int> &flagtra,
    848                       Array<Int> &rflag,
    849                       Array<Float> &weight )
    850 {
    851   LogIO os( LogOrigin("STGrid","getData",WHERE) ) ;
     765void STGrid::getDataPerPol( Array<Float> &spectra,
     766                            Array<Double> &direction,
     767                            Array<uChar> &flagtra,
     768                            Array<uInt> &rflag,
     769                            Array<Float> &weight )
     770{
     771  LogIO os( LogOrigin("STGrid","getDataPerPol",WHERE) ) ;
     772  Vector<uInt> rflagVec( rflag ) ;
     773  // 2011/12/22 TN
     774  // weight and tsys shares its storage
     775  Array<Float> tsys( weight ) ;
     776  Array<Double> tint( rflag.shape() ) ;
     777  Vector<Double> tintVec( tint ) ;
     778
     779  spectraCol_.getColumn( spectra ) ;
     780  flagtraCol_.getColumn( flagtra ) ;
     781  flagRowCol_.getColumn( rflagVec ) ;
     782  directionCol_.getColumn( direction ) ;
     783  intervalCol_.getColumn( tintVec ) ;
     784  Vector<Float> tsysTemp = tsysCol_( 0 ) ;
     785  if ( tsysTemp.nelements() == (uInt)nchan_ ) {
     786    tsysCol_.getColumn( tsys ) ;
     787  }
     788  else {
     789    tsys = tsysTemp[0] ;
     790  }
     791
     792  getWeightPerPol( weight, tsys, tint ) ;
     793}
     794
     795void STGrid::getDataPerPol( Array<Complex> &spectra,
     796                            Array<Double> &direction,
     797                            Array<Int> &flagtra,
     798                            Array<Int> &rflag,
     799                            Array<Float> &weight )
     800{
     801  LogIO os( LogOrigin("STGrid","getDataPerPol",WHERE) ) ;
    852802  double t0, t1 ;
    853803
    854   Array<uChar> flagUC ;
    855   Array<uInt> rflagUI ;
    856   getData( spectra, direction, flagUC, rflagUI, weight ) ;
    857 
     804  Array<uChar> flagUC( flagtra.shape() ) ;
     805  Array<uInt> rflagUI( rflag.shape() ) ;
     806  Array<Float> spectraF( spectra.shape() ) ;
     807  getDataPerPol( spectraF, direction, flagUC, rflagUI, weight ) ;
     808
     809  convertArray( spectra, spectraF ) ;
    858810  t0 = mathutil::gettimeofday_sec() ;
    859811  toInt( flagUC, flagtra ) ;
     
    873825  t0 = mathutil::gettimeofday_sec() ;
    874826  convertArray( spectra, spectraF_ ) ;
    875   convertArray( flagtra, flagtraUC_ ) ;
    876   convertArray( rflag, rflagUI_ ) ;
     827  toInt( flagtraUC_, flagtra ) ;
     828  toInt( rflagUI_, rflag ) ;
    877829  t1 = mathutil::gettimeofday_sec() ;
    878830  subtime_ = t1 - t0 ;
     
    11211073//   t1 = mathutil::gettimeofday_sec() ;
    11221074//   os << "getWeight: elapsed time is " << t1-t0 << " sec" << LogIO::POST ;
     1075}
     1076
     1077void STGrid::getWeightPerPol( Array<Float> &w,
     1078                              Array<Float> &tsys,
     1079                              Array<Double> &tint )
     1080{
     1081  LogIO os( LogOrigin("STGrid","getWeightPerPol",WHERE) ) ;
     1082  //os << "start getWeightPerPol" << LogIO::POST ;
     1083  double t0, t1 ;
     1084  t0 = mathutil::gettimeofday_sec() ;
     1085  // 2011/12/22 TN
     1086  // w (weight) and tsys share storage
     1087  IPosition refShape = tsys.shape() ;
     1088  Int nchan = refShape[0] ;
     1089  Int nrow = refShape[1] ;
     1090//   os << "nchan=" << nchan << ", nrow=" << nrow << LogIO::POST ;
     1091//   os << "w.shape()=" << w.shape() << endl
     1092//      << "tsys.shape()=" << tsys.shape() << endl
     1093//      << "tint.shape()=" << tint.shape() << LogIO::POST ;
     1094
     1095  // set weight
     1096  if ( wtype_.compare( "UNIFORM" ) == 0 ) {
     1097    w = 1.0 ;
     1098  }
     1099  else if ( wtype_.compare( "TINT" ) == 0 ) {
     1100    Bool b0, b1 ;
     1101    Float *w_p = w.getStorage( b0 ) ;
     1102    Float *w0_p = w_p ;
     1103    const Double *ti_p = tint.getStorage( b1 ) ;
     1104    const Double *w1_p = ti_p ;
     1105    for ( Int irow = 0 ; irow < nrow ; irow++ ) {
     1106      for ( Int ichan = 0 ; ichan < nchan ; ichan++ ) {
     1107        *w0_p = *w1_p ;
     1108        w0_p++ ;
     1109      }
     1110      w1_p++ ;
     1111    }
     1112    w.putStorage( w_p, b0 ) ;
     1113    tint.freeStorage( ti_p, b1 ) ;
     1114  }
     1115  else if ( wtype_.compare( "TSYS" ) == 0 ) {
     1116    Bool b0 ;
     1117    Float *w_p = w.getStorage( b0 ) ;
     1118    Float *w0_p = w_p ;
     1119    for ( Int irow = 0 ; irow < nrow ; irow++ ) {
     1120      for ( Int ichan = 0 ; ichan < nchan ; ichan++ ) {
     1121        Float temp = *w0_p ;
     1122        *w0_p = 1.0 / ( temp * temp ) ;
     1123        w0_p++ ;
     1124      }
     1125    }
     1126    w.putStorage( w_p, b0 ) ;
     1127  }
     1128  else if ( wtype_.compare( "TINTSYS" ) == 0 ) {
     1129    Bool b0, b1 ;
     1130    Float *w_p = w.getStorage( b0 ) ;
     1131    Float *w0_p = w_p ;
     1132    const Double *ti_p = tint.getStorage( b1 ) ;
     1133    const Double *w1_p = ti_p ;
     1134    for ( Int irow = 0 ; irow < nrow ; irow++ ) {
     1135      Float interval = *w1_p ;
     1136      for ( Int ichan = 0 ; ichan < nchan ; ichan++ ) {
     1137        Float temp = *w0_p ;
     1138        *w0_p = interval / ( temp * temp ) ;
     1139        w0_p++ ;
     1140      }
     1141      w1_p++ ;
     1142    }
     1143    w.putStorage( w_p, b0 ) ;
     1144    tint.freeStorage( ti_p, b1 ) ;
     1145  }
     1146  else {
     1147    //LogIO os( LogOrigin("STGrid", "getWeight", WHERE) ) ;
     1148    //os << LogIO::WARN << "Unsupported weight type '" << wtype_ << "', apply UNIFORM weight" << LogIO::POST ;
     1149    w = 1.0 ;
     1150  }
     1151
     1152  t1 = mathutil::gettimeofday_sec() ;
     1153  os << "getWeight: elapsed time is " << t1-t0 << " sec" << LogIO::POST ;
    11231154}
    11241155
  • trunk/src/STGrid.h

    r2381 r2382  
    6262
    6363  void grid() ;
    64   void gridAll() ;
    65   void gridPerRow() ;
    6664 
    6765  string saveData( string outfile="" ) ;
     
    6967private:
    7068  void init() ;
     69
     70  // actual gridding
     71  void gridPerRow() ;
     72  void gridPerPol() ;
    7173
    7274  void setupGrid( Int &nx,
     
    8385                Array<Float> &gwgt ) ;
    8486 
    85   void getData( Array<Complex> &spectra,
    86                 Array<Double> &direction,
    87                 Array<Int> &flagtra,
    88                 Array<Int> &rflag,
    89                 Array<Float> &weight ) ;
    90   void getData( Array<Complex> &spectra,
    91                 Array<Double> &direction,
    92                 Array<uChar> &flagtra,
    93                 Array<uInt> &rflag,
    94                 Array<Float> &weight ) ;
     87  void getDataPerPol( Array<Complex> &spectra,
     88                      Array<Double> &direction,
     89                      Array<Int> &flagtra,
     90                      Array<Int> &rflag,
     91                      Array<Float> &weight ) ;
     92  void getDataPerPol( Array<Float> &spectra,
     93                      Array<Double> &direction,
     94                      Array<uChar> &flagtra,
     95                      Array<uInt> &rflag,
     96                      Array<Float> &weight ) ;
    9597  Int getDataChunk( Array<Complex> &spectra,
    9698                    Array<Double> &direction,
     
    107109                  Array<Float> &tsys,
    108110                  Array<Double> &tint ) ;
    109 
     111  void getWeightPerPol( Array<Float> &w,
     112                        Array<Float> &tsys,
     113                        Array<Double> &tint ) ;
     114 
    110115  void toInt( Array<uChar> &u, Array<Int> &v ) ;
    111116  void toInt( Array<uInt> &u, Array<Int> &v ) ;
     
    131136
    132137  Bool examine() ;
    133   void attach() ;
     138  void attach( Table &tab ) ;
    134139
    135140  void call_ggridsd( Double* xy,
     
    154159                     Int *polMap ) ;
    155160
     161  void initPol( Int ipol ) ;
     162
    156163
    157164  String infile_ ;
     
    175182
    176183  Table tab_ ;
     184  Table ptab_ ;
    177185  ROArrayColumn<Float> spectraCol_ ;
    178186  ROArrayColumn<uChar> flagtraCol_ ;
Note: See TracChangeset for help on using the changeset viewer.