Changeset 2375


Ignore:
Timestamp:
12/19/11 19:40:37 (13 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...

Several bug fixes and updates

  • fixed misunderstanding of array shape when getting data
  • load flag data as Int (originally uChar/uInt) at the beginning of gridding
  • do not plot observed position and grid position by default
  • use Array (instead of Vector/Matrix/Cube) as much as possible


Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapgrid.py

    r2373 r2375  
    4242        self.outfile = self.gridder._save( outfile )
    4343
    44     def plot( self, plotchan=-1, plotpol=-1 ):
     44    def plot( self, plotchan=-1, plotpol=-1, plotobs=False, plotgrid=False ):
    4545        import time
    4646        t0=time.time()
     
    4949        rcParams['scantable.storage'] = 'disk'
    5050        plotter = _SDGridPlotter( self.infile, self.outfile, self.ifno )
    51         plotter.plot( chan=plotchan, pol=plotpol )
     51        plotter.plot( chan=plotchan, pol=plotpol, plotobs=plotobs, plotgrid=plotgrid )
    5252        # back to original setup
    5353        rcParams['scantable.storage'] = storg
     
    123123        #print 'cellx,celly=',self.cellx,self.celly
    124124
    125     def plot( self, chan=-1, pol=-1 ):
     125    def plot( self, chan=-1, pol=-1, plotobs=False, plotgrid=False ):
    126126        if pol < 0:
    127127            opt = 'averaged over pol'
     
    137137        pl.clf()
    138138        # plot grid position
    139         x = numpy.arange(self.blc[0],self.trc[0]+0.5*self.cellx,self.cellx,dtype=float)
    140         #print 'len(x)=',len(x)
    141         #print 'x=',x
    142         ybase = numpy.ones(self.nx,dtype=float)*self.blc[1]
    143         #print 'len(ybase)=',len(ybase)
    144         incr = self.celly
    145         for iy in xrange(self.ny):
    146             y = ybase + iy * incr
    147             #print y
    148             pl.plot(x,y,',',color='blue')
     139        if plotgrid:
     140            x = numpy.arange(self.blc[0],self.trc[0]+0.5*self.cellx,self.cellx,dtype=float)
     141            #print 'len(x)=',len(x)
     142            #print 'x=',x
     143            ybase = numpy.ones(self.nx,dtype=float)*self.blc[1]
     144            #print 'len(ybase)=',len(ybase)
     145            incr = self.celly
     146            for iy in xrange(self.ny):
     147                y = ybase + iy * incr
     148                #print y
     149                pl.plot(x,y,',',color='blue')
    149150        # plot observed position
    150         irow = 0
    151         while ( irow < self.nrow ):
    152             chunk = self.getPointingChunk( irow )
    153             #print chunk
    154             pl.plot(chunk[0],chunk[1],',',color='green')
    155             irow += chunk.shape[1]
    156             #print irow
     151        if plotobs:
     152            irow = 0
     153            while ( irow < self.nrow ):
     154                chunk = self.getPointingChunk( irow )
     155                #print chunk
     156                pl.plot(chunk[0],chunk[1],',',color='green')
     157                irow += chunk.shape[1]
     158                #print irow
    157159        # show image
    158160        extent=[self.blc[0]-0.5*self.cellx,
  • trunk/src/STGrid.cpp

    r2374 r2375  
    77#include <casa/Arrays/Cube.h>
    88#include <casa/Arrays/ArrayMath.h>
    9 #include <casa/Arrays/ArrayPartMath.h>
     9#include <casa/Arrays/ArrayIter.h>
    1010#include <casa/Quanta/Quantum.h>
    1111#include <casa/Quanta/QuantumHolder.h>
     
    155155
    156156  // retrieve data
    157   Cube<Complex> spectra ;
    158   Matrix<Double> direction ;
    159   Cube<uChar> flagtra ;
    160   Matrix<uInt> rflag ;
    161   Matrix<Float> weight ;
     157  Array<Complex> spectra ;
     158  Array<Double> direction ;
     159  Array<Int> flagtra ;
     160  Array<Int> rflag ;
     161  Array<Float> weight ;
    162162  double t0, t1 ;
    163163  t0 = mathutil::gettimeofday_sec() ;
     
    170170  //os << "weight = " << weight << LogIO::POST ;
    171171
    172   // flagtra: uChar -> Int
    173   // rflag: uInt -> Int
    174   Cube<Int> flagI ;
    175   Matrix<Int> rflagI ;
    176   t0 = mathutil::gettimeofday_sec() ;
    177   toInt( &flagtra, &flagI ) ;
    178   toInt( &rflag, &rflagI ) ;
    179   t1 = mathutil::gettimeofday_sec() ;
    180   os << "toInt: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
    181  
    182172  // grid parameter
    183173  os << LogIO::DEBUGGING ;
     
    200190
    201191  // world -> pixel
    202   Matrix<Double> xypos( direction.shape(), 0.0 ) ;
     192  Array<Double> xypos( direction.shape(), 0.0 ) ;
    203193  t0 = mathutil::gettimeofday_sec() ;
    204194  toPixel( direction, xypos ) ; 
    205195  t1 = mathutil::gettimeofday_sec() ;
     196  //os << "xypos=" << xypos << LogIO::POST ;
    206197  os << "toPixel: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
    207198 
     
    211202  const Complex *data_p = spectra.getStorage( deleteData ) ;
    212203  const Float *wgt_p = weight.getStorage( deleteWgt ) ;
    213   const Int *flag_p = flagI.getStorage( deleteFlag ) ;
    214   const Int *rflag_p = rflagI.getStorage( deleteFlagR ) ;
     204  //const Int *flag_p = flagI.getStorage( deleteFlag ) ;
     205  //const Int *rflag_p = rflagI.getStorage( deleteFlagR ) ;
     206  const Int *flag_p = flagtra.getStorage( deleteFlag ) ;
     207  const Int *rflag_p = rflag.getStorage( deleteFlagR ) ;
    215208  Float *conv_p = convFunc.getStorage( deleteConv ) ;
    216209  // Extend grid plane with convSupport_
     
    278271  spectra.freeStorage( data_p, deleteData ) ;
    279272  weight.freeStorage( wgt_p, deleteWgt ) ;
    280   flagI.freeStorage( flag_p, deleteFlag ) ;
    281   rflagI.freeStorage( rflag_p, deleteFlagR ) ;
     273  flagtra.freeStorage( flag_p, deleteFlag ) ;
     274  rflag.freeStorage( rflag_p, deleteFlagR ) ;
    282275  convFunc.putStorage( conv_p, deleteConv ) ;
    283276  delete polMap ;
     
    336329                        String &center )
    337330{
     331  LogIO os( LogOrigin("STGrid","setupGrid",WHERE) ) ;
    338332  //cout << "nx=" << nx << ", ny=" << ny << endl ;
    339333
     
    372366
    373367
     368  nx_ = nx ;
     369  ny_ = ny ;
     370  if ( nx < 0 && ny > 0 ) {
     371    nx_ = ny ;
     372    ny_ = ny ;
     373  }
     374  if ( ny < 0 && nx > 0 ) {
     375    nx_ = nx ;
     376    ny_ = nx ;
     377  }
     378
    374379  //Double wx = xmax - xmin ;
    375380  //Double wy = ymax - ymin ;
     
    379384  wx *= 1.10 ;
    380385  wy *= 1.10 ;
     386
    381387  Quantum<Double> qcellx ;
    382388  Quantum<Double> qcelly ;
    383   nx_ = nx ;
    384   ny_ = ny ;
    385   if ( nx < 0 && ny > 0 ) {
    386     nx_ = ny ;
    387     ny_ = ny ;
    388   }
    389   if ( ny < 0 && nx > 0 ) {
    390     nx_ = nx ;
    391     ny_ = nx ;
    392   }
    393389  //cout << "nx_ = " << nx_ << ",  ny_ = " << ny_ << endl ;
    394390  if ( cellx.size() != 0 && celly.size() != 0 ) {
     
    397393  }
    398394  else if ( celly.size() != 0 ) {
    399     cout << "Using celly to x-axis..." << endl ;
     395    os << "Using celly to x-axis..." << LogIO::POST ;
    400396    readQuantity( qcelly, celly ) ;
    401397    qcellx = qcelly ;
    402398  }
    403399  else if ( cellx.size() != 0 ) {
    404     cout << "Using cellx to y-axis..." << endl ;
     400    os << "Using cellx to y-axis..." << LogIO::POST ;
    405401    readQuantity( qcellx, cellx ) ;
    406402    qcelly = qcellx ;
     
    408404  else {
    409405    if ( nx_ < 0 ) {
    410       cout << "No user preference in grid setting. Using default..." << endl ;
     406      os << "No user preference in grid setting. Using default..." << LogIO::POST ;
    411407      readQuantity( qcellx, "1.0arcmin" ) ;
    412408      qcelly = qcellx ;
    413409    }
    414410    else {
     411      if ( wx == 0.0 ) {
     412        os << "Using default spatial extent (10arcmin) in x" << LogIO::POST ;
     413        wx = 0.00290888 ;
     414      }
     415      if ( wy == 0.0 ) {
     416        os << "Using default spatial extent (10arcmin) in y" << LogIO::POST ;
     417        wy = 0.00290888 ;
     418      }
    415419      qcellx = Quantum<Double>( wx/nx_, "rad" ) ;
    416420      qcelly = Quantum<Double>( wy/ny_, "rad" ) ;
     
    420424  celly_ = qcelly.getValue( "rad" ) ;
    421425  if ( nx_ < 0 ) {
     426    if ( wx == 0.0 ) {
     427      os << "Using default spatial extent (10arcmin) in x" << LogIO::POST ;
     428      wx = 0.00290888 ;
     429    }
     430    if ( wy == 0.0 ) {
     431      os << "Using default spatial extent (10arcmin) in y" << LogIO::POST ;
     432      wy = 0.00290888 ;
     433    }
    422434    nx_ = Int( ceil( wx/cellx_ ) ) ;
    423435    ny_ = Int( ceil( wy/celly_ ) ) ;
     
    455467}
    456468
    457 void STGrid::getData( Cube<Complex> &spectra,
    458                       Matrix<Double> &direction,
    459                       Cube<uChar> &flagtra,
    460                       Matrix<uInt> &rflag,
    461                       Matrix<Float> &weight )
    462 {
    463 //   LogIO os( LogOrigin("STGrid","getData",WHERE) ) ;
     469void STGrid::getData( Array<Complex> &spectra,
     470                      Array<Double> &direction,
     471                      Array<uChar> &flagtra,
     472                      Array<uInt> &rflag,
     473                      Array<Float> &weight )
     474{
     475  LogIO os( LogOrigin("STGrid","getData",WHERE) ) ;
    464476//   os << "start" << LogIO::POST ;
    465477  Table tab ;
    466478  selectData( tab ) ;
    467   updatePolList( tab ) ;
     479  setupArray( tab ) ;
    468480//   os << "npol_ = " << npol_ << LogIO::POST ;
    469481//   os << "nchan_ = " << nchan_ << LogIO::POST ;
    470482//   os << "nrow_ = " << nrow_ << LogIO::POST ;
    471   spectra.resize( npol_, nchan_, nrow_ ) ;
    472   flagtra.resize( npol_, nchan_, nrow_ ) ;
    473   rflag.resize( npol_, nrow_ ) ;
    474   Cube<Float> tsys( npol_, nchan_, nrow_ ) ;
    475   Matrix<Double> tint( npol_, nrow_ ) ;
     483  IPosition cshape( 3, npol_, nchan_, nrow_ ) ;
     484  IPosition mshape( 2, npol_, nrow_ ) ;
     485  spectra.resize( cshape ) ;
     486  flagtra.resize( cshape ) ;
     487  rflag.resize( mshape ) ;
     488  direction.resize( IPosition(2,2,nrow_) ) ;
     489  Array<Float> tsys( cshape ) ;
     490  Array<Double> tint( mshape ) ;
     491
     492  ArrayIterator<uChar> fli( flagtra, IPosition(2,1,2) ) ;
     493  ArrayIterator<uInt> fri( rflag, IPosition(1,1) ) ;
     494  ArrayIterator<Float> tsi( tsys, IPosition(2,1,2) ) ;
     495  ArrayIterator<Double> tii( tint, IPosition(1,1) ) ;
     496 
    476497  // boolean for pointer access
    477   Bool bsp, bfl, bfr, bts, bti, bsps ;
     498  Bool bsp, bsps ;
    478499  // pointer to the data
    479500  Complex *sp_p = spectra.getStorage( bsp ) ;
    480   uChar *fl_p = flagtra.getStorage( bfl ) ;
    481   uInt *fr_p = rflag.getStorage( bfr ) ;
    482   Float *ts_p = tsys.getStorage( bts ) ;
    483   Double *ti_p = tint.getStorage( bti ) ;
    484501  // working pointer
    485502  Complex *wsp_p = sp_p ;
    486   uChar *wfl_p = fl_p ;
    487   uInt *wfr_p = fr_p ;
    488   Float *wts_p = ts_p ;
    489   Double *wti_p = ti_p ;
    490503  uInt len = nchan_ * nrow_ ;
    491   IPosition mshape( 2, nchan_, nrow_ ) ;
     504  IPosition mshape2( 2, nchan_, nrow_ ) ;
    492505  IPosition vshape( 1, nrow_ ) ;
    493506  Vector<Float> spSlice( nchan_ ) ;
     
    513526      }
    514527    }
    515     Matrix<uChar> flSlice( mshape, wfl_p, SHARE ) ;
    516     Vector<uInt> frSlice( vshape, wfr_p, SHARE ) ;
     528    Array<uChar> flSlice = fli.array() ;
     529    Vector<uInt> frSlice = fri.array() ;
    517530    flagtraCol.getColumn( flSlice ) ;
    518531    rflagCol.getColumn( frSlice ) ;
     
    520533      directionCol.getColumn( direction ) ;
    521534    Vector<Float> tmpF = tsysCol( 0 ) ;
    522     Vector<Double> tmpD( vshape, wti_p, SHARE ) ;
    523     Matrix<Float> tsSlice( mshape, wts_p, SHARE ) ;
     535    Array<Float> tsSlice = tsi.array() ;
    524536    if ( tmpF.nelements() == (uInt)nchan_ ) {
    525537      tsysCol.getColumn( tsSlice ) ;
     
    528540      tsSlice = tmpF( 0 ) ;
    529541    }
     542    Vector<Double> tmpD = tii.array() ;
    530543    tintCol.getColumn( tmpD ) ;
    531544
    532545    wsp_p += len ;
    533     wfl_p += len ;
    534     wfr_p += nrow_ ;
    535     wts_p += len ;
    536     wti_p += nrow_ ;
     546
     547    fli.next() ;
     548    fri.next() ;
     549    tsi.next() ;
     550    tii.next() ;
    537551  }
    538552  spSlice.freeStorage( sps_p, bsps ) ;
    539553  spectra.putStorage( sp_p, bsp ) ;
    540   flagtra.putStorage( fl_p, bfl ) ;
    541   rflag.putStorage( fr_p, bfr ) ;
    542   tsys.putStorage( ts_p, bts ) ;
    543   tint.putStorage( ti_p, bti ) ;
     554
     555//   os << "spectra=" << spectra << LogIO::POST ;
     556//   os << "flagtra=" << flagtra << LogIO::POST ;
     557//   os << "rflag=" << rflag << LogIO::POST ;
     558//   os << "direction=" << direction << LogIO::POST ;
    544559
    545560  getWeight( weight, tsys, tint ) ;
    546561}
    547562
    548 void STGrid::updatePolList( Table &tab )
     563void STGrid::getData( Array<Complex> &spectra,
     564                      Array<Double> &direction,
     565                      Array<Int> &flagtra,
     566                      Array<Int> &rflag,
     567                      Array<Float> &weight )
     568{
     569  LogIO os( LogOrigin("STGrid","getData",WHERE) ) ;
     570  double t0, t1 ;
     571
     572  Array<uChar> flagUC ;
     573  Array<uInt> rflagUI ;
     574  getData( spectra, direction, flagUC, rflagUI, weight ) ;
     575
     576  t0 = mathutil::gettimeofday_sec() ;
     577  toInt( flagUC, flagtra ) ;
     578  toInt( rflagUI, rflag ) ;
     579  t1 = mathutil::gettimeofday_sec() ;
     580  os << "toInt: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
     581}
     582
     583void STGrid::setupArray( Table &tab )
    549584{
    550585  ROScalarColumn<uInt> polnoCol( tab, "POLNO" ) ;
     
    578613  npol_ = pollist_.size() ;
    579614  if ( npol_ == 0 ) {
    580     LogIO os( LogOrigin("STGrid","updatePolList",WHERE) ) ;
     615    LogIO os( LogOrigin("STGrid","setupArray",WHERE) ) ;
    581616    os << LogIO::SEVERE << "Empty pollist" << LogIO::EXCEPTION ;
    582617  }
     
    584619  ROArrayColumn<uChar> tmpCol( tab, "FLAGTRA" ) ;
    585620  nchan_ = tmpCol( 0 ).nelements() ;
    586 //   LogIO os( LogOrigin("STGrid","updatePolList",WHERE) ) ;
     621//   LogIO os( LogOrigin("STGrid","setupArray",WHERE) ) ;
    587622//   os << "npol_ = " << npol_ << "(" << pollist_ << ")" << endl
    588623//      << "nchan_ = " << nchan_ << endl
     
    590625}
    591626
    592 void STGrid::getWeight( Matrix<Float> &w,
    593                         Cube<Float> &tsys,
    594                         Matrix<Double> &tint )
     627void STGrid::getWeight( Array<Float> &w,
     628                        Array<Float> &tsys,
     629                        Array<Double> &tint )
    595630{
    596631  LogIO os( LogOrigin("STGrid","getWeight",WHERE) ) ;
     
    598633  t0 = mathutil::gettimeofday_sec() ;
    599634  // resize
    600   w.resize( nchan_, nrow_ ) ;
     635  IPosition refShape = tsys.shape() ;
     636  Int nchan = refShape[1] ;
     637  Int nrow = refShape[2] ;
     638  w.resize( IPosition(2,nchan,nrow) ) ;
    601639
    602640  // set weight
     
    612650    const Double *ti_p = tint.getStorage( b1 ) ;
    613651    const Double *w1_p = ti_p ;
    614     for ( Int irow = 0 ; irow < nrow_ ; irow++ ) {
     652    for ( Int irow = 0 ; irow < nrow ; irow++ ) {
    615653      Float val = (Float)(polMean( w1_p )) ;
    616       for ( Int ichan = 0 ; ichan < nchan_ ; ichan++ ) {
     654      for ( Int ichan = 0 ; ichan < nchan ; ichan++ ) {
    617655        *w0_p = val ;
    618656        w0_p++ ;
     
    629667    const Float *ts_p = tsys.getStorage( b1 ) ;
    630668    const Float *w1_p = ts_p ;
    631     for ( Int irow = 0 ; irow < nrow_ ; irow++ ) {
    632       for ( Int ichan = 0 ; ichan < nchan_ ; ichan++ ) {
     669    for ( Int irow = 0 ; irow < nrow ; irow++ ) {
     670      for ( Int ichan = 0 ; ichan < nchan ; ichan++ ) {
    633671        Float val = polMean( w1_p ) ;
    634672        *w0_p = 1.0 / ( val * val ) ;
     
    648686    const Float *ts_p = tsys.getStorage( b2 ) ;
    649687    const Float *w2_p = ts_p ;
    650     for ( Int irow = 0 ; irow < nrow_ ; irow++ ) {
     688    for ( Int irow = 0 ; irow < nrow ; irow++ ) {
    651689      Float interval = (Float)(polMean( w1_p )) ;
    652       for ( Int ichan = 0 ; ichan < nchan_ ; ichan++ ) {
     690      for ( Int ichan = 0 ; ichan < nchan ; ichan++ ) {
    653691        Float temp = polMean( w2_p ) ;
    654692        *w0_p = interval / ( temp * temp ) ;
     
    696734}
    697735
    698 void STGrid::toInt( Array<uChar> *u, Array<Int> *v )
    699 {
    700   uInt len = u->nelements() ;
     736void STGrid::toInt( Array<uChar> &u, Array<Int> &v )
     737{
     738  uInt len = u.nelements() ;
    701739  Int *int_p = new Int[len] ;
    702740  Bool deleteIt ;
    703   const uChar *data_p = u->getStorage( deleteIt ) ;
     741  const uChar *data_p = u.getStorage( deleteIt ) ;
    704742  Int *i_p = int_p ;
    705743  const uChar *u_p = data_p ;
     
    709747    u_p++ ;
    710748  }
    711   u->freeStorage( data_p, deleteIt ) ;
    712   v->takeStorage( u->shape(), int_p, TAKE_OVER ) ;
    713 }
    714 
    715 void STGrid::toInt( Array<uInt> *u, Array<Int> *v )
    716 {
    717   uInt len = u->nelements() ;
     749  u.freeStorage( data_p, deleteIt ) ;
     750  v.takeStorage( u.shape(), int_p, TAKE_OVER ) ;
     751}
     752
     753void STGrid::toInt( Array<uInt> &u, Array<Int> &v )
     754{
     755  uInt len = u.nelements() ;
    718756  Int *int_p = new Int[len] ;
    719757  Bool deleteIt ;
    720   const uInt *data_p = u->getStorage( deleteIt ) ;
     758  const uInt *data_p = u.getStorage( deleteIt ) ;
    721759  Int *i_p = int_p ;
    722760  const uInt *u_p = data_p ;
     
    726764    u_p++ ;
    727765  }
    728   u->freeStorage( data_p, deleteIt ) ;
    729   v->takeStorage( u->shape(), int_p, TAKE_OVER ) ;
    730 }
    731 
    732 void STGrid::toPixel( Matrix<Double> &world, Matrix<Double> &pixel )
     766  u.freeStorage( data_p, deleteIt ) ;
     767  v.takeStorage( u.shape(), int_p, TAKE_OVER ) ;
     768}
     769
     770void STGrid::toPixel( Array<Double> &world, Array<Double> &pixel )
    733771{
    734772  // gridding will be done on (nx_+2*convSupport_) x (ny_+2*convSupport_)
    735773  // grid plane to avoid unexpected behavior on grid edge
    736   Vector<Double> pixc( 2 ) ;
    737   pixc(0) = Double( nx_-1 ) * 0.5 ;
    738   pixc(1) = Double( ny_-1 ) * 0.5 ;
    739 //   pixc(0) = Double( nx_+2*convSupport_-1 ) * 0.5 ;
    740 //   pixc(1) = Double( ny_+2*convSupport_-1 ) * 0.5 ;
     774  Block<Double> pixc( 2 ) ;
     775  pixc[0] = Double( nx_-1 ) * 0.5 ;
     776  pixc[1] = Double( ny_-1 ) * 0.5 ;
     777//   pixc[0] = Double( nx_+2*convSupport_-1 ) * 0.5 ;
     778//   pixc[1] = Double( ny_+2*convSupport_-1 ) * 0.5 ;
    741779  uInt nrow = world.shape()[1] ;
    742   Vector<Double> cell( 2 ) ;
    743   cell(0) = cellx_ ;
    744   cell(1) = celly_ ;
    745   for ( uInt irow = 0 ; irow < nrow ; irow++ ) {
    746     for ( uInt i = 0 ; i < 2 ; i++ ) {
    747       pixel( i, irow ) = pixc(i) + ( world(i, irow) - center_(i) ) / cell(i) ;
    748     }
    749   }
     780  Bool bw, bp ;
     781  const Double *w_p = world.getStorage( bw ) ;
     782  Double *p_p = pixel.getStorage( bp ) ;
     783  const Double *ww_p = w_p ;
     784  Double *wp_p = p_p ;
     785  for ( uInt i = 0 ; i < nrow ; i++ ) {
     786    *wp_p = pixc[0] + ( *ww_p - center_[0] ) / cellx_ ;
     787    wp_p++ ;
     788    ww_p++ ;
     789    *wp_p = pixc[1] + ( *ww_p - center_[1] ) / celly_ ;
     790    wp_p++ ;
     791    ww_p++ ;
     792  }
     793  world.freeStorage( w_p, bw ) ;
     794  pixel.putStorage( p_p, bp ) ; 
    750795//   String gridfile = "grid."+convType_+"."+String::toString(convSupport_)+".dat" ;
    751796//   ofstream ofs( gridfile.c_str(), ios::out ) ;
  • trunk/src/STGrid.h

    r2374 r2375  
    8686                Array<Float> &gwgt ) ;
    8787 
    88   void getData( Cube<Complex> &spectra,
    89                 Matrix<Double> &direction,
    90                 Cube<uChar> &flagtra,
    91                 Matrix<uInt> &rflag,
    92                 Matrix<Float> &weight ) ;
     88  void getData( Array<Complex> &spectra,
     89                Array<Double> &direction,
     90                Array<uChar> &flagtra,
     91                Array<uInt> &rflag,
     92                Array<Float> &weight ) ;
     93  void getData( Array<Complex> &spectra,
     94                Array<Double> &direction,
     95                Array<Int> &flagtra,
     96                Array<Int> &rflag,
     97                Array<Float> &weight ) ;
    9398
    94   void getWeight( Matrix<Float> &w,
    95                   Cube<Float> &tsys,
    96                   Matrix<Double> &tint ) ;
     99  void getWeight( Array<Float> &w,
     100                  Array<Float> &tsys,
     101                  Array<Double> &tint ) ;
    97102
    98   void toInt( Array<uChar> *u, Array<Int> *v ) ;
    99   void toInt( Array<uInt> *u, Array<Int> *v ) ;
     103  void toInt( Array<uChar> &u, Array<Int> &v ) ;
     104  void toInt( Array<uInt> &u, Array<Int> &v ) ;
    100105
    101   void toPixel( Matrix<Double> &world, Matrix<Double> &pixel ) ;
     106  void toPixel( Array<Double> &world, Array<Double> &pixel ) ;
    102107 
    103108  void boxFunc( Vector<Float> &convFunc, Int &convSize ) ;
     
    111116  Double polMean( const Double *p ) ;
    112117
    113   void updatePolList( Table &tab ) ;
     118  void setupArray( Table &tab ) ;
    114119
    115120  void prepareTable( Table &tab, String &name ) ;
Note: See TracChangeset for help on using the changeset viewer.