Changeset 3106


Ignore:
Timestamp:
10/04/16 18:20:50 (7 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes/No?

Interface Changes: Yes/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...


Check-in asap modifications from Jim regarding casacore namespace conversion.

Location:
trunk
Files:
148 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r3102 r3106  
    55# minimum requirement for cmake version
    66cmake_minimum_required( VERSION 2.8 )
     7
     8add_definitions ("-DUseCasacoreNamespace")
    79
    810# options
  • trunk/apps/asap2to3.cpp

    r2157 r3106  
    66
    77//#include <casa/namesapce.h>
    8 using namespace casa;
     8
     9using namespace casacore;
    910
    1011int main(int argc, const char* argv[]) {
  • trunk/external-alma/asdm2ASAP/ASDMFiller.cc

    r2869 r3106  
    9090  //logsink_->postLocally( LogMessage("sFreqFrame = "+sFreqFrame,LogOrigin(className_,funcName,WHERE)) ) ;
    9191 
    92   Vector<casa::Double> antpos = table_->getHeader().antennaposition ;
     92  Vector<casacore::Double> antpos = table_->getHeader().antennaposition ;
    9393
    9494  // data selection
     
    194194
    195195          // fill MOLECULE_ID and add MOLECULES row if necessary
    196           Vector<casa::Double> restFreqs( rf.size() ) ;
     196          Vector<casacore::Double> restFreqs( rf.size() ) ;
    197197          for ( uInt i = 0 ; i < rf.size() ; i++ )
    198             restFreqs[i] = (casa::Double)(rf[i]) ;
     198            restFreqs[i] = (casacore::Double)(rf[i]) ;
    199199          setMolecule( restFreqs ) ;
    200200         
    201201          // time and interval
    202           casa::Double mjd = (casa::Double)(reader_->getTime()) ;
    203           casa::Double interval = (casa::Double)(reader_->getInterval()) ;
     202          casacore::Double mjd = (casacore::Double)(reader_->getTime()) ;
     203          casacore::Double interval = (casacore::Double)(reader_->getInterval()) ;
    204204          //logsink_->postLocally( LogMessage("mjd = "+String::toString(mjd),LogOrigin(className_,funcName,WHERE)) ) ;
    205205
     
    208208         
    209209          // fill SRCNAME, SRCTYPE, FIELDNAME, SRCDIRECTION, SRCPROPERMOTION, and SRCVELOCITY
    210           Vector<casa::Double> srcDir( 2 ) ;
    211           srcDir[0] = (casa::Double)(srcDirection[0]) ;
    212           srcDir[1] = (casa::Double)(srcDirection[1]) ;
    213           Vector<casa::Double> srcPM( 2 ) ;
    214           srcPM[0] = (casa::Double)(srcProperMotion[0]) ;
    215           srcPM[1] = (casa::Double)(srcProperMotion[1]) ;
    216           setSource( srcname, srctype, fieldname, srcDir, srcPM, (casa::Double)sysVel ) ;
     210          Vector<casacore::Double> srcDir( 2 ) ;
     211          srcDir[0] = (casacore::Double)(srcDirection[0]) ;
     212          srcDir[1] = (casacore::Double)(srcDirection[1]) ;
     213          Vector<casacore::Double> srcPM( 2 ) ;
     214          srcPM[0] = (casacore::Double)(srcProperMotion[0]) ;
     215          srcPM[1] = (casacore::Double)(srcProperMotion[1]) ;
     216          setSource( srcname, srctype, fieldname, srcDir, srcPM, (casacore::Double)sysVel ) ;
    217217
    218218          // fill FLAGROW
     
    231231                                   windspeed,
    232232                                   windaz ) ;
    233           setWeather2( (casa::Float)temperature,
    234                        (casa::Float)pressure,
    235                        (casa::Float)humidity,
    236                        (casa::Float)windspeed,
    237                        (casa::Float)windaz ) ;
     233          setWeather2( (casacore::Float)temperature,
     234                       (casacore::Float)pressure,
     235                       (casacore::Float)humidity,
     236                       (casacore::Float)windspeed,
     237                       (casacore::Float)windaz ) ;
    238238          //logsink_->postLocally( LogMessage("temperature = "+String::toString(temperature),LogOrigin(className_,funcName,WHERE)) ) ;
    239239          // fill AZIMUTH, ELEVATION, DIRECTION and SCANRATE
     
    246246                                    el,
    247247                                    srate ) ;
    248           Vector<casa::Double> scanRate( 2, 0.0 ) ;
    249           Vector<casa::Double> direction( 2, 0.0 ) ;
     248          Vector<casacore::Double> scanRate( 2, 0.0 ) ;
     249          Vector<casacore::Double> direction( 2, 0.0 ) ;
    250250          if ( srate.size() > 0 ) {
    251             scanRate[0] = (casa::Double)(srate[0]) ;
    252             scanRate[1] = (casa::Double)(srate[1]) ;
     251            scanRate[0] = (casacore::Double)(srate[0]) ;
     252            scanRate[1] = (casacore::Double)(srate[1]) ;
    253253          }
    254254          setScanRate( scanRate ) ;
    255255          if ( dir.size() > 0 ) {
    256             direction[0] = (casa::Double)(dir[0]) ;
    257             direction[1] = (casa::Double)(dir[1]) ;
     256            direction[0] = (casacore::Double)(dir[0]) ;
     257            direction[1] = (casacore::Double)(dir[1]) ;
    258258          }
    259259          else {
     
    261261          }
    262262          //logsink_->postLocally( LogMessage("direction = "+String::toString(direction),LogOrigin(className_,funcName,WHERE)) ) ;
    263           setDirection( direction, (casa::Float)az, (casa::Float)el ) ;
     263          setDirection( direction, (casacore::Float)az, (casacore::Float)el ) ;
    264264
    265265           // REFPIX, REFVAL, INCREMENT
     
    270270          else {
    271271            reader_->getFrequency( refpix, refval, incr, freqref ) ;
    272             refval = (double)toLSRK( casa::Double(refval),
     272            refval = (double)toLSRK( casacore::Double(refval),
    273273                                     String(freqref),
    274274                                     hdr.utc,
     
    281281
    282282          // fill FREQ_ID and add FREQUENCIES row if necessary
    283           setFrequency( (casa::Double)refpix, (casa::Double)refval, (casa::Double)incr ) ;
     283          setFrequency( (casacore::Double)refpix, (casacore::Double)refval, (casacore::Double)incr ) ;
    284284
    285285          // loop on polarization
     
    303303          // OPACITY
    304304          vector<float> tau = reader_->getOpacity() ;
    305           Vector<casa::Float> opacity = toVector( tau, numPol ) ;
     305          Vector<casacore::Float> opacity = toVector( tau, numPol ) ;
    306306
    307307          // SPECTRA, FLAGTRA, TSYS, TCAL
     
    311311          vector< vector<float> > tc ;
    312312          reader_->getTcalAndTsys( tc, ts ) ;
    313           Matrix<casa::Float> spectra = toMatrix( sp, numPol, numChan ) ;
     313          Matrix<casacore::Float> spectra = toMatrix( sp, numPol, numChan ) ;
    314314          //logsink_->postLocally( LogMessage("spectra(0,0) = "+String::toString(spectra(0,0)),LogOrigin(className_,funcName,WHERE)) ) ;
    315315          Vector<uChar> flagtra( numChan, 0 ) ;
    316           Matrix<casa::Float> tsys = toMatrix( ts, numPol, numChan ) ;
    317           Matrix<casa::Float> tcal = toMatrix( tc, numPol, numChan ) ;
     316          Matrix<casacore::Float> tsys = toMatrix( ts, numPol, numChan ) ;
     317          Matrix<casacore::Float> tcal = toMatrix( tc, numPol, numChan ) ;
    318318          //logsink_->postLocally( LogMessage("tsys(0,0) = "+String::toString(tsys(0,0)),LogOrigin(className_,funcName,WHERE)) ) ;
    319319//           String caltime = "" ;
    320 //           if ( anyNE( tcal, (casa::Float)1.0 ) )
     320//           if ( anyNE( tcal, (casacore::Float)1.0 ) )
    321321//             caltime = toTcalTime( mjd ) ;
    322322          String caltime = toTcalTime( mjd ) ;
     
    401401    string ref ;
    402402    reader_->getSourceDirection( sdir, ref ) ;
    403     Vector<casa::Double> sourceDir( sdir ) ;
     403    Vector<casacore::Double> sourceDir( sdir ) ;
    404404    hdr.reffreq = toLSRK( hdr.reffreq, hdr.freqref, hdr.utc, hdr.antennaposition, sdir, String(ref) ) ;
    405405    hdr.freqref = "LSRK" ;
     
    437437}
    438438
    439 Matrix<casa::Float> ASDMFiller::toMatrix( float *sp,
     439Matrix<casacore::Float> ASDMFiller::toMatrix( float *sp,
    440440                                         unsigned int npol,
    441441                                         unsigned int nchan )
    442442{
    443   Matrix<casa::Float> mSp( npol, nchan ) ;
     443  Matrix<casacore::Float> mSp( npol, nchan ) ;
    444444  if ( npol <= 2 ) {
    445445    // 1 or 2 polarization case
    446446    for ( unsigned int ich = 0 ; ich < nchan ; ich++ ) {
    447447      for ( unsigned int ipol = 0 ; ipol < npol ; ipol++ ) {
    448         mSp(ipol,ich) = (casa::Float)(sp[npol*ich+ipol]) ;
     448        mSp(ipol,ich) = (casacore::Float)(sp[npol*ich+ipol]) ;
    449449      }
    450450    }
     
    453453    // 4 polarization case
    454454    for ( unsigned int ich = 0 ; ich < nchan ; ich++ ) {
    455       mSp(0,ich) = (casa::Float)(sp[4*ich]) ;   // Re(XX)
    456       mSp(1,ich) = (casa::Float)(sp[4*ich+4]) ; // Re(YY)
    457       mSp(2,ich) = (casa::Float)(sp[4*ich+2]) ; // Re(XY)
    458       mSp(3,ich) = (casa::Float)(sp[4*ich+3]) ; // Im(XY)
     455      mSp(0,ich) = (casacore::Float)(sp[4*ich]) ;   // Re(XX)
     456      mSp(1,ich) = (casacore::Float)(sp[4*ich+4]) ; // Re(YY)
     457      mSp(2,ich) = (casacore::Float)(sp[4*ich+2]) ; // Re(XY)
     458      mSp(3,ich) = (casacore::Float)(sp[4*ich+3]) ; // Im(XY)
    459459    }
    460460  }
     
    462462}
    463463
    464 Matrix<casa::Float> ASDMFiller::toMatrix( vector< vector<float> > &tsys,
     464Matrix<casacore::Float> ASDMFiller::toMatrix( vector< vector<float> > &tsys,
    465465                                               unsigned int npol,
    466466                                               unsigned int nchan )
     
    468468  unsigned int numRec = tsys.size() ;
    469469  unsigned int numChan = tsys[0].size() ;
    470   Matrix<casa::Float> ret ;
     470  Matrix<casacore::Float> ret ;
    471471  if ( npol == numRec && nchan == numChan ) {
    472472    ret.resize( npol, nchan ) ;
    473473    for ( unsigned int ip = 0 ; ip < npol ; ip++ )
    474474      for ( unsigned int ic = 0 ; ic < nchan ; ic++ )
    475         ret( ip, ic ) = (casa::Float)(tsys[ip][ic]) ;
     475        ret( ip, ic ) = (casacore::Float)(tsys[ip][ic]) ;
    476476  }
    477477  else if ( npol == numRec && numChan == 1 ) {
    478478    ret.resize( npol, 1 ) ;
    479479    for ( unsigned int ip = 0 ; ip < npol ; ip++ )
    480       ret( ip, 0 ) = (casa::Float)(tsys[0][0]) ;
     480      ret( ip, 0 ) = (casacore::Float)(tsys[0][0]) ;
    481481  }
    482482  else if ( numRec == 1 && nchan == numChan ) {
     
    484484    for ( unsigned int ip = 0 ; ip < npol ; ip++ )
    485485      for ( unsigned int ic = 0 ; ic < nchan ; ic++ )
    486         ret( ip, ic ) = (casa::Float)(tsys[0][ic]) ;
     486        ret( ip, ic ) = (casacore::Float)(tsys[0][ic]) ;
    487487  }
    488488  else if ( numRec == 1 && numChan == 1 ) {
    489489    ret.resize( npol, 1 ) ;
    490490    for ( unsigned int ip = 0 ; ip < npol ; ip++ )
    491       ret( ip, 0 ) = (casa::Float)(tsys[0][0]) ;
     491      ret( ip, 0 ) = (casacore::Float)(tsys[0][0]) ;
    492492  }
    493493  else if ( numRec == 2 && npol == 4 && numChan == nchan ) {
     
    496496    ret.resize( npol, nchan ) ;
    497497    for ( unsigned int ic = 0 ; ic < nchan ; ic++ ) {
    498       casa::Float tsysxy = (casa::Float)(0.5*(tsys[0][ic]+tsys[1][ic])) ;
    499       ret( 0, ic ) = (casa::Float)(tsys[0][ic]) ;
    500       ret( 1, ic ) = (casa::Float)(tsys[1][ic]) ;
     498      casacore::Float tsysxy = (casacore::Float)(0.5*(tsys[0][ic]+tsys[1][ic])) ;
     499      ret( 0, ic ) = (casacore::Float)(tsys[0][ic]) ;
     500      ret( 1, ic ) = (casacore::Float)(tsys[1][ic]) ;
    501501      ret( 2, ic ) = tsysxy ;
    502502      ret( 3, ic ) = tsysxy ;
     
    507507    //       at the moment Tsys[XY] = 0.5*(Tsys[X]+Tsys[Y])
    508508    ret.resize( npol, 1 ) ;
    509     casa::Float tsysxy = (casa::Float)(0.5*(tsys[0][0]+tsys[1][0])) ;
    510     ret( 0, 0 ) = (casa::Float)(tsys[0][0]) ;
    511     ret( 1, 0 ) = (casa::Float)(tsys[1][0]) ;
     509    casacore::Float tsysxy = (casacore::Float)(0.5*(tsys[0][0]+tsys[1][0])) ;
     510    ret( 0, 0 ) = (casacore::Float)(tsys[0][0]) ;
     511    ret( 1, 0 ) = (casacore::Float)(tsys[1][0]) ;
    512512    ret( 2, 0 ) = tsysxy ;
    513513    ret( 3, 0 ) = tsysxy ;
     
    517517    for ( unsigned int ip = 0 ; ip < npol ; ip++ )
    518518      for ( unsigned int ic = 0 ; ic < nchan ; ic++ )
    519         ret( ip, ic ) = (casa::Float)(tsys[0][ic]) ;   
     519        ret( ip, ic ) = (casacore::Float)(tsys[0][ic]) ;   
    520520  }
    521521  return ret ;
    522522}
    523523
    524 Vector<casa::Float> ASDMFiller::toVector( vector<float> &tau,
     524Vector<casacore::Float> ASDMFiller::toVector( vector<float> &tau,
    525525                                               unsigned int npol )
    526526{
    527527  String funcName = "toVector" ;
    528528
    529   Vector<casa::Float> ret( npol ) ;
     529  Vector<casacore::Float> ret( npol ) ;
    530530  //logsink_->postLocally( LogMessage("tau0="+String::toString(tau[0]),LogOrigin(className_,funcName,WHERE)) ) ;
    531531  if ( npol == 4 ) {
    532     ret[0] = (casa::Float)tau[0] ;
    533     ret[1] = (casa::Float)tau[1] ;
     532    ret[0] = (casacore::Float)tau[0] ;
     533    ret[1] = (casacore::Float)tau[1] ;
    534534    ret[2] = 0.5 * ( ret[0] + ret[1] ) ;
    535535    ret[3] = ret[2] ;
     
    537537  else if ( npol == tau.size() ) {
    538538    for ( unsigned int ipol = 0 ; ipol < npol ; ipol++ )
    539       ret[ipol] = (casa::Float)tau[ipol] ;
     539      ret[ipol] = (casacore::Float)tau[ipol] ;
    540540  }
    541541  else {
    542542    // I don't know how to handle...
    543543    for ( unsigned int ipol = 0 ; ipol < npol ; ipol++ )
    544       ret[ipol] = (casa::Float)tau[0] ;
     544      ret[ipol] = (casacore::Float)tau[0] ;
    545545  }
    546546  //logsink_->postLocally( LogMessage("tau="+String::toString(ret),LogOrigin(className_,funcName,WHERE)) ) ;
     
    548548}
    549549
    550 String ASDMFiller::toTcalTime( casa::Double mjd )
     550String ASDMFiller::toTcalTime( casacore::Double mjd )
    551551{
    552552  return MVTime( mjd ).string( MVTime::YMD ) ;
    553553}
    554554
    555 void ASDMFiller::toJ2000( Vector<casa::Double> &dir,
     555void ASDMFiller::toJ2000( Vector<casacore::Double> &dir,
    556556                               double az,
    557557                               double el,
    558                                casa::Double mjd,
    559                                Vector<casa::Double> antpos )
     558                               casacore::Double mjd,
     559                               Vector<casacore::Double> antpos )
    560560{
    561561  String funcName = "toJ2000" ;
    562562
    563   Vector<casa::Double> azel( 2 ) ;
     563  Vector<casacore::Double> azel( 2 ) ;
    564564  azel[0] = az ;
    565565  azel[1] = el ;
     
    580580}
    581581
    582 Vector<casa::Double> ASDMFiller::toJ2000( Vector<casa::Double> dir,
     582Vector<casacore::Double> ASDMFiller::toJ2000( Vector<casacore::Double> dir,
    583583                                          String dirref,
    584                                           casa::Double mjd,
    585                                           Vector<casa::Double> antpos )
    586 {
    587   Vector<casa::Double> newd( dir ) ;
     584                                          casacore::Double mjd,
     585                                          Vector<casacore::Double> antpos )
     586{
     587  Vector<casacore::Double> newd( dir ) ;
    588588  if ( dirref != "J2000" ) {
    589589    MEpoch me( Quantity( mjd, "d" ), MEpoch::UTC ) ;
     
    620620}
    621621
    622 casa::Double ASDMFiller::toLSRK( casa::Double freq,
     622casacore::Double ASDMFiller::toLSRK( casacore::Double freq,
    623623                                 String freqref,
    624                                  casa::Double utc,
    625                                  Vector<casa::Double> antpos,
    626                                  Vector<casa::Double> dir,
     624                                 casacore::Double utc,
     625                                 Vector<casacore::Double> antpos,
     626                                 Vector<casacore::Double> dir,
    627627                                 String dirref )
    628628{
     
    630630
    631631  //logsink_->postLocally( LogMessage("freqref = "+freqref,LogOrigin(className_,funcName,WHERE)) ) ;
    632   casa::Double newf = freq ;
     632  casacore::Double newf = freq ;
    633633  if ( freqToLsr_ && freqref != "LSRK" ) {
    634     MEpoch me( Quantum<casa::Double>( utc, Unit("d") ), MEpoch::UTC ) ;
    635     Vector< Quantum<casa::Double> > antposQ( 3 ) ;
     634    MEpoch me( Quantum<casacore::Double>( utc, Unit("d") ), MEpoch::UTC ) ;
     635    Vector< Quantum<casacore::Double> > antposQ( 3 ) ;
    636636    for ( int i = 0 ; i < 3 ; i++ )
    637       antposQ[i] = Quantum<casa::Double>( antpos[i], Unit("m") ) ;
     637      antposQ[i] = Quantum<casacore::Double>( antpos[i], Unit("m") ) ;
    638638    MPosition mp( antposQ, MPosition::ITRF ) ;
    639639    MDirection::Types dirtype ;
     
    641641    if ( !b )
    642642      dirtype = MDirection::J2000 ;
    643     MDirection md( Quantum<casa::Double>( dir[0], Unit("rad") ),
    644                    Quantum<casa::Double>( dir[1], Unit("rad") ),
     643    MDirection md( Quantum<casacore::Double>( dir[0], Unit("rad") ),
     644                   Quantum<casacore::Double>( dir[1], Unit("rad") ),
    645645                   dirtype ) ;
    646646    MeasFrame mf( me, mp, md ) ;
     
    651651    MFrequency::Convert tolsr( freqtype,
    652652                               MFrequency::Ref( MFrequency::LSRK, mf ) ) ;
    653     newf = tolsr( Quantum<casa::Double>( freq, Unit("Hz") ) ).get( "Hz" ).getValue() ;
     653    newf = tolsr( Quantum<casacore::Double>( freq, Unit("Hz") ) ).get( "Hz" ).getValue() ;
    654654    //logsink_->postLocally( LogMessage("freq = "+String::toString(freq)+", newf = "+String::toString(newf),LogOrigin(className_,funcName,WHERE)) ) ;
    655655  }
  • trunk/external-alma/asdm2ASAP/ASDMFiller.h

    r2754 r3106  
    1313public:
    1414  // constructor and destructor
    15   ASDMFiller( casa::CountedPtr<asap::Scantable> stable ) ;
     15  ASDMFiller( casacore::CountedPtr<asap::Scantable> stable ) ;
    1616  ~ASDMFiller() ;
    1717
    1818  // open data
    19   bool open( const std::string &filename, const casa::Record &rec ) ;
     19  bool open( const std::string &filename, const casacore::Record &rec ) ;
    2020
    2121  // fill data
     
    2626 
    2727  // get reader object
    28   casa::CountedPtr<ASDMReader> getReader() { return reader_ ; } ;
     28  casacore::CountedPtr<ASDMReader> getReader() { return reader_ ; } ;
    2929
    3030  // set logger
    31   void setLogger( casa::CountedPtr<casa::LogSinkInterface> &logsink ) ;
     31  void setLogger( casacore::CountedPtr<casacore::LogSinkInterface> &logsink ) ;
    3232
    3333private:
     
    3636
    3737  // get IF key
    38   casa::String getIFKey( casa::uInt ifno ) ;
     38  casacore::String getIFKey( casacore::uInt ifno ) ;
    3939
    4040  // get FREQUENCIES attributes from ifrec_
    41   void getFrequencyRec( casa::String key,
     41  void getFrequencyRec( casacore::String key,
    4242                        double &refpix,
    4343                        double &refval,
     
    4545
    4646  // set FREQUENCIES attributes to ifrec_
    47   void setFrequencyRec( casa::String key,
     47  void setFrequencyRec( casacore::String key,
    4848                        double refpix,
    4949                        double refval,
     
    5151                     
    5252  // reshape float array spectra to Matrix<Float>
    53   casa::Matrix<casa::Float> toMatrix( float *sp,
     53  casacore::Matrix<casacore::Float> toMatrix( float *sp,
    5454                                      unsigned int npol,
    5555                                      unsigned int nchan ) ;
    5656
    5757  // reshape 2d vector Tsys to Matrix<Float>
    58   casa::Matrix<casa::Float> toMatrix( std::vector< std::vector<float> > &tsys,
     58  casacore::Matrix<casacore::Float> toMatrix( std::vector< std::vector<float> > &tsys,
    5959                                      unsigned int npol,
    6060                                      unsigned int nchan ) ;
    6161
    6262  // reshape vector<float> to Vector<Float> with appropriate length
    63   casa::Vector<casa::Float> toVector( std::vector<float> &tau,
     63  casacore::Vector<casacore::Float> toVector( std::vector<float> &tau,
    6464                                      unsigned int npol ) ;
    6565
    6666  // create TCAL time string from MJD
    67   casa::String toTcalTime( casa::Double mjd ) ;
     67  casacore::String toTcalTime( casacore::Double mjd ) ;
    6868
    6969  // AZEL to J2000
    70   void toJ2000( casa::Vector<casa::Double> &dir,
     70  void toJ2000( casacore::Vector<casacore::Double> &dir,
    7171                double az,
    7272                double el,
    73                 casa::Double mjd,
    74                 casa::Vector<casa::Double> antpos ) ;
     73                casacore::Double mjd,
     74                casacore::Vector<casacore::Double> antpos ) ;
    7575
    7676  // to J2000
    77   casa::Vector<casa::Double> toJ2000( casa::Vector<casa::Double> dir,
    78                                       casa::String dirref,
    79                                       casa::Double mjd,
    80                                       casa::Vector<casa::Double> antpos ) ;
     77  casacore::Vector<casacore::Double> toJ2000( casacore::Vector<casacore::Double> dir,
     78                                      casacore::String dirref,
     79                                      casacore::Double mjd,
     80                                      casacore::Vector<casacore::Double> antpos ) ;
    8181
    8282  // get frequency frame enum value from string
    83   casa::MFrequency::Types toFrameType( std::string &s ) ;
     83  casacore::MFrequency::Types toFrameType( std::string &s ) ;
    8484
    8585  // to LSRK
    8686  // utc must be UTC time in "d" (day)
    8787  // antpos must be ITRF value in "m"
    88   casa::Double toLSRK( casa::Double freq,
    89                        casa::String freqref,
    90                        casa::Double utc,
    91                        casa::Vector<casa::Double> antpos,
    92                        casa::Vector<casa::Double> dir,
    93                        casa::String dirref ) ;
     88  casacore::Double toLSRK( casacore::Double freq,
     89                       casacore::String freqref,
     90                       casacore::Double utc,
     91                       casacore::Vector<casacore::Double> antpos,
     92                       casacore::Vector<casacore::Double> dir,
     93                       casacore::String dirref ) ;
    9494
    95   casa::CountedPtr<ASDMReader> reader_ ;
    96   casa::Int antennaId_ ;
    97   casa::String antennaName_ ;
     95  casacore::CountedPtr<ASDMReader> reader_ ;
     96  casacore::Int antennaId_ ;
     97  casacore::String antennaName_ ;
    9898
    99   casa::Record ifrec_ ;
     99  casacore::Record ifrec_ ;
    100100
    101   casa::CountedPtr<casa::LogSinkInterface> logsink_ ;
     101  casacore::CountedPtr<casacore::LogSinkInterface> logsink_ ;
    102102
    103   casa::String className_ ;
    104   casa::Bool freqToLsr_ ;
     103  casacore::String className_ ;
     104  casacore::Bool freqToLsr_ ;
    105105
    106106} ;
  • trunk/external-alma/asdm2ASAP/ASDMReader.cc

    r2755 r3106  
    5757}
    5858
    59 bool ASDMReader::open( const string &filename, const casa::Record &rec )
    60 {
    61   casa::String funcName = "open" ;
     59bool ASDMReader::open( const string &filename, const casacore::Record &rec )
     60{
     61  casacore::String funcName = "open" ;
    6262
    6363  // return value
     
    7272  // parsing ASDM options
    7373  if ( rec.isDefined( "asdm" ) ) {
    74     casa::Record asdmrec = rec.asRecord( "asdm" ) ;
     74    casacore::Record asdmrec = rec.asRecord( "asdm" ) ;
    7575
    7676    // antenna
    7777    if ( asdmrec.isDefined( "antenna" ) ) {
    78       if ( asdmrec.type( asdmrec.fieldNumber( "antenna" ) ) == casa::TpInt ) {
     78      if ( asdmrec.type( asdmrec.fieldNumber( "antenna" ) ) == casacore::TpInt ) {
    7979        antennaId_ = asdmrec.asInt( "antenna" ) ;
    8080      }
     
    183183    vector<AntennaRow *> rows = atab.get() ;
    184184    int idx = -1 ;
    185     for ( casa::uInt irow = 0 ; irow < rows.size() ; irow++ ) {
    186       if ( casa::String(rows[irow]->getName()) == antennaName_ ) {
     185    for ( casacore::uInt irow = 0 ; irow < rows.size() ; irow++ ) {
     186      if ( casacore::String(rows[irow]->getName()) == antennaName_ ) {
    187187        idx = rows[irow]->getAntennaId().getTagValue() ;
    188188        break ;
     
    191191    if ( idx == -1 ) {
    192192      close() ;
    193       throw (casa::AipsError( antennaName_ + " not found." )) ;
     193      throw (casacore::AipsError( antennaName_ + " not found." )) ;
    194194    }
    195195    else {
     
    204204    if ( antennaRow == 0 ) {
    205205      close() ;
    206       throw (casa::AipsError( "AntennaId " + casa::String::toString(antennaId_) + " is invalid." ) ) ;
     206      throw (casacore::AipsError( "AntennaId " + casacore::String::toString(antennaId_) + " is invalid." ) ) ;
    207207    }
    208208  }
     
    211211  // set antenna name
    212212  if ( antennaName_.size() == 0 ) {
    213     antennaName_ = casa::String( antennaRow->getName() ) ;
     213    antennaName_ = casacore::String( antennaRow->getName() ) ;
    214214  }
    215215
     
    218218
    219219  // station name
    220   stationName_ = casa::String( stationRow->getName() ) ;
     220  stationName_ = casacore::String( stationRow->getName() ) ;
    221221
    222222  // antenna position
    223223  antennaPosition_.resize( 3 ) ;
    224224  vector<Length> antpos = stationRow->getPosition() ;
    225   for ( casa::uInt i = 0 ; i < 3 ; i++ )
    226     antennaPosition_[i] = Quantity( casa::Double( antpos[i].get() ), Unit( "m" ) ) ;
    227   mp_ = casa::MPosition( casa::MVPosition( antennaPosition_ ),
    228                          casa::MPosition::ITRF ) ;
     225  for ( casacore::uInt i = 0 ; i < 3 ; i++ )
     226    antennaPosition_[i] = Quantity( casacore::Double( antpos[i].get() ), Unit( "m" ) ) ;
     227  mp_ = casacore::MPosition( casacore::MVPosition( antennaPosition_ ),
     228                         casacore::MPosition::ITRF ) ;
    229229  mf_.set( mp_ ) ;
    230230
     
    233233
    234234  // get Main rows
    235   //mainRow_ = casa::Vector<MainRow *>(asdm_->getMain().get()) ;
     235  //mainRow_ = casacore::Vector<MainRow *>(asdm_->getMain().get()) ;
    236236
    237237  // set up IFNO
     
    266266}
    267267
    268 void ASDMReader::fillHeader( casa::Int &nchan,
    269                              casa::Int &npol,
    270                              casa::Int &nif,
    271                              casa::Int &nbeam,
    272                              casa::String &observer,
    273                              casa::String &project,
    274                              casa::String &obstype,
    275                              casa::String &antennaname,
    276                              casa::Vector<casa::Double> &antennaposition,
    277                              casa::Float &equinox,
    278                              casa::String &freqref,
    279                              casa::Double &reffreq,
    280                              casa::Double &bandwidth,
    281                              casa::Double &utc,
    282                              casa::String &fluxunit,
    283                              casa::String &epoch,
    284                              casa::String &poltype )
    285 {
    286   casa::String funcName = "fillHeader" ;
     268void ASDMReader::fillHeader( casacore::Int &nchan,
     269                             casacore::Int &npol,
     270                             casacore::Int &nif,
     271                             casacore::Int &nbeam,
     272                             casacore::String &observer,
     273                             casacore::String &project,
     274                             casacore::String &obstype,
     275                             casacore::String &antennaname,
     276                             casacore::Vector<casacore::Double> &antennaposition,
     277                             casacore::Float &equinox,
     278                             casacore::String &freqref,
     279                             casacore::Double &reffreq,
     280                             casacore::Double &bandwidth,
     281                             casacore::Double &utc,
     282                             casacore::String &fluxunit,
     283                             casacore::String &epoch,
     284                             casacore::String &poltype )
     285{
     286  casacore::String funcName = "fillHeader" ;
    287287
    288288  ExecBlockTable &ebtab = asdm_->getExecBlock() ;
    289289  // at the moment take first row of ExecBlock table
    290290  ExecBlockRow *ebrow = ebtab.get()[0] ;
    291   casa::String telescopeName( ebrow->getTelescopeName() ) ;
    292   //casa::String stationName( stationRow_p->getName() ) ;
     291  casacore::String telescopeName( ebrow->getTelescopeName() ) ;
     292  //casacore::String stationName( stationRow_p->getName() ) ;
    293293
    294294  // antennaname
     
    299299  // antennaposition
    300300  antennaposition.resize( 3 ) ;
    301   for ( casa::uInt i = 0 ; i < 3 ; i++ )
     301  for ( casacore::uInt i = 0 ; i < 3 ; i++ )
    302302    antennaposition[i] = antennaPosition_[i].getValue( Unit("m") ) ;
    303303
     
    311311  // utc
    312312  // start time of the project
    313   utc = casa::Double( ebrow->getStartTime().getMJD() ) ;
     313  utc = casacore::Double( ebrow->getStartTime().getMJD() ) ;
    314314 
    315315
     
    330330      refidx = irow ;
    331331  }
    332   nchan = casa::Int( *max_element( nchans.begin(), nchans.end() ) ) ;
     332  nchan = casacore::Int( *max_element( nchans.begin(), nchans.end() ) ) ;
    333333
    334334  //logsink_->postLocally( LogMessage("refidx = "+String::toString(refidx),LogOrigin(className_,funcName,WHERE)) ) ;
     
    341341    }
    342342  }
    343   bandwidth = casa::Double( *max_element( bws.begin(), bws.end() ) ) ;
     343  bandwidth = casacore::Double( *max_element( bws.begin(), bws.end() ) ) ;
    344344
    345345  // reffreq
    346   reffreq = casa::Double( spwrows[refidx]->getRefFreq().get() ) ;
     346  reffreq = casacore::Double( spwrows[refidx]->getRefFreq().get() ) ;
    347347
    348348  // freqref
     
    386386
    387387  // npol
    388   npol = casa::Int( *max_element( npols.begin(), npols.end() ) ) ;
     388  npol = casacore::Int( *max_element( npols.begin(), npols.end() ) ) ;
    389389
    390390  // poltype
     
    425425
    426426  // nbeam
    427   nbeam = casa::Int( *max_element( nbeams.begin(), nbeams.end() ) ) ;
     427  nbeam = casacore::Int( *max_element( nbeams.begin(), nbeams.end() ) ) ;
    428428
    429429  // fluxunit
     
    445445  obstype = "" ;
    446446  for ( unsigned int imode = 0 ; imode < obsmode.size() ; imode++ ) {
    447     obstype += casa::String(obsmode[imode]) ;
     447    obstype += casacore::String(obsmode[imode]) ;
    448448    if ( imode != obsmode.size()-1 )
    449449      obstype += "#" ;
     
    453453void ASDMReader::selectConfigDescription()
    454454{
    455   casa::String funcName = "selectConfigDescription" ;
     455  casacore::String funcName = "selectConfigDescription" ;
    456456
    457457  vector<ConfigDescriptionRow *> cdrows = asdm_->getConfigDescription().get() ;
     
    466466  configDescIdList_.resize( cdidTags.size() ) ;
    467467  for ( unsigned int i = 0 ; i < cdidTags.size() ; i++ ) {
    468     configDescIdList_[i] = casa::uInt( cdidTags[i].getTagValue() ) ;
     468    configDescIdList_[i] = casacore::uInt( cdidTags[i].getTagValue() ) ;
    469469  }
    470470}
     
    476476  Tag atag( antennaId_, TagType::Antenna ) ;
    477477  for ( unsigned int irow = 0 ; irow < frows.size() ; irow++ ) {
    478     casa::uInt feedId = (casa::uInt)(frows[irow]->getFeedId() ) ;
    479     if ( casa::anyEQ( feedIdList_, feedId ) )
     478    casacore::uInt feedId = (casacore::uInt)(frows[irow]->getFeedId() ) ;
     479    if ( casacore::anyEQ( feedIdList_, feedId ) )
    480480      continue ;
    481481    if ( frows[irow]->getAntennaId() == atag ) {
     
    487487}
    488488
    489 casa::Vector<casa::uInt> ASDMReader::getFieldIdList()
    490 {
    491   casa::String funcName = "getFieldIdList" ;
     489casacore::Vector<casacore::uInt> ASDMReader::getFieldIdList()
     490{
     491  casacore::String funcName = "getFieldIdList" ;
    492492
    493493  vector<FieldRow *> frows = asdm_->getField().get() ;
     
    501501}
    502502
    503 casa::uInt ASDMReader::getNumMainRow()
    504 {
    505   casa::uInt nrow = casa::uInt( mainRow_.size() ) ;
     503casacore::uInt ASDMReader::getNumMainRow()
     504{
     505  casacore::uInt nrow = casacore::uInt( mainRow_.size() ) ;
    506506
    507507  return nrow ;
     
    534534}
    535535
    536 casa::Bool ASDMReader::setMainRow( casa::uInt irow )
    537 {
    538   casa::Bool status = true ;
     536casacore::Bool ASDMReader::setMainRow( casacore::uInt irow )
     537{
     538  casacore::Bool status = true ;
    539539  row_ = irow ;
    540540  execBlockTag_ = mainRow_[row_]->getExecBlockId() ;
     
    544544    status = false ;
    545545  else {
    546     status = (casa::Bool)(sdmBin_->acceptMainRow( mainRow_[row_] )) ;
     546    status = (casacore::Bool)(sdmBin_->acceptMainRow( mainRow_[row_] )) ;
    547547  }
    548548  return status ;
    549549}
    550550
    551 casa::Bool ASDMReader::setMainRow( casa::uInt configDescId, casa::uInt fieldId )
     551casacore::Bool ASDMReader::setMainRow( casacore::uInt configDescId, casacore::uInt fieldId )
    552552{
    553553  clearMainRow() ;
     
    558558  if (rows == 0)
    559559    return false;
    560   mainRow_ = casa::Vector<MainRow *>( *rows ) ;
     560  mainRow_ = casacore::Vector<MainRow *>( *rows ) ;
    561561 
    562562  return true ;
     
    570570void ASDMReader::setupIFNO()
    571571{
    572   casa::String funcName = "setupIFNO" ;
     572  casacore::String funcName = "setupIFNO" ;
    573573
    574574  vector<SpectralWindowRow *> spwrows = asdm_->getSpectralWindow().get() ;
    575575  unsigned int nrow = spwrows.size() ;
    576576  ifno_.clear() ;
    577   casa::uInt idx = 0 ;
    578   casa::uInt wvridx = 0 ;
     577  casacore::uInt idx = 0 ;
     578  casacore::uInt wvridx = 0 ;
    579579  for ( unsigned int irow = 0 ; irow < nrow ; irow++ ) {
    580     casa::uInt index ;
     580    casacore::uInt index ;
    581581    if ( isWVR( spwrows[irow] ) ) {
    582582      //logsink_->postLocally( LogMessage(spwrows[irow]->getSpectralWindowId().toString()+" is WVR",LogOrigin(className_,funcName,WHERE)) ) ;
     
    586586      index = ++idx ;
    587587    }
    588     ifno_.insert( pair<Tag,casa::uInt>(spwrows[irow]->getSpectralWindowId(),index) ) ;
     588    ifno_.insert( pair<Tag,casacore::uInt>(spwrows[irow]->getSpectralWindowId(),index) ) ;
    589589    //logsink_->postLocally( LogMessage(spwrows[irow]->getSpectralWindowId().toString()+": IFNO="+String::toString(index),LogOrigin(className_,funcName,WHERE)) ) ;
    590590  }
     
    601601}
    602602
    603 casa::Bool ASDMReader::setData()
    604 {
    605   casa::String funcName = "setData" ;
     603casacore::Bool ASDMReader::setData()
     604{
     605  casacore::String funcName = "setData" ;
    606606
    607607  //logsink_->postLocally( LogMessage("try to retrieve binary data",LogOrigin(className_,funcName,WHERE)) ) ;
     
    678678}
    679679
    680 casa::uInt ASDMReader::getIFNo( unsigned int idx )
     680casacore::uInt ASDMReader::getIFNo( unsigned int idx )
    681681{
    682682  prepareData( idx ) ;
     
    684684}
    685685
    686 casa::uInt ASDMReader::getIFNo()
    687 {
    688   map<Tag,casa::uInt>::iterator iter = ifno_.find( specWinTag_ ) ;
     686casacore::uInt ASDMReader::getIFNo()
     687{
     688  map<Tag,casacore::uInt>::iterator iter = ifno_.find( specWinTag_ ) ;
    689689  if ( iter != ifno_.end() )
    690690    return iter->second ;
     
    720720                               string &freqref )
    721721{
    722   casa::String funcName = "getFrequency" ;
     722  casacore::String funcName = "getFrequency" ;
    723723
    724724  int nchan = specWinRow_p->getNumChan() ;
     
    737737    }
    738738    else {
    739       throw (casa::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;
     739      throw (casacore::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;
    740740    }     
    741741  }
     
    752752    }
    753753    else {
    754       throw (casa::AipsError( "Either chanWidthArray or chanWidth must exist." )) ;
     754      throw (casacore::AipsError( "Either chanWidthArray or chanWidth must exist." )) ;
    755755    }     
    756756    if ( specWinRow_p->isChanFreqStepExists() ) {
     
    764764    }
    765765    else {
    766       throw (casa::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ;
     766      throw (casacore::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ;
    767767    }         
    768768    if ( specWinRow_p->isChanFreqStartExists() ) {
     
    773773    }
    774774    else {
    775       throw (casa::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;
     775      throw (casacore::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;
    776776    }     
    777777  }
     
    788788    }
    789789    else {
    790       throw (casa::AipsError( "Either chanWidthArray or chanWidth must exist." )) ;
     790      throw (casacore::AipsError( "Either chanWidthArray or chanWidth must exist." )) ;
    791791    }
    792792    if ( specWinRow_p->isChanFreqStepExists() ) {
     
    800800    }
    801801    else {
    802       throw (casa::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ;
     802      throw (casacore::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ;
    803803    }         
    804804    if ( specWinRow_p->isChanFreqStartExists() ) {
     
    810810    }
    811811    else {
    812       throw (casa::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;
     812      throw (casacore::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;
    813813    }     
    814814  }
     
    12641264    for ( unsigned int irow = 0 ; irow < nrow ; irow++ ) {
    12651265      CalAtmosphereRow *atmrow = atmrows[irow] ;
    1266       if ( casa::String(atmrow->getAntennaName()) != antennaName_
     1266      if ( casacore::String(atmrow->getAntennaName()) != antennaName_
    12671267           //|| atmrow->getReceiverBand() != rb
    12681268           //|| atmrow->getBasebandName() != bbname
     
    13101310                                 float &windaz )
    13111311{
    1312   casa::String funcName = "getWeatherInfo" ;
     1312  casacore::String funcName = "getWeatherInfo" ;
    13131313
    13141314  temperature = 0.0 ;
     
    17101710
    17111711vector<double> ASDMReader::toJ2000( vector<double> &dir,
    1712                                     casa::String &dirref,
     1712                                    casacore::String &dirref,
    17131713                                    double &mjd )
    17141714{
    1715   casa::String funcName = "toJ2000" ;
     1715  casacore::String funcName = "toJ2000" ;
    17161716
    17171717  vector<double> newd( dir ) ;
    17181718  if ( dirref != "J2000" ) {
    1719     me_ = casa::MEpoch( casa::Quantity( (casa::Double)mjd, "d" ), casa::MEpoch::UTC ) ;
     1719    me_ = casacore::MEpoch( casacore::Quantity( (casacore::Double)mjd, "d" ), casacore::MEpoch::UTC ) ;
    17201720    mf_.set( me_ ) ;
    1721     casa::MDirection::Types dirtype ;
    1722     casa::Bool b = casa::MDirection::getType( dirtype, dirref ) ;
     1721    casacore::MDirection::Types dirtype ;
     1722    casacore::Bool b = casacore::MDirection::getType( dirtype, dirref ) ;
    17231723    if ( b ) {
    1724       casa::Vector<casa::Double> cdir = toj2000_( dir ).getAngle( "rad" ).getValue() ;
     1724      casacore::Vector<casacore::Double> cdir = toj2000_( dir ).getAngle( "rad" ).getValue() ;
    17251725      //logsink_->postLocally( LogMessage("cdir = "+String::toString(cdir),LogOrigin(className_,funcName,WHERE)) ) ;
    17261726      newd[0] = (double)(cdir[0]) ;
     
    17381738string ASDMReader::getFrame()
    17391739{
    1740   casa::String funcName = "getFrame" ;
     1740  casacore::String funcName = "getFrame" ;
    17411741 
    17421742  // default is TOPO
     
    17671767int ASDMReader::getNumIFs()
    17681768{
    1769   casa::String funcName = "getNumIFs" ;
     1769  casacore::String funcName = "getNumIFs" ;
    17701770
    17711771  int nif = 0 ;
  • trunk/external-alma/asdm2ASAP/ASDMReader.h

    r2979 r3106  
    3838   * @return boolean status (true or false)
    3939   **/
    40   bool open( const std::string &filename, const casa::Record &rec ) ;
     40  bool open( const std::string &filename, const casacore::Record &rec ) ;
    4141
    4242  /**
     
    5353   * get antenna id
    5454   **/
    55   casa::Int getAntennaId() { return antennaId_ ; } ;
     55  casacore::Int getAntennaId() { return antennaId_ ; } ;
    5656
    5757  /**
    5858   * get antenna name
    5959   **/
    60   casa::String getAntennaName() { return antennaName_ ; } ;
     60  casacore::String getAntennaName() { return antennaName_ ; } ;
    6161
    6262  /**
     
    8181   * @param poltype polarization type
    8282   **/
    83   void fillHeader( casa::Int &nchan,
    84                    casa::Int &npol,
    85                    casa::Int &nif,
    86                    casa::Int &nbeam,
    87                    casa::String &observer,
    88                    casa::String &project,
    89                    casa::String &obstype,
    90                    casa::String &antennaname,
    91                    casa::Vector<casa::Double> &antennaposition,
    92                    casa::Float &equinox,
    93                    casa::String &freqref,
    94                    casa::Double &reffreq,
    95                    casa::Double &bandwidth,
    96                    casa::Double &utc,
    97                    casa::String &fluxunit,
    98                    casa::String &epoch,
    99                    casa::String &poltype ) ; 
     83  void fillHeader( casacore::Int &nchan,
     84                   casacore::Int &npol,
     85                   casacore::Int &nif,
     86                   casacore::Int &nbeam,
     87                   casacore::String &observer,
     88                   casacore::String &project,
     89                   casacore::String &obstype,
     90                   casacore::String &antennaname,
     91                   casacore::Vector<casacore::Double> &antennaposition,
     92                   casacore::Float &equinox,
     93                   casacore::String &freqref,
     94                   casacore::Double &reffreq,
     95                   casacore::Double &bandwidth,
     96                   casacore::Double &utc,
     97                   casacore::String &fluxunit,
     98                   casacore::String &epoch,
     99                   casacore::String &poltype ) ; 
    100100
    101101  /**
     
    107107   * @return list of valid configDescriptionId
    108108   **/
    109   casa::Vector<casa::uInt> getConfigDescriptionIdList() { return configDescIdList_ ; } ;
     109  casacore::Vector<casacore::uInt> getConfigDescriptionIdList() { return configDescIdList_ ; } ;
    110110
    111111  /**
    112112   * get list of fieldId
    113113   *
    114    * @return list of fieldId as casa::uInt
    115    **/
    116   casa::Vector<casa::uInt> getFieldIdList() ;
     114   * @return list of fieldId as casacore::uInt
     115   **/
     116  casacore::Vector<casacore::uInt> getFieldIdList() ;
    117117
    118118  /**
     
    121121   * @return number of rows in Main table
    122122   **/
    123   casa::uInt getNumMainRow() ;
     123  casacore::uInt getNumMainRow() ;
    124124
    125125  /**
     
    135135   * @param fieldId
    136136   **/
    137   casa::Bool setMainRow( casa::uInt configDescId, casa::uInt fieldId ) ;
     137  casacore::Bool setMainRow( casacore::uInt configDescId, casacore::uInt fieldId ) ;
    138138
    139139  /**
     
    143143   * @return boolean indicating the row is valid or not
    144144   **/
    145   casa::Bool setMainRow( casa::uInt irow ) ;
     145  casacore::Bool setMainRow( casacore::uInt irow ) ;
    146146
    147147  /**
     
    181181   * @return IF number
    182182   **/
    183   casa::uInt getIFNo( unsigned int idx ) ;
    184   casa::uInt getIFNo() ;
     183  casacore::uInt getIFNo( unsigned int idx ) ;
     184  casacore::uInt getIFNo() ;
    185185
    186186  /**
     
    387387   * @return boolean status
    388388   **/
    389   casa::Bool setData() ;
     389  casacore::Bool setData() ;
    390390
    391391  /**
     
    408408   * @param logger (LogSinkInterface)
    409409   **/
    410   void setLogger( casa::CountedPtr<casa::LogSinkInterface> &logsink ) ;
     410  void setLogger( casacore::CountedPtr<casacore::LogSinkInterface> &logsink ) ;
    411411
    412412
     
    507507  **/
    508508  std::vector<double> toJ2000( std::vector<double> &dir,
    509                                casa::String &dirref,
     509                               casacore::String &dirref,
    510510                               double &mjd ) ;
    511511
     
    579579  const sdmbin::VMSData *vmsData_ ;
    580580 
    581   casa::Int antennaId_ ; // antenna id
    582   casa::String antennaName_ ; // antenna name
    583   casa::String stationName_ ; // station name
    584   casa::Vector<casa::Quantity> antennaPosition_ ; // antenna position
    585   casa::Vector<casa::uInt> configDescIdList_ ; // list of valid configDescriptionId
    586   casa::Vector<casa::uInt> feedIdList_ ; // list of valid feedId
    587   casa::Vector<casa::uInt> fieldIdList_ ; // list of fieldId
    588   casa::Int row_ ; // current row index
    589   map<asdm::Tag,casa::uInt> ifno_ ; // list of IFNO for each SpectralWindow rows
     581  casacore::Int antennaId_ ; // antenna id
     582  casacore::String antennaName_ ; // antenna name
     583  casacore::String stationName_ ; // station name
     584  casacore::Vector<casacore::Quantity> antennaPosition_ ; // antenna position
     585  casacore::Vector<casacore::uInt> configDescIdList_ ; // list of valid configDescriptionId
     586  casacore::Vector<casacore::uInt> feedIdList_ ; // list of valid feedId
     587  casacore::Vector<casacore::uInt> fieldIdList_ ; // list of fieldId
     588  casacore::Int row_ ; // current row index
     589  map<asdm::Tag,casacore::uInt> ifno_ ; // list of IFNO for each SpectralWindow rows
    590590  unsigned int numData_ ; // number of valid data in vmsData_ where v_antennaId equals antennaId_
    591591  vector<unsigned int> dataIdList_ ; // list of valid data indexes in vmsData_ 
     
    597597  EnumSet<TimeSamplingMod::TimeSampling> timeSampling_ ; // time sampling
    598598  EnumSet<SpectralResolutionTypeMod::SpectralResolutionType> resolutionType_ ; // spectral resolution type
    599   casa::CountedPtr<casa::LogSinkInterface> logsink_ ; // Logger
    600   casa::String className_ ;
     599  casacore::CountedPtr<casacore::LogSinkInterface> logsink_ ; // Logger
     600  casacore::String className_ ;
    601601  unsigned int dataIndex_ ;
    602602
    603603  // Tables/Rows for ASDM
    604   casa::Vector<asdm::MainRow *> mainRow_ ; // list of pointers to all Main rows
     604  casacore::Vector<asdm::MainRow *> mainRow_ ; // list of pointers to all Main rows
    605605  //asdm::AntennaRow *antennaRow_p ; // pointer to target Antenna row
    606606  //asdm::StationRow *stationRow_p ; // pointer to target Station row that target antenna is located
     
    617617  asdm::ArrayTimeInterval timeInterval_ ;
    618618
    619   casa::MDirection::Convert toj2000_ ;
    620   casa::MeasFrame mf_ ;
    621   casa::MPosition mp_ ;
    622   casa::MEpoch me_ ;
     619  casacore::MDirection::Convert toj2000_ ;
     620  casacore::MeasFrame mf_ ;
     621  casacore::MPosition mp_ ;
     622  casacore::MEpoch me_ ;
    623623} ;
    624624#endif // ASAP_ASDM_READER_H
  • trunk/external-alma/atnf/PKSIO/GBTFITSreader.h

    r1868 r3106  
    5050
    5151using namespace std;
    52 using namespace casa;
     52using namespace casacore;
    5353
    5454// <summary>
  • trunk/external-alma/atnf/PKSIO/NRODataRecord.h

    r2765 r3106  
    192192  //
    193193  // 2009/02/26 Takeshi Nakazato  Moved to NROReader
    194   casa::CountedPtr<char> LDATA ;
     194  casacore::CountedPtr<char> LDATA ;
    195195  // Spectral data for FITS data
    196196  //vector<int> JDATA ;
  • trunk/external-alma/atnf/PKSIO/NROReader.cc

    r3105 r3106  
    7373}
    7474
    75 // T must be std::string or casa::String
     75// T must be std::string or casacore::String
    7676template<class T>
    7777inline String trim_nro_string(T const &s) {
  • trunk/external-alma/atnf/PKSIO/SDFITSreader.h

    r1757 r3106  
    4848
    4949using namespace std;
    50 using namespace casa;
     50using namespace casacore;
    5151
    5252// <summary>
  • trunk/external-alma/atnf/PKSIO/SDFITSwriter.h

    r1757 r3106  
    4343
    4444using namespace std;
    45 using namespace casa;
     45using namespace casacore;
    4646
    4747// <summary>
  • trunk/external-alma/components/SpectralComponents/CompiledSpectralElement.h

    r2980 r3106  
    6969        // Construct a compiled string
    7070        explicit CompiledSpectralElement(
    71                 const String& function, const Vector<Double>& param
     71                const casacore::String& function, const casacore::Vector<casacore::Double>& param
    7272        );
    7373
     
    9797
    9898        // Save to a record.
    99         virtual Bool toRecord(RecordInterface& out) const;
     99        virtual casacore::Bool toRecord(RecordInterface& out) const;
    100100
    101101protected:
     
    105105        // For subclasses. Parameters and function must be set after construction.
    106106        explicit CompiledSpectralElement(
    107                 SpectralElement::Types type, const Vector<Double>& param=Vector<Double>(0)
     107                SpectralElement::Types type, const casacore::Vector<casacore::Double>& param=casacore::Vector<casacore::Double>(0)
    108108        );
    109109
    110110        CompiledSpectralElement(
    111                 SpectralElement::Types type, uInt nParam
     111                SpectralElement::Types type, casacore::uInt nParam
    112112        );
    113113
    114         virtual void _setFunction(const String& function);
     114        virtual void _setFunction(const casacore::String& function);
    115115
    116116        /*
  • trunk/external-alma/components/SpectralComponents/GaussianSpectralElement.h

    r2980 r3106  
    7676        //# Constants
    7777        // Sigma to FWHM conversion factor
    78         static const Double SigmaToFWHM;
     78        static const casacore::Double SigmaToFWHM;
    7979
    8080        //# Constructors
     
    8686        // </thrown>
    8787        GaussianSpectralElement(
    88                 const Double ampl, const Double center,
    89                 const Double sigma
     88                const casacore::Double ampl, const casacore::Double center,
     89                const casacore::Double sigma
    9090        );
    9191
     
    9595        //   <li> AipsError if sigma == 0.0
    9696        // </thrown>
    97         GaussianSpectralElement(const Vector<Double> &param);
     97        GaussianSpectralElement(const casacore::Vector<casacore::Double> &param);
    9898        // Copy constructor (deep copy)
    9999        // <thrown>
     
    114114//      GaussianSpectralElement& operator=(const GaussianSpectralElement &other);
    115115        // Evaluate the value of the element at x
    116         //Double operator()(const Double x) const;
     116        //casacore::Double operator()(const casacore::Double x) const;
    117117
    118         Double getSigma() const;
    119         Double getFWHM() const;
     118        casacore::Double getSigma() const;
     119        casacore::Double getFWHM() const;
    120120
    121         Double getSigmaErr() const;
    122         Double getFWHMErr() const;
     121        casacore::Double getSigmaErr() const;
     122        casacore::Double getFWHMErr() const;
    123123
    124124
    125         void setSigma(Double sigma);
    126         void setFWHM(Double fwhm);
     125        void setSigma(casacore::Double sigma);
     126        void setFWHM(casacore::Double fwhm);
    127127
    128         void fixSigma(const Bool fix=True);
     128        void fixSigma(const casacore::Bool fix=True);
    129129
    130         Bool fixedSigma() const;
     130        casacore::Bool fixedSigma() const;
    131131
    132         Double getIntegral() const;
     132        casacore::Double getIntegral() const;
    133133
    134134        // Save to a record.   For Gaussian elements,
    135135        // the width is defined as a FWHM in the record interface.
    136         Bool toRecord(RecordInterface &out) const;
     136        casacore::Bool toRecord(RecordInterface &out) const;
    137137
    138138        // Sigma to FWHM
    139139        // Convert from sigma to FWHM and vice versa
    140140        // <group>
    141         static Double sigmaFromFWHM (const Double fwhm);
     141        static casacore::Double sigmaFromFWHM (const casacore::Double fwhm);
    142142
    143         static Double sigmaToFWHM (const Double sigma);
     143        static casacore::Double sigmaToFWHM (const casacore::Double sigma);
    144144        // </group>
    145145
    146         void set(const Vector<Double>& v);
     146        void set(const casacore::Vector<casacore::Double>& v);
    147147
    148148private:
     
    150150        // but the second param of the corresponding Gaussian1D function is the
    151151        // FWHM :(
    152         void _set(const Vector<Double>& v);
     152        void _set(const casacore::Vector<casacore::Double>& v);
    153153
    154154};
  • trunk/external-alma/components/SpectralComponents/Spectral2Estimate.tcc

    r2980 r3106  
    1818//#
    1919//# Correspondence concerning AIPS++ should be addressed as follows:
    20 //#        Internet email: aips2-request@nrao.edu.
     20//#        casacore::Internet email: aips2-request@nrao.edu.
    2121//#        Postal address: AIPS++ Project Office
    2222//#                        National Radio Astronomy Observatory
     
    4040//# Member templates
    4141template <class MT>
    42 const SpectralList &SpectralEstimate::estimate(const Vector<MT> &prof,
    43                                                Vector<MT> *der) {
     42const SpectralList &SpectralEstimate::estimate(const casacore::Vector<MT> &prof,
     43                                               casacore::Vector<MT> *der) {
    4444          if (prof.nelements() != lprof_p) {
    4545    delete [] deriv_p; deriv_p = 0; lprof_p = 0;
    4646    lprof_p = prof.nelements();
    47     deriv_p = new Double[lprof_p];
     47    deriv_p = new casacore::Double[lprof_p];
    4848  };
    4949  // Check if signal in window
    5050  if (!window(prof)) return slist_p;
    5151  // Limit window
    52   windowEnd_p = min(windowEnd_p+q_p , Int(lprof_p));
     52  windowEnd_p = min(windowEnd_p+q_p , casacore::Int(lprof_p));
    5353  windowLow_p = max(windowLow_p-q_p , 0 );
    5454  // Get the second derivatives
     
    5656  // Next for debugging
    5757  if (der) {
    58     for (uInt i=0; i<lprof_p; i++) (*der)[i] = deriv_p[i];
     58    for (casacore::uInt i=0; i<lprof_p; i++) (*der)[i] = deriv_p[i];
    5959  };
    6060  // Find the estimates (sorted)
     
    6565
    6666template <class MT>
    67 const SpectralList& SpectralEstimate::estimate(const Vector<MT>& x,
    68                                                const Vector<MT>& y)
     67const SpectralList& SpectralEstimate::estimate(const casacore::Vector<MT>& x,
     68                                               const casacore::Vector<MT>& y)
    6969{
    7070  if (x.nelements() != y.nelements()) {
     
    7777  estimate(y);
    7878  // Convert
    79   for (uInt i=0; i<slist_p.nelements(); i++) {
     79  for (casacore::uInt i=0; i<slist_p.nelements(); i++) {
    8080          if (slist_p[i]->getType() != SpectralElement::GAUSSIAN) {
    8181                  throw AipsError("Non-gaussian spectral types cannot be estimated");
     
    9090
    9191template <class MT>
    92 uInt SpectralEstimate::window(const Vector<MT> &prof) {
     92casacore::uInt SpectralEstimate::window(const casacore::Vector<MT> &prof) {
    9393  windowLow_p =0;
    9494  windowEnd_p = 0;
    9595  if (!useWindow_p || rms_p <= 0.0 || lprof_p == 0) {
    9696    if (regionEnd_p) {
    97       windowLow_p = min(max(0,regionLow_p),Int(lprof_p));
    98       windowEnd_p = min(regionEnd_p, Int(lprof_p));
     97      windowLow_p = min(max(0,regionLow_p),casacore::Int(lprof_p));
     98      windowEnd_p = min(regionEnd_p, casacore::Int(lprof_p));
    9999    } else windowEnd_p = lprof_p;
    100100    return windowEnd_p-windowLow_p;
    101101  };
    102102  // Total flux in profile and max position
    103   Double flux(0.0);
    104   Double pmax(prof(0));
    105   uInt imax(0);
    106   for (Int i=windowLow_p; i<windowEnd_p; i++) {
     103  casacore::Double flux(0.0);
     104  casacore::Double pmax(prof(0));
     105  casacore::uInt imax(0);
     106  for (casacore::Int i=windowLow_p; i<windowEnd_p; i++) {
    107107    if (prof(i)>pmax) {
    108108      pmax = prof(i);
     
    114114  if (pmax < cutoff_p) return 0;
    115115  // Window boundaries; new/old base and centre; width
    116   Int width(-1);
    117   Int nw(0);
    118   Double bnew(flux), bold;
    119   Double cnew(imax), cold;
     116  casacore::Int width(-1);
     117  casacore::Int nw(0);
     118  casacore::Double bnew(flux), bold;
     119  casacore::Double cnew(imax), cold;
    120120  do {
    121121    width++;
    122122    cold = cnew;
    123123    bold = bnew;
    124     windowLow_p = max(0, Int(cold-width+0.5));
    125     windowEnd_p = min(Int(lprof_p), Int(cold+width+1.5));
     124    windowLow_p = max(0, casacore::Int(cold-width+0.5));
     125    windowEnd_p = min(casacore::Int(lprof_p), casacore::Int(cold+width+1.5));
    126126    // flux and first moment in window
    127     Double s(0);
    128     Double c(0);
    129     for (Int i=windowLow_p; i<windowEnd_p; i++) {
     127    casacore::Double s(0);
     128    casacore::Double c(0);
     129    for (casacore::Int i=windowLow_p; i<windowEnd_p; i++) {
    130130      s += prof(i);
    131131      c += i*prof(i);
     
    142142
    143143template <class MT>
    144 void SpectralEstimate::findc2(const Vector<MT> &prof) {
    145   for (Int i=windowLow_p; i<windowEnd_p; i++) {
     144void SpectralEstimate::findc2(const casacore::Vector<MT> &prof) {
     145  for (casacore::Int i=windowLow_p; i<windowEnd_p; i++) {
    146146    // Moments
    147     Double m0(0.0);
    148     Double m2(0.0);
    149     for (Int j = -q_p; j <= q_p; j++) {
    150       Int k = i+j;
    151       if (k >= 0 && k<Int(lprof_p)) {
     147    casacore::Double m0(0.0);
     148    casacore::Double m2(0.0);
     149    for (casacore::Int j = -q_p; j <= q_p; j++) {
     150      casacore::Int k = i+j;
     151      if (k >= 0 && k<casacore::Int(lprof_p)) {
    152152        // add to moments
    153153        m0 += prof(k);
     
    161161
    162162template <class MT>
    163 void SpectralEstimate::findga(const Vector<MT> &prof) {
    164         Int i(windowLow_p-1);
     163void SpectralEstimate::findga(const casacore::Vector<MT> &prof) {
     164        casacore::Int i(windowLow_p-1);
    165165        // Window on Gaussian
    166         Int iclo(windowLow_p);
    167         Int ichi(windowLow_p);
     166        casacore::Int iclo(windowLow_p);
     167        casacore::Int ichi(windowLow_p);
    168168        // Peak counter
    169         Int nmax = 0;
     169        casacore::Int nmax = 0;
    170170        GaussianSpectralElement tspel;
    171171        while (++i < windowEnd_p) {
     
    187187                case 2: {
    188188                        // Some moments
    189                         Double m0m(0);
    190                         Double m0(0);
    191                         Double m1(0);
    192                         Double m2(0);
     189                        casacore::Double m0m(0);
     190                        casacore::Double m0(0);
     191                        casacore::Double m1(0);
     192                        casacore::Double m2(0);
    193193                        ichi = i;
    194194                        // Do Schwarz' calculation
    195                         Double b = deriv_p[iclo];
    196                         Double a = (deriv_p[ichi] - b) / (ichi-iclo);
    197                         for (Int ic=iclo; ic<=ichi; ic++) {
     195                        casacore::Double b = deriv_p[iclo];
     196                        casacore::Double a = (deriv_p[ichi] - b) / (ichi-iclo);
     197                        for (casacore::Int ic=iclo; ic<=ichi; ic++) {
    198198                                m0m += min(deriv_p[ic], 0.0);
    199                                 Double wi = deriv_p[ic] - a*(ic-iclo) - b;
     199                                casacore::Double wi = deriv_p[ic] - a*(ic-iclo) - b;
    200200                                m0 += wi;
    201201                                m1 += wi*ic;
     
    203203                        };
    204204                        // determinant
    205                         Double det = m2*m0 - m1*m1;
     205                        casacore::Double det = m2*m0 - m1*m1;
    206206                        if (det > 0.0 && fabs(m0m) >  FLT_EPSILON) {
    207                                 Double   xm = m1/m0;
    208                                 Double sg = 1.69*sqrt(det) / fabs(m0);
     207                                casacore::Double   xm = m1/m0;
     208                                casacore::Double sg = 1.69*sqrt(det) / fabs(m0);
    209209                                // Width above critical?
    210210                                if (sg > sigmin_p) {
    211                                         Int is = Int(1.73*sg+0.5);
    212                                         Int im = Int(xm+0.5);
    213                                         Double yl(0);
     211                                        casacore::Int is = casacore::Int(1.73*sg+0.5);
     212                                        casacore::Int im = casacore::Int(xm+0.5);
     213                                        casacore::Double yl(0);
    214214                                        if ((im-is) >= 0) yl = prof(im-is);
    215                                         Double yh(0);
    216                                         if ((im + is) <= Int(lprof_p-1)) yh = prof(im+is);
    217                                         Double ym = prof(im);
     215                                        casacore::Double yh(0);
     216                                        if ((im + is) <= casacore::Int(lprof_p-1)) yh = prof(im+is);
     217                                        casacore::Double ym = prof(im);
    218218                    // modified by dmehringer 2012apr03 to deal with 0 denominator
    219219                    // 0.0/0.0 produces NaN on Linux but 0 on OSX
    220                     Double pg = (ym-0.5*(yh+yl));
     220                    casacore::Double pg = (ym-0.5*(yh+yl));
    221221                                        if (pg != 0) {
    222                                                 Double denom = (1.0-exp(-0.5*(is*is)/sg/sg));
     222                                                casacore::Double denom = (1.0-exp(-0.5*(is*is)/sg/sg));
    223223                                                if (denom == 0) {
    224224                                                        throw AipsError("Bailing because division by zero is undefined");
     
    252252
    253253template <class MT>
    254 GaussianSpectralElement SpectralEstimate::convertElement (const Vector<MT>& x,
     254GaussianSpectralElement SpectralEstimate::convertElement (const casacore::Vector<MT>& x,
    255255                                                  const GaussianSpectralElement& el) const
    256256{
    257257        GaussianSpectralElement elOut = el;
    258    const Int& idxMax = x.nelements()-1;
     258   const casacore::Int& idxMax = x.nelements()-1;
    259259
    260260// Get current (pars are amp, center, width as the SpectralElement
    261261// will always be a Gaussian)
    262262
    263    Vector<Double> par, err;
     263   casacore::Vector<casacore::Double> par, err;
    264264   el.get(par);
    265265   el.getError(err);
     
    267267// Center
    268268
    269    Int cenIdx = Int(par[1]);
     269   casacore::Int cenIdx = casacore::Int(par[1]);
    270270
    271271// Get the x-increment, local to the center, as best we can from
     
    273273// vector is monotonic
    274274
    275    Double incX;
     275   casacore::Double incX;
    276276   if (cenIdx-1<0) {
    277277      incX = x[1] - x[0];
     
    287287      par[1] = incX*(par[1]-idxMax) + x[idxMax];   // Extrapolate from x[idxMax]
    288288   } else {
    289       Double dIdx = par[1] - cenIdx;
    290       par[1] = x[cenIdx] + dIdx*incX;              // Interpolate
     289      casacore::Double dIdx = par[1] - cenIdx;
     290      par[1] = x[cenIdx] + dIdx*incX;              // casacore::Interpolate
    291291   }
    292292   err[1] = abs(err[1] * incX);
  • trunk/external-alma/components/SpectralComponents/SpectralElement.cc

    r3029 r3106  
    4242#include <casa/iostream.h>
    4343
     44using namespace casacore;
    4445namespace casa { //# NAMESPACE CASA - BEGIN
    4546
  • trunk/external-alma/components/SpectralComponents/SpectralElement.h

    r3029 r3106  
    3434#include <casa/Arrays/Vector.h>
    3535#include <casa/Containers/RecordInterface.h>
     36
     37using namespace casacore;
    3638
    3739namespace casa { //# NAMESPACE CASA - BEGIN
     
    105107
    106108        // Evaluate the value of the element at x
    107         virtual Double operator()(const Double x) const;
    108 
    109         Bool operator==(const SpectralElement& other) const;
     109        virtual casacore::Double operator()(const casacore::Double x) const;
     110
     111        casacore::Bool operator==(const SpectralElement& other) const;
    110112
    111113        // Get parameter n
     
    113115        //  <li> AipsError if illegal n
    114116        // </thrown>
    115         virtual Double operator[](const uInt n) const;
    116 
    117         // Get all the types available as String and codes, and number available
    118         static const String* allTypes(Int &nall,
     117        virtual casacore::Double operator[](const uInt n) const;
     118
     119        // Get all the types available as casacore::String and codes, and number available
     120        static const casacore::String* allTypes(Int &nall,
    119121                        const SpectralElement::Types *&typ);
    120122        // Get a string from the type
    121         static const String &fromType(SpectralElement::Types tp);
    122         // Get a type from a (non-case sensitive; minimum match) String
    123         static Bool toType(SpectralElement::Types &tp,
    124                         const String &typName);
     123        static const casacore::String &fromType(SpectralElement::Types tp);
     124        // Get a type from a (non-case sensitive; minimum match) casacore::String
     125        static casacore::Bool toType(SpectralElement::Types &tp,
     126                        const casacore::String &typName);
    125127
    126128        // Get type of this element
     
    128130
    129131        // Get all parameters
    130         void get(Vector<Double>& params) const;
    131 
    132         Vector<Double> get() const;
     132        void get(casacore::Vector<casacore::Double>& params) const;
     133
     134        casacore::Vector<casacore::Double> get() const;
    133135
    134136        // Get error estimates of parameters
    135         void getError(Vector<Double> &err) const;
    136         Vector<Double> getError() const;
     137        void getError(casacore::Vector<casacore::Double> &err) const;
     138        casacore::Vector<casacore::Double> getError() const;
    137139
    138140        // Get the order (i.e. the number of parameters)
     
    140142
    141143        // Set the error fields
    142         virtual void setError(const Vector<Double> &err);
     144        virtual void setError(const casacore::Vector<casacore::Double> &err);
    143145
    144146        // Set fixed parameters (True) or unset them (False)
     
    148150
    149151        // Fix/unfix all in one go
    150         virtual void fix(const Vector<Bool>& fix);
     152        virtual void fix(const casacore::Vector<casacore::Bool>& fix);
    151153
    152154        // Get the fix state[s]
    153         const Vector<Bool> &fixed() const;
     155        const casacore::Vector<casacore::Bool> &fixed() const;
    154156
    155157        // Save to a record.
    156         virtual Bool toRecord(RecordInterface& out) const;
     158        virtual casacore::Bool toRecord(RecordInterface& out) const;
    157159
    158160        // set parameters
    159         virtual void set(const Vector<Double>& params);
     161        virtual void set(const casacore::Vector<casacore::Double>& params);
    160162
    161163protected:
     
    163165        SpectralElement() {}
    164166
    165         SpectralElement(Types type, const Vector<Double>& parms=Vector<Double>(0));
     167        SpectralElement(Types type, const casacore::Vector<casacore::Double>& parms=casacore::Vector<casacore::Double>(0));
    166168
    167169        SpectralElement(const SpectralElement& other);
     
    169171        SpectralElement &operator=(const SpectralElement& other);
    170172
    171         void _set(const Vector<Double>& params);
     173        void _set(const casacore::Vector<casacore::Double>& params);
    172174
    173175        void _setType(const Types type);
    174176
    175         void _setFunction(const SHARED_PTR<Function<Double, Double> >& f);
    176 
    177         virtual SHARED_PTR<Function<Double, Double> > _getFunction() const {
     177        void _setFunction(const SHARED_PTR<Function<casacore::Double, casacore::Double> >& f);
     178
     179        virtual SHARED_PTR<Function<casacore::Double, casacore::Double> > _getFunction() const {
    178180                return _function;
    179181        }
     
    186188        // The parameters of the function. I.e. the polynomial coefficients;
    187189        // amplitude, center and sigma of a Gaussian.
    188         Vector<Double> _params;
     190        casacore::Vector<casacore::Double> _params;
    189191        // The errors of the parameters
    190         Vector<Double> _errors;
     192        casacore::Vector<casacore::Double> _errors;
    191193        // The indication if the parameter has to be fixed (True) or solved (False).
    192194        // Solved is the default.
    193         Vector<Bool> _fixed;
    194 
    195         SHARED_PTR<Function<Double, Double> > _function;
     195        casacore::Vector<casacore::Bool> _fixed;
     196
     197        SHARED_PTR<Function<casacore::Double, casacore::Double> > _function;
    196198
    197199};
     
    199201ostream &operator<<(ostream& os, const SpectralElement& elem);
    200202
    201 Bool near(const SpectralElement& s1, const SpectralElement& s2, const Double tol);
    202 
    203 Bool nearAbs(const SpectralElement& s1, const SpectralElement& s2, const Double tol);
     203casacore::Bool near(const SpectralElement& s1, const SpectralElement& s2, const casacore::Double tol);
     204
     205casacore::Bool nearAbs(const SpectralElement& s1, const SpectralElement& s2, const casacore::Double tol);
    204206
    205207
  • trunk/external-alma/components/SpectralComponents/SpectralEstimate.h

    r2980 r3106  
    1818//#
    1919//# Correspondence concerning AIPS++ should be addressed as follows:
    20 //#        Internet email: aips2-request@nrao.edu.
     20//#        casacore::Internet email: aips2-request@nrao.edu.
    2121//#        Postal address: AIPS++ Project Office
    2222//#                        National Radio Astronomy Observatory
     
    3434#include <components/SpectralComponents/SpectralList.h>
    3535
     36namespace casacore {
     37    template <class T> class Vector;
     38}
     39
    3640namespace casa { //# NAMESPACE CASA - BEGIN
    3741
    3842//# Forward Declarations
    3943class GaussianSpectralElement;
    40 template <class T> class Vector;
    4144
    4245// <summary>
     
    97100  //# Constants
    98101  // Default maximum number of components to be found
    99   static const uInt MAXPAR = 200;
     102  static const casacore::uInt MAXPAR = 200;
    100103  //# Enumerations
    101104  //# Friends
     
    106109  // of components that will be found. A value of zero will indicate
    107110  // an unlimited number.
    108   explicit SpectralEstimate(const uInt maxpar=MAXPAR);
     111  explicit SpectralEstimate(const casacore::uInt maxpar=MAXPAR);
    109112  // Create an estimator with the given maximum number of possible
    110113  // elements. A value of zero will indicate an unlimited number.
     
    112115  // found, and a minimum width. Cutoff and minsigma default to 0.0, maximum
    113116  // size of list produced to 200.
    114   explicit SpectralEstimate(const Double rms,
    115                             const Double cutoff=0.0, const Double minsigma=0.0,
    116                             const uInt maxpar=MAXPAR);
     117  explicit SpectralEstimate(const casacore::Double rms,
     118                            const casacore::Double cutoff=0.0, const casacore::Double minsigma=0.0,
     119                            const casacore::uInt maxpar=MAXPAR);
    117120  // Copy constructor (deep copy)
    118121  SpectralEstimate(const SpectralEstimate &other);
     
    138141  // <group>
    139142  template <class MT>
    140     const SpectralList& estimate(const Vector<MT>& ordinate,
    141                                  Vector<MT> *der = 0);
    142   template <class MT>
    143     const SpectralList& estimate(const Vector<MT>& abcissa,
    144                                  const Vector<MT>& ordinate);
     143    const SpectralList& estimate(const casacore::Vector<MT>& ordinate,
     144                                 casacore::Vector<MT> *der = 0);
     145  template <class MT>
     146    const SpectralList& estimate(const casacore::Vector<MT>& abcissa,
     147                                 const casacore::Vector<MT>& ordinate);
    145148  // </group>
    146149
     
    151154  // <group>
    152155  // Set the profile's estimated rms (forced to abs(rms))
    153   void setRMS(const Double rms=0.0);
     156  void setRMS(const casacore::Double rms=0.0);
    154157  // Set the amplitude cutoff for valid estimate (forced to max(0,cutoff))
    155   void setCutoff(const Double cutoff=0.0);
     158  void setCutoff(const casacore::Double cutoff=0.0);
    156159  // Set the minimum width allowed (forced to max(0,minsigma))
    157   void setMinSigma(const Double minsigma=0.0);
     160  void setMinSigma(const casacore::Double minsigma=0.0);
    158161  // Set the number of points consider at each side of test point (i.e. a
    159162  // width of 2q+1 is taken). Default internally is 2; max(1,q) taken.
    160   void setQ(const uInt q=2);
     163  void setQ(const casacore::uInt q=2);
    161164  // Set a region [lo,hi] over which to estimate. Lo and hi are given as
    162165  // zero-based vector indices.
    163   void setRegion(const Int lo, const Int hi);
     166  void setRegion(const casacore::Int lo, const casacore::Int hi);
    164167  // Do you want to look in an automatically determined window with signal?
    165168  // Default is False, meaning the full (possibly regioned) profile.
    166169  void setWindowing(const Bool win=False);
    167170  // Set the maximum number of estimates to find (forced to >=1; 200 default)
    168   void setMaxN(const uInt maxpar=MAXPAR);
     171  void setMaxN(const casacore::uInt maxpar=MAXPAR);
    169172  // </group>
    170173
     
    174177  Bool useWindow_p;
    175178  // rms estimate in profile
    176   Double rms_p;
     179  casacore::Double rms_p;
    177180  // Source cutoff amplitude
    178   Double cutoff_p;
     181  casacore::Double cutoff_p;
    179182  // Window low and end value
    180183  // <group>
    181   Int windowLow_p;
    182   Int windowEnd_p;
     184  casacore::Int windowLow_p;
     185  casacore::Int windowEnd_p;
    183186  // </group>
    184187  // Region low and high value
    185188  // <group>
    186   Int regionLow_p;
    187   Int regionEnd_p;
     189  casacore::Int regionLow_p;
     190  casacore::Int regionEnd_p;
    188191  // </group>
    189192  // Smoothing parameter. I.e. 2q+1 points are taken
    190   Int q_p;
    191   // Internal cashing of calculated values based on q
    192   // <group>
    193   Double a_p;
    194   Double b_p;
     193  casacore::Int q_p;
     194  // casacore::Internal cashing of calculated values based on q
     195  // <group>
     196  casacore::Double a_p;
     197  casacore::Double b_p;
    195198  // </group>
    196199  // The minimum Gaussian width
    197   Double sigmin_p;
     200  casacore::Double sigmin_p;
    198201  // The second derivatives
    199   Double *deriv_p;
     202  casacore::Double *deriv_p;
    200203  // The list of components
    201204  SpectralList slist_p;
    202205  // The length of the current profile being estimated
    203   uInt lprof_p;
     206  casacore::uInt lprof_p;
    204207
    205208  //# Member functions
    206209  // Get the window or the total spectrum
    207210  template <class MT>
    208     uInt window(const Vector<MT> &prof);
     211    casacore::uInt window(const casacore::Vector<MT> &prof);
    209212  // Get the second derivatives
    210213  template <class MT>
    211     void findc2(const Vector<MT> &prof);
     214    void findc2(const casacore::Vector<MT> &prof);
    212215  // Find the Gaussians
    213216  template <class MT>
    214     void findga(const Vector<MT> &prof);
     217    void findga(const casacore::Vector<MT> &prof);
    215218  // Convert the parameters of the components in the list from
    216219  // pixel-based indices to the given abcissa-vector space.
    217   template <class MT> GaussianSpectralElement convertElement (const Vector<MT>& abcissa,
     220  template <class MT> GaussianSpectralElement convertElement (const casacore::Vector<MT>& abcissa,
    218221                                                      const GaussianSpectralElement& el) const;
    219222};
  • trunk/external-alma/components/SpectralComponents/SpectralList.h

    r2980 r3106  
    1818//#
    1919//# Correspondence concerning AIPS++ should be addressed as follows:
    20 //#        Internet email: aips2-request@nrao.edu.
     20//#        casacore::Internet email: aips2-request@nrao.edu.
    2121//#        Postal address: AIPS++ Project Office
    2222//#                        National Radio Astronomy Observatory
     
    3434#include <casa/Containers/Block.h>
    3535
     36namespace casacore {
     37
     38    class RecordInterface;
     39    class String;
     40    template <class T> class Vector;
     41}
     42
    3643namespace casa { //# NAMESPACE CASA - BEGIN
    3744
    3845//# Forward Declarations
    3946class SpectralElement;
    40 class RecordInterface;
    41 class String;
    42 template <class T> class Vector;
    4347
    4448// <summary>
     
    8690  SpectralList();
    8791  // Construct a list with a maximum length of n (0: unlimited length)
    88   explicit SpectralList(uInt nmax);
     92  explicit SpectralList(casacore::uInt nmax);
    8993  // Construct with an initial element
    9094  explicit SpectralList(const SpectralElement &in);
     
    100104  SpectralList &operator=(const SpectralList &other);
    101105  // Evaluate the value of the sum of the elements at x
    102   Double operator()(const Double x) const;
     106  casacore::Double operator()(const casacore::Double x) const;
    103107  // Get element n
    104108  // <thrown>
     
    106110  // </thrown>
    107111  // <group>
    108   const SpectralElement* operator[](const uInt n) const;
    109   SpectralElement* operator[](const uInt n);
     112  const SpectralElement* operator[](const casacore::uInt n) const;
     113  SpectralElement* operator[](const casacore::uInt n);
    110114  // </group>
    111115
    112116  //# Member functions
    113117  // Get the number of elements in list
    114   uInt nelements() const { return list_p.nelements(); };
     118  casacore::uInt nelements() const { return list_p.nelements(); };
    115119
    116120  // Get the profile values for all elements in list. The evaluation
     
    138142  // Add elements to list (False if list has max length and full)
    139143  // <group>
    140   Bool add(const SpectralElement &in);
    141   Bool add(const SpectralList &in);
     144  casacore::Bool add(const SpectralElement &in);
     145  casacore::Bool add(const SpectralList &in);
    142146  // </group>
    143147  // Insert in sort order in the list
     
    148152  // Set an element in the list. Return False if more than one place beyond
    149153  // end of list; or if beyond max size.
    150   Bool set(const SpectralElement &in, const uInt which);
     154  casacore::Bool set(const SpectralElement &in, const casacore::uInt which);
    151155
    152156  // Clear the list
     
    154158
    155159  // Set a maximum size of the list
    156   void set(const uInt nmax);
     160  void set(const casacore::uInt nmax);
    157161
    158162  // Sort the list on the first parameter (i.e. peak value for Gaussian)
     
    161165  // Convert to and from a Record (see details in SpectralElement)
    162166  // <group>
    163   Bool fromRecord (String& errMsg, const RecordInterface& container);
    164   Bool toRecord(RecordInterface& container) const;
     167  casacore::Bool fromRecord (casacore::String& errMsg, const casacore::RecordInterface& container);
     168  casacore::Bool toRecord(casacore::RecordInterface& container) const;
    165169  //</group>
    166170
     
    168172  //#Data
    169173  // Max length allowed of list
    170   uInt nmax_p;
     174  casacore::uInt nmax_p;
    171175  // List of elements
    172   PtrBlock<SpectralElement *> list_p;
     176  casacore::PtrBlock<SpectralElement *> list_p;
    173177
    174178  //# Member functions
    175179  // Compare two elements
    176   Int compar(const SpectralElement &p1, const SpectralElement &p2) const;
     180  casacore::Int compar(const SpectralElement &p1, const SpectralElement &p2) const;
    177181
    178182};
  • trunk/external-alma/oldasdm2ASAP/OldASDMFiller.cc

    r2407 r3106  
    7474  //logsink_->postLocally( LogMessage("sFreqFrame = "+sFreqFrame,LogOrigin(className_,funcName,WHERE)) ) ;
    7575 
    76   Vector<casa::Double> antpos = table_->getHeader().antennaposition ;
     76  Vector<casacore::Double> antpos = table_->getHeader().antennaposition ;
    7777
    7878  // data selection
     
    172172         
    173173          // fill MOLECULE_ID and add MOLECULES row if necessary
    174           Vector<casa::Double> restFreqs( rf.size() ) ;
     174          Vector<casacore::Double> restFreqs( rf.size() ) ;
    175175          for ( uInt i = 0 ; i < rf.size() ; i++ )
    176             restFreqs[i] = (casa::Double)(rf[i]) ;
     176            restFreqs[i] = (casacore::Double)(rf[i]) ;
    177177          setMolecule( restFreqs ) ;
    178178         
    179179          // time and interval
    180           casa::Double mjd = (casa::Double)(reader_->getTime()) ;
    181           casa::Double interval = (casa::Double)(reader_->getInterval()) ;
     180          casacore::Double mjd = (casacore::Double)(reader_->getTime()) ;
     181          casacore::Double interval = (casacore::Double)(reader_->getInterval()) ;
    182182
    183183          // fill TIME and INTERVAL
     
    185185         
    186186          // fill SRCNAME, SRCTYPE, FIELDNAME, SRCDIRECTION, SRCPROPERMOTION, and SRCVELOCITY
    187           Vector<casa::Double> srcDir( 2 ) ;
    188           srcDir[0] = (casa::Double)(srcDirection[0]) ;
    189           srcDir[1] = (casa::Double)(srcDirection[1]) ;
    190           Vector<casa::Double> srcPM( 2 ) ;
    191           srcPM[0] = (casa::Double)(srcProperMotion[0]) ;
    192           srcPM[1] = (casa::Double)(srcProperMotion[1]) ;
    193           setSource( srcname, srctype, fieldname, srcDir, srcPM, (casa::Double)sysVel ) ;
     187          Vector<casacore::Double> srcDir( 2 ) ;
     188          srcDir[0] = (casacore::Double)(srcDirection[0]) ;
     189          srcDir[1] = (casacore::Double)(srcDirection[1]) ;
     190          Vector<casacore::Double> srcPM( 2 ) ;
     191          srcPM[0] = (casacore::Double)(srcProperMotion[0]) ;
     192          srcPM[1] = (casacore::Double)(srcProperMotion[1]) ;
     193          setSource( srcname, srctype, fieldname, srcDir, srcPM, (casacore::Double)sysVel ) ;
    194194
    195195          // fill FLAGROW
     
    208208                                   windspeed,
    209209                                   windaz ) ;
    210           setWeather2( (casa::Float)temperature,
    211                        (casa::Float)pressure,
    212                        (casa::Float)humidity,
    213                        (casa::Float)windspeed,
    214                        (casa::Float)windaz ) ;
     210          setWeather2( (casacore::Float)temperature,
     211                       (casacore::Float)pressure,
     212                       (casacore::Float)humidity,
     213                       (casacore::Float)windspeed,
     214                       (casacore::Float)windaz ) ;
    215215
    216216          // fill AZIMUTH, ELEVATION, DIRECTION and SCANRATE
     
    223223                                    el,
    224224                                    srate ) ;
    225           Vector<casa::Double> scanRate( 2, 0.0 ) ;
    226           Vector<casa::Double> direction( 2, 0.0 ) ;
     225          Vector<casacore::Double> scanRate( 2, 0.0 ) ;
     226          Vector<casacore::Double> direction( 2, 0.0 ) ;
    227227          if ( srate.size() > 0 ) {
    228             scanRate[0] = (casa::Double)(srate[0]) ;
    229             scanRate[1] = (casa::Double)(srate[1]) ;
     228            scanRate[0] = (casacore::Double)(srate[0]) ;
     229            scanRate[1] = (casacore::Double)(srate[1]) ;
    230230          }
    231231          setScanRate( scanRate ) ;
    232232          if ( dir.size() > 0 ) {
    233             direction[0] = (casa::Double)(dir[0]) ;
    234             direction[1] = (casa::Double)(dir[1]) ;
     233            direction[0] = (casacore::Double)(dir[0]) ;
     234            direction[1] = (casacore::Double)(dir[1]) ;
    235235          }
    236236          else {
     
    238238          }
    239239          //logsink_->postLocally( LogMessage("direction = "+String::toString(direction),LogOrigin(className_,funcName,WHERE)) ) ;
    240           setDirection( direction, (casa::Float)az, (casa::Float)el ) ;
     240          setDirection( direction, (casacore::Float)az, (casacore::Float)el ) ;
    241241
    242242           // REFPIX, REFVAL, INCREMENT
     
    247247          else {
    248248            reader_->getFrequency( refpix, refval, incr, freqref ) ;
    249             refval = (double)toLSRK( casa::Double(refval),
     249            refval = (double)toLSRK( casacore::Double(refval),
    250250                                     String(freqref),
    251251                                     mjd,
     
    258258
    259259          // fill FREQ_ID and add FREQUENCIES row if necessary
    260           setFrequency( (casa::Double)refpix, (casa::Double)refval, (casa::Double)incr ) ;
     260          setFrequency( (casacore::Double)refpix, (casacore::Double)refval, (casacore::Double)incr ) ;
    261261
    262262          // loop on polarization
     
    280280          // OPACITY
    281281          vector<float> tau = reader_->getOpacity() ;
    282           Vector<casa::Float> opacity = toVector( tau, numPol ) ;
     282          Vector<casacore::Float> opacity = toVector( tau, numPol ) ;
    283283
    284284          // SPECTRA, FLAGTRA, TSYS, TCAL
     
    287287          vector< vector<float> > tc ;
    288288          reader_->getTcalAndTsys( tc, ts ) ;
    289           Matrix<casa::Float> spectra = toMatrix( sp, numPol, numChan ) ;
     289          Matrix<casacore::Float> spectra = toMatrix( sp, numPol, numChan ) ;
    290290          Vector<uChar> flagtra( numChan, 0 ) ;
    291           Matrix<casa::Float> tsys = toMatrix( ts, numPol, numChan ) ;
    292           Matrix<casa::Float> tcal = toMatrix( tc, numPol, numChan ) ;
     291          Matrix<casacore::Float> tsys = toMatrix( ts, numPol, numChan ) ;
     292          Matrix<casacore::Float> tcal = toMatrix( tc, numPol, numChan ) ;
    293293//           String caltime = "" ;
    294 //           if ( anyNE( tcal, (casa::Float)1.0 ) )
     294//           if ( anyNE( tcal, (casacore::Float)1.0 ) )
    295295//             caltime = toTcalTime( mjd ) ;
    296296          String caltime = toTcalTime( mjd ) ;
     
    374374    string ref ;
    375375    reader_->getSourceDirection( sdir, ref ) ;
    376     Vector<casa::Double> sourceDir( sdir ) ;
     376    Vector<casacore::Double> sourceDir( sdir ) ;
    377377    hdr.reffreq = toLSRK( hdr.reffreq, hdr.freqref, hdr.utc, hdr.antennaposition, sdir, String(ref) ) ;
    378378    hdr.freqref = "LSRK" ;
     
    410410}
    411411
    412 Matrix<casa::Float> OldASDMFiller::toMatrix( float *sp,
     412Matrix<casacore::Float> OldASDMFiller::toMatrix( float *sp,
    413413                                         unsigned int npol,
    414414                                         unsigned int nchan )
    415415{
    416   Matrix<casa::Float> mSp( npol, nchan ) ;
     416  Matrix<casacore::Float> mSp( npol, nchan ) ;
    417417  if ( npol <= 2 ) {
    418418    // 1 or 2 polarization case
    419419    for ( unsigned int ich = 0 ; ich < nchan ; ich++ ) {
    420420      for ( unsigned int ipol = 0 ; ipol < npol ; ipol++ ) {
    421         mSp(ipol,ich) = (casa::Float)(sp[npol*ich+ipol]) ;
     421        mSp(ipol,ich) = (casacore::Float)(sp[npol*ich+ipol]) ;
    422422      }
    423423    }
     
    426426    // 4 polarization case
    427427    for ( unsigned int ich = 0 ; ich < nchan ; ich++ ) {
    428       mSp(0,ich) = (casa::Float)(sp[4*ich]) ;   // Re(XX)
    429       mSp(1,ich) = (casa::Float)(sp[4*ich+4]) ; // Re(YY)
    430       mSp(2,ich) = (casa::Float)(sp[4*ich+2]) ; // Re(XY)
    431       mSp(3,ich) = (casa::Float)(sp[4*ich+3]) ; // Im(XY)
     428      mSp(0,ich) = (casacore::Float)(sp[4*ich]) ;   // Re(XX)
     429      mSp(1,ich) = (casacore::Float)(sp[4*ich+4]) ; // Re(YY)
     430      mSp(2,ich) = (casacore::Float)(sp[4*ich+2]) ; // Re(XY)
     431      mSp(3,ich) = (casacore::Float)(sp[4*ich+3]) ; // Im(XY)
    432432    }
    433433  }
     
    435435}
    436436
    437 Matrix<casa::Float> OldASDMFiller::toMatrix( vector< vector<float> > &tsys,
     437Matrix<casacore::Float> OldASDMFiller::toMatrix( vector< vector<float> > &tsys,
    438438                                               unsigned int npol,
    439439                                               unsigned int nchan )
     
    441441  unsigned int numRec = tsys.size() ;
    442442  unsigned int numChan = tsys[0].size() ;
    443   Matrix<casa::Float> ret ;
     443  Matrix<casacore::Float> ret ;
    444444  if ( npol == numRec && nchan == numChan ) {
    445445    ret.resize( npol, nchan ) ;
    446446    for ( unsigned int ip = 0 ; ip < npol ; ip++ )
    447447      for ( unsigned int ic = 0 ; ic < nchan ; ic++ )
    448         ret( ip, ic ) = (casa::Float)(tsys[ip][ic]) ;
     448        ret( ip, ic ) = (casacore::Float)(tsys[ip][ic]) ;
    449449  }
    450450  else if ( npol == numRec && numChan == 1 ) {
    451451    ret.resize( npol, 1 ) ;
    452452    for ( unsigned int ip = 0 ; ip < npol ; ip++ )
    453       ret( ip, 0 ) = (casa::Float)(tsys[0][0]) ;
     453      ret( ip, 0 ) = (casacore::Float)(tsys[0][0]) ;
    454454  }
    455455  else if ( numRec == 1 && nchan == numChan ) {
     
    457457    for ( unsigned int ip = 0 ; ip < npol ; ip++ )
    458458      for ( unsigned int ic = 0 ; ic < nchan ; ic++ )
    459         ret( ip, ic ) = (casa::Float)(tsys[0][ic]) ;
     459        ret( ip, ic ) = (casacore::Float)(tsys[0][ic]) ;
    460460  }
    461461  else if ( numRec == 1 && numChan == 1 ) {
    462462    ret.resize( npol, 1 ) ;
    463463    for ( unsigned int ip = 0 ; ip < npol ; ip++ )
    464       ret( ip, 0 ) = (casa::Float)(tsys[0][0]) ;
     464      ret( ip, 0 ) = (casacore::Float)(tsys[0][0]) ;
    465465  }
    466466  else if ( numRec == 2 && npol == 4 && numChan == nchan ) {
     
    469469    ret.resize( npol, nchan ) ;
    470470    for ( unsigned int ic = 0 ; ic < nchan ; ic++ ) {
    471       casa::Float tsysxy = (casa::Float)(0.5*(tsys[0][ic]+tsys[1][ic])) ;
    472       ret( 0, ic ) = (casa::Float)(tsys[0][ic]) ;
    473       ret( 1, ic ) = (casa::Float)(tsys[1][ic]) ;
     471      casacore::Float tsysxy = (casacore::Float)(0.5*(tsys[0][ic]+tsys[1][ic])) ;
     472      ret( 0, ic ) = (casacore::Float)(tsys[0][ic]) ;
     473      ret( 1, ic ) = (casacore::Float)(tsys[1][ic]) ;
    474474      ret( 2, ic ) = tsysxy ;
    475475      ret( 3, ic ) = tsysxy ;
     
    480480    //       at the moment Tsys[XY] = 0.5*(Tsys[X]+Tsys[Y])
    481481    ret.resize( npol, 1 ) ;
    482     casa::Float tsysxy = (casa::Float)(0.5*(tsys[0][0]+tsys[1][0])) ;
    483     ret( 0, 0 ) = (casa::Float)(tsys[0][0]) ;
    484     ret( 1, 0 ) = (casa::Float)(tsys[1][0]) ;
     482    casacore::Float tsysxy = (casacore::Float)(0.5*(tsys[0][0]+tsys[1][0])) ;
     483    ret( 0, 0 ) = (casacore::Float)(tsys[0][0]) ;
     484    ret( 1, 0 ) = (casacore::Float)(tsys[1][0]) ;
    485485    ret( 2, 0 ) = tsysxy ;
    486486    ret( 3, 0 ) = tsysxy ;
     
    490490    for ( unsigned int ip = 0 ; ip < npol ; ip++ )
    491491      for ( unsigned int ic = 0 ; ic < nchan ; ic++ )
    492         ret( ip, ic ) = (casa::Float)(tsys[0][ic]) ;   
     492        ret( ip, ic ) = (casacore::Float)(tsys[0][ic]) ;   
    493493  }
    494494  return ret ;
    495495}
    496496
    497 Vector<casa::Float> OldASDMFiller::toVector( vector<float> &tau,
     497Vector<casacore::Float> OldASDMFiller::toVector( vector<float> &tau,
    498498                                               unsigned int npol )
    499499{
    500500  String funcName = "toVector" ;
    501501
    502   Vector<casa::Float> ret( npol ) ;
     502  Vector<casacore::Float> ret( npol ) ;
    503503  //logsink_->postLocally( LogMessage("tau0="+String::toString(tau[0]),LogOrigin(className_,funcName,WHERE)) ) ;
    504504  if ( npol == 4 ) {
    505     ret[0] = (casa::Float)tau[0] ;
    506     ret[1] = (casa::Float)tau[1] ;
     505    ret[0] = (casacore::Float)tau[0] ;
     506    ret[1] = (casacore::Float)tau[1] ;
    507507    ret[2] = 0.5 * ( ret[0] + ret[1] ) ;
    508508    ret[3] = ret[2] ;
     
    510510  else if ( npol == tau.size() ) {
    511511    for ( unsigned int ipol = 0 ; ipol < npol ; ipol++ )
    512       ret[ipol] = (casa::Float)tau[ipol] ;
     512      ret[ipol] = (casacore::Float)tau[ipol] ;
    513513  }
    514514  else {
    515515    // I don't know how to handle...
    516516    for ( unsigned int ipol = 0 ; ipol < npol ; ipol++ )
    517       ret[ipol] = (casa::Float)tau[0] ;
     517      ret[ipol] = (casacore::Float)tau[0] ;
    518518  }
    519519  //logsink_->postLocally( LogMessage("tau="+String::toString(ret),LogOrigin(className_,funcName,WHERE)) ) ;
     
    521521}
    522522
    523 String OldASDMFiller::toTcalTime( casa::Double mjd )
     523String OldASDMFiller::toTcalTime( casacore::Double mjd )
    524524{
    525525  return MVTime( mjd ).string( MVTime::YMD ) ;
    526526}
    527527
    528 void OldASDMFiller::toJ2000( Vector<casa::Double> &dir,
     528void OldASDMFiller::toJ2000( Vector<casacore::Double> &dir,
    529529                               double az,
    530530                               double el,
    531                                casa::Double mjd,
    532                                Vector<casa::Double> antpos )
     531                               casacore::Double mjd,
     532                               Vector<casacore::Double> antpos )
    533533{
    534534  String funcName = "toJ2000" ;
    535535
    536   Vector<casa::Double> azel( 2 ) ;
     536  Vector<casacore::Double> azel( 2 ) ;
    537537  azel[0] = az ;
    538538  azel[1] = el ;
     
    553553}
    554554
    555 Vector<casa::Double> OldASDMFiller::toJ2000( Vector<casa::Double> dir,
     555Vector<casacore::Double> OldASDMFiller::toJ2000( Vector<casacore::Double> dir,
    556556                                          String dirref,
    557                                           casa::Double mjd,
    558                                           Vector<casa::Double> antpos )
    559 {
    560   Vector<casa::Double> newd( dir ) ;
     557                                          casacore::Double mjd,
     558                                          Vector<casacore::Double> antpos )
     559{
     560  Vector<casacore::Double> newd( dir ) ;
    561561  if ( dirref != "J2000" ) {
    562562    MEpoch me( Quantity( mjd, "d" ), MEpoch::UTC ) ;
     
    593593}
    594594
    595 casa::Double OldASDMFiller::toLSRK( casa::Double freq,
     595casacore::Double OldASDMFiller::toLSRK( casacore::Double freq,
    596596                                 String freqref,
    597                                  casa::Double utc,
    598                                  Vector<casa::Double> antpos,
    599                                  Vector<casa::Double> dir,
     597                                 casacore::Double utc,
     598                                 Vector<casacore::Double> antpos,
     599                                 Vector<casacore::Double> dir,
    600600                                 String dirref )
    601601{
     
    603603
    604604  //logsink_->postLocally( LogMessage("freqref = "+freqref,LogOrigin(className_,funcName,WHERE)) ) ;
    605   casa::Double newf = freq ;
     605  casacore::Double newf = freq ;
    606606  if ( freqref != "LSRK" ) {
    607     MEpoch me( Quantum<casa::Double>( utc, Unit("d") ), MEpoch::UTC ) ;
    608     Vector< Quantum<casa::Double> > antposQ( 3 ) ;
     607    MEpoch me( Quantum<casacore::Double>( utc, Unit("d") ), MEpoch::UTC ) ;
     608    Vector< Quantum<casacore::Double> > antposQ( 3 ) ;
    609609    for ( int i = 0 ; i < 3 ; i++ )
    610       antposQ[i] = Quantum<casa::Double>( antpos[i], Unit("m") ) ;
     610      antposQ[i] = Quantum<casacore::Double>( antpos[i], Unit("m") ) ;
    611611    MPosition mp( antposQ, MPosition::ITRF ) ;
    612612    MDirection::Types dirtype ;
     
    614614    if ( !b )
    615615      dirtype = MDirection::J2000 ;
    616     MDirection md( Quantum<casa::Double>( dir[0], Unit("rad") ),
    617                    Quantum<casa::Double>( dir[1], Unit("rad") ),
     616    MDirection md( Quantum<casacore::Double>( dir[0], Unit("rad") ),
     617                   Quantum<casacore::Double>( dir[1], Unit("rad") ),
    618618                   dirtype ) ;
    619619    MeasFrame mf( me, mp, md ) ;
     
    624624    MFrequency::Convert tolsr( freqtype,
    625625                               MFrequency::Ref( MFrequency::LSRK, mf ) ) ;
    626     newf = tolsr( Quantum<casa::Double>( freq, Unit("Hz") ) ).get( "Hz" ).getValue() ;
     626    newf = tolsr( Quantum<casacore::Double>( freq, Unit("Hz") ) ).get( "Hz" ).getValue() ;
    627627    //logsink_->postLocally( LogMessage("freq = "+String::toString(freq)+", newf = "+String::toString(newf),LogOrigin(className_,funcName,WHERE)) ) ;
    628628  }
  • trunk/external-alma/oldasdm2ASAP/OldASDMFiller.h

    r2273 r3106  
    1313public:
    1414  // constructor and destructor
    15   OldASDMFiller( casa::CountedPtr<asap::Scantable> stable ) ;
     15  OldASDMFiller( casacore::CountedPtr<asap::Scantable> stable ) ;
    1616  ~OldASDMFiller() ;
    1717
    1818  // open data
    19   bool open( const std::string &filename, const casa::Record &rec ) ;
     19  bool open( const std::string &filename, const casacore::Record &rec ) ;
    2020
    2121  // fill data
     
    2626 
    2727  // get reader object
    28   casa::CountedPtr<OldASDMReader> getReader() { return reader_ ; } ;
     28  casacore::CountedPtr<OldASDMReader> getReader() { return reader_ ; } ;
    2929
    3030  // set logger
    31   void setLogger( casa::CountedPtr<casa::LogSinkInterface> &logsink ) ;
     31  void setLogger( casacore::CountedPtr<casacore::LogSinkInterface> &logsink ) ;
    3232
    3333private:
     
    3636
    3737  // get IF key
    38   casa::String getIFKey( casa::uInt ifno ) ;
     38  casacore::String getIFKey( casacore::uInt ifno ) ;
    3939
    4040  // get FREQUENCIES attributes from ifrec_
    41   void getFrequencyRec( casa::String key,
     41  void getFrequencyRec( casacore::String key,
    4242                        double &refpix,
    4343                        double &refval,
     
    4545
    4646  // set FREQUENCIES attributes to ifrec_
    47   void setFrequencyRec( casa::String key,
     47  void setFrequencyRec( casacore::String key,
    4848                        double refpix,
    4949                        double refval,
     
    5151                     
    5252  // reshape float array spectra to Matrix<Float>
    53   casa::Matrix<casa::Float> toMatrix( float *sp,
     53  casacore::Matrix<casacore::Float> toMatrix( float *sp,
    5454                                      unsigned int npol,
    5555                                      unsigned int nchan ) ;
    5656
    5757  // reshape 2d vector Tsys to Matrix<Float>
    58   casa::Matrix<casa::Float> toMatrix( std::vector< std::vector<float> > &tsys,
     58  casacore::Matrix<casacore::Float> toMatrix( std::vector< std::vector<float> > &tsys,
    5959                                      unsigned int npol,
    6060                                      unsigned int nchan ) ;
    6161
    6262  // reshape vector<float> to Vector<Float> with appropriate length
    63   casa::Vector<casa::Float> toVector( std::vector<float> &tau,
     63  casacore::Vector<casacore::Float> toVector( std::vector<float> &tau,
    6464                                      unsigned int npol ) ;
    6565
    6666  // create TCAL time string from MJD
    67   casa::String toTcalTime( casa::Double mjd ) ;
     67  casacore::String toTcalTime( casacore::Double mjd ) ;
    6868
    6969  // AZEL to J2000
    70   void toJ2000( casa::Vector<casa::Double> &dir,
     70  void toJ2000( casacore::Vector<casacore::Double> &dir,
    7171                double az,
    7272                double el,
    73                 casa::Double mjd,
    74                 casa::Vector<casa::Double> antpos ) ;
     73                casacore::Double mjd,
     74                casacore::Vector<casacore::Double> antpos ) ;
    7575
    7676  // to J2000
    77   casa::Vector<casa::Double> toJ2000( casa::Vector<casa::Double> dir,
    78                                       casa::String dirref,
    79                                       casa::Double mjd,
    80                                       casa::Vector<casa::Double> antpos ) ;
     77  casacore::Vector<casacore::Double> toJ2000( casacore::Vector<casacore::Double> dir,
     78                                      casacore::String dirref,
     79                                      casacore::Double mjd,
     80                                      casacore::Vector<casacore::Double> antpos ) ;
    8181
    8282  // get frequency frame enum value from string
    83   casa::MFrequency::Types toFrameType( std::string &s ) ;
     83  casacore::MFrequency::Types toFrameType( std::string &s ) ;
    8484
    8585  // to LSRK
    8686  // utc must be UTC time in "d" (day)
    8787  // antpos must be ITRF value in "m"
    88   casa::Double toLSRK( casa::Double freq,
    89                        casa::String freqref,
    90                        casa::Double utc,
    91                        casa::Vector<casa::Double> antpos,
    92                        casa::Vector<casa::Double> dir,
    93                        casa::String dirref ) ;
     88  casacore::Double toLSRK( casacore::Double freq,
     89                       casacore::String freqref,
     90                       casacore::Double utc,
     91                       casacore::Vector<casacore::Double> antpos,
     92                       casacore::Vector<casacore::Double> dir,
     93                       casacore::String dirref ) ;
    9494
    95   casa::CountedPtr<OldASDMReader> reader_ ;
    96   casa::Int antennaId_ ;
    97   casa::String antennaName_ ;
     95  casacore::CountedPtr<OldASDMReader> reader_ ;
     96  casacore::Int antennaId_ ;
     97  casacore::String antennaName_ ;
    9898
    99   casa::Record ifrec_ ;
     99  casacore::Record ifrec_ ;
    100100
    101   casa::CountedPtr<casa::LogSinkInterface> logsink_ ;
     101  casacore::CountedPtr<casacore::LogSinkInterface> logsink_ ;
    102102
    103   casa::String className_ ;
     103  casacore::String className_ ;
    104104
    105105} ;
  • trunk/external-alma/oldasdm2ASAP/OldASDMReader.cc

    r2355 r3106  
    5656}
    5757
    58 bool OldASDMReader::open( const string &filename, const casa::Record &rec )
    59 {
    60   casa::String funcName = "open" ;
     58bool OldASDMReader::open( const string &filename, const casacore::Record &rec )
     59{
     60  casacore::String funcName = "open" ;
    6161
    6262  // return value
     
    7171  // parsing ASDM options
    7272  if ( rec.isDefined( "asdm" ) ) {
    73     casa::Record asdmrec = rec.asRecord( "asdm" ) ;
     73    casacore::Record asdmrec = rec.asRecord( "asdm" ) ;
    7474
    7575    // antenna
    7676    if ( asdmrec.isDefined( "antenna" ) ) {
    77       if ( asdmrec.type( asdmrec.fieldNumber( "antenna" ) ) == casa::TpInt ) {
     77      if ( asdmrec.type( asdmrec.fieldNumber( "antenna" ) ) == casacore::TpInt ) {
    7878        antennaId_ = asdmrec.asInt( "antenna" ) ;
    7979      }
     
    182182    vector<AntennaRow *> rows = atab.get() ;
    183183    int idx = -1 ;
    184     for ( casa::uInt irow = 0 ; irow < rows.size() ; irow++ ) {
    185       if ( casa::String(rows[irow]->getName()) == antennaName_ ) {
     184    for ( casacore::uInt irow = 0 ; irow < rows.size() ; irow++ ) {
     185      if ( casacore::String(rows[irow]->getName()) == antennaName_ ) {
    186186        idx = rows[irow]->getAntennaId().getTagValue() ;
    187187        break ;
     
    190190    if ( idx == -1 ) {
    191191      close() ;
    192       throw (casa::AipsError( antennaName_ + " not found." )) ;
     192      throw (casacore::AipsError( antennaName_ + " not found." )) ;
    193193    }
    194194    else {
     
    203203    if ( antennaRow == 0 ) {
    204204      close() ;
    205       throw (casa::AipsError( "AntennaId " + casa::String::toString(antennaId_) + " is invalid." ) ) ;
     205      throw (casacore::AipsError( "AntennaId " + casacore::String::toString(antennaId_) + " is invalid." ) ) ;
    206206    }
    207207  }
     
    210210  // set antenna name
    211211  if ( antennaName_.size() == 0 ) {
    212     antennaName_ = casa::String( antennaRow->getName() ) ;
     212    antennaName_ = casacore::String( antennaRow->getName() ) ;
    213213  }
    214214
     
    217217
    218218  // station name
    219   stationName_ = casa::String( stationRow->getName() ) ;
     219  stationName_ = casacore::String( stationRow->getName() ) ;
    220220
    221221  // antenna position
    222222  antennaPosition_.resize( 3 ) ;
    223223  vector<Length> antpos = stationRow->getPosition() ;
    224   for ( casa::uInt i = 0 ; i < 3 ; i++ )
    225     antennaPosition_[i] = Quantity( casa::Double( antpos[i].get() ), Unit( "m" ) ) ;
     224  for ( casacore::uInt i = 0 ; i < 3 ; i++ )
     225    antennaPosition_[i] = Quantity( casacore::Double( antpos[i].get() ), Unit( "m" ) ) ;
    226226
    227227  // create SDMBinData object
     
    229229
    230230  // get Main rows
    231   //mainRow_ = casa::Vector<MainRow *>(asdm_->getMain().get()) ;
     231  //mainRow_ = casacore::Vector<MainRow *>(asdm_->getMain().get()) ;
    232232
    233233  // set up IFNO
     
    262262}
    263263
    264 void OldASDMReader::fillHeader( casa::Int &nchan,
    265                              casa::Int &npol,
    266                              casa::Int &nif,
    267                              casa::Int &nbeam,
    268                              casa::String &observer,
    269                              casa::String &project,
    270                              casa::String &obstype,
    271                              casa::String &antennaname,
    272                              casa::Vector<casa::Double> &antennaposition,
    273                              casa::Float &equinox,
    274                              casa::String &freqref,
    275                              casa::Double &reffreq,
    276                              casa::Double &bandwidth,
    277                              casa::Double &utc,
    278                              casa::String &fluxunit,
    279                              casa::String &epoch,
    280                              casa::String &poltype )
    281 {
    282   casa::String funcName = "fillHeader" ;
     264void OldASDMReader::fillHeader( casacore::Int &nchan,
     265                             casacore::Int &npol,
     266                             casacore::Int &nif,
     267                             casacore::Int &nbeam,
     268                             casacore::String &observer,
     269                             casacore::String &project,
     270                             casacore::String &obstype,
     271                             casacore::String &antennaname,
     272                             casacore::Vector<casacore::Double> &antennaposition,
     273                             casacore::Float &equinox,
     274                             casacore::String &freqref,
     275                             casacore::Double &reffreq,
     276                             casacore::Double &bandwidth,
     277                             casacore::Double &utc,
     278                             casacore::String &fluxunit,
     279                             casacore::String &epoch,
     280                             casacore::String &poltype )
     281{
     282  casacore::String funcName = "fillHeader" ;
    283283
    284284  ExecBlockTable &ebtab = asdm_->getExecBlock() ;
    285285  // at the moment take first row of ExecBlock table
    286286  ExecBlockRow *ebrow = ebtab.get()[0] ;
    287   casa::String telescopeName( ebrow->getTelescopeName() ) ;
    288   //casa::String stationName( stationRow_p->getName() ) ;
     287  casacore::String telescopeName( ebrow->getTelescopeName() ) ;
     288  //casacore::String stationName( stationRow_p->getName() ) ;
    289289
    290290  // antennaname
     
    295295  // antennaposition
    296296  antennaposition.resize( 3 ) ;
    297   for ( casa::uInt i = 0 ; i < 3 ; i++ )
     297  for ( casacore::uInt i = 0 ; i < 3 ; i++ )
    298298    antennaposition[i] = antennaPosition_[i].getValue( Unit("m") ) ;
    299299
     
    307307  // utc
    308308  // start time of the project
    309   utc = casa::Double( ebrow->getStartTime().getMJD() ) ;
     309  utc = casacore::Double( ebrow->getStartTime().getMJD() ) ;
    310310 
    311311
     
    326326      refidx = irow ;
    327327  }
    328   nchan = casa::Int( *max_element( nchans.begin(), nchans.end() ) ) ;
     328  nchan = casacore::Int( *max_element( nchans.begin(), nchans.end() ) ) ;
    329329
    330330  //logsink_->postLocally( LogMessage("refidx = "+String::toString(refidx),LogOrigin(className_,funcName,WHERE)) ) ;
     
    337337    }
    338338  }
    339   bandwidth = casa::Double( *max_element( bws.begin(), bws.end() ) ) ;
     339  bandwidth = casacore::Double( *max_element( bws.begin(), bws.end() ) ) ;
    340340
    341341  // reffreq
    342   reffreq = casa::Double( spwrows[refidx]->getRefFreq().get() ) ;
     342  reffreq = casacore::Double( spwrows[refidx]->getRefFreq().get() ) ;
    343343
    344344  // freqref
     
    382382
    383383  // npol
    384   npol = casa::Int( *max_element( npols.begin(), npols.end() ) ) ;
     384  npol = casacore::Int( *max_element( npols.begin(), npols.end() ) ) ;
    385385
    386386  // poltype
     
    421421
    422422  // nbeam
    423   nbeam = casa::Int( *max_element( nbeams.begin(), nbeams.end() ) ) ;
     423  nbeam = casacore::Int( *max_element( nbeams.begin(), nbeams.end() ) ) ;
    424424
    425425  // fluxunit
     
    441441  obstype = "" ;
    442442  for ( unsigned int imode = 0 ; imode < obsmode.size() ; imode++ ) {
    443     obstype += casa::String(obsmode[imode]) ;
     443    obstype += casacore::String(obsmode[imode]) ;
    444444    if ( imode != obsmode.size()-1 )
    445445      obstype += "#" ;
     
    449449void OldASDMReader::selectConfigDescription()
    450450{
    451   casa::String funcName = "selectConfigDescription" ;
     451  casacore::String funcName = "selectConfigDescription" ;
    452452
    453453  vector<ConfigDescriptionRow *> cdrows = asdm_->getConfigDescription().get() ;
     
    462462  configDescIdList_.resize( cdidTags.size() ) ;
    463463  for ( unsigned int i = 0 ; i < cdidTags.size() ; i++ ) {
    464     configDescIdList_[i] = casa::uInt( cdidTags[i].getTagValue() ) ;
     464    configDescIdList_[i] = casacore::uInt( cdidTags[i].getTagValue() ) ;
    465465  }
    466466}
     
    472472  Tag atag( antennaId_, TagType::Antenna ) ;
    473473  for ( unsigned int irow = 0 ; irow < frows.size() ; irow++ ) {
    474     casa::uInt feedId = (casa::uInt)(frows[irow]->getFeedId() ) ;
    475     if ( casa::anyEQ( feedIdList_, feedId ) )
     474    casacore::uInt feedId = (casacore::uInt)(frows[irow]->getFeedId() ) ;
     475    if ( casacore::anyEQ( feedIdList_, feedId ) )
    476476      continue ;
    477477    if ( frows[irow]->getAntennaId() == atag ) {
     
    483483}
    484484
    485 casa::Vector<casa::uInt> OldASDMReader::getFieldIdList()
    486 {
    487   casa::String funcName = "getFieldIdList" ;
     485casacore::Vector<casacore::uInt> OldASDMReader::getFieldIdList()
     486{
     487  casacore::String funcName = "getFieldIdList" ;
    488488
    489489  vector<FieldRow *> frows = asdm_->getField().get() ;
     
    497497}
    498498
    499 casa::uInt OldASDMReader::getNumMainRow()
    500 {
    501   casa::uInt nrow = casa::uInt( mainRow_.size() ) ;
     499casacore::uInt OldASDMReader::getNumMainRow()
     500{
     501  casacore::uInt nrow = casacore::uInt( mainRow_.size() ) ;
    502502
    503503  return nrow ;
     
    530530}
    531531
    532 casa::Bool OldASDMReader::setMainRow( casa::uInt irow )
    533 {
    534   casa::Bool status = true ;
     532casacore::Bool OldASDMReader::setMainRow( casacore::uInt irow )
     533{
     534  casacore::Bool status = true ;
    535535  row_ = irow ;
    536536  execBlockTag_ = mainRow_[row_]->getExecBlockId() ;
     
    540540    status = false ;
    541541  else {
    542     status = (casa::Bool)(sdmBin_->acceptMainRow( mainRow_[row_] )) ;
     542    status = (casacore::Bool)(sdmBin_->acceptMainRow( mainRow_[row_] )) ;
    543543  }
    544544  return status ;
    545545}
    546546
    547 casa::Bool OldASDMReader::setMainRow( casa::uInt configDescId, casa::uInt fieldId )
     547casacore::Bool OldASDMReader::setMainRow( casacore::uInt configDescId, casacore::uInt fieldId )
    548548{
    549549  clearMainRow() ;
     
    551551  Tag configDescTag( (unsigned int)configDescId, TagType::ConfigDescription ) ;
    552552  Tag fieldTag( (unsigned int)fieldId, TagType::Field ) ;
    553   mainRow_ = casa::Vector<MainRow *>( *(asdm_->getMain().getByContext( configDescTag, fieldTag ) ) ) ;
     553  mainRow_ = casacore::Vector<MainRow *>( *(asdm_->getMain().getByContext( configDescTag, fieldTag ) ) ) ;
    554554 
    555555  return true ;
     
    563563void OldASDMReader::setupIFNO()
    564564{
    565   casa::String funcName = "setupIFNO" ;
     565  casacore::String funcName = "setupIFNO" ;
    566566
    567567  vector<SpectralWindowRow *> spwrows = asdm_->getSpectralWindow().get() ;
    568568  unsigned int nrow = spwrows.size() ;
    569569  ifno_.clear() ;
    570   casa::uInt idx = 0 ;
    571   casa::uInt wvridx = 0 ;
     570  casacore::uInt idx = 0 ;
     571  casacore::uInt wvridx = 0 ;
    572572  for ( unsigned int irow = 0 ; irow < nrow ; irow++ ) {
    573     casa::uInt index ;
     573    casacore::uInt index ;
    574574    if ( isWVR( spwrows[irow] ) ) {
    575575      //logsink_->postLocally( LogMessage(spwrows[irow]->getSpectralWindowId().toString()+" is WVR",LogOrigin(className_,funcName,WHERE)) ) ;
     
    579579      index = ++idx ;
    580580    }
    581     ifno_.insert( pair<Tag,casa::uInt>(spwrows[irow]->getSpectralWindowId(),index) ) ;
     581    ifno_.insert( pair<Tag,casacore::uInt>(spwrows[irow]->getSpectralWindowId(),index) ) ;
    582582    //logsink_->postLocally( LogMessage(spwrows[irow]->getSpectralWindowId().toString()+": IFNO="+String::toString(index),LogOrigin(className_,funcName,WHERE)) ) ;
    583583  }
     
    594594}
    595595
    596 casa::Bool OldASDMReader::setData()
    597 {
    598   casa::String funcName = "setData" ;
     596casacore::Bool OldASDMReader::setData()
     597{
     598  casacore::String funcName = "setData" ;
    599599
    600600  //logsink_->postLocally( LogMessage("try to retrieve binary data",LogOrigin(className_,funcName,WHERE)) ) ;
     
    671671}
    672672
    673 casa::uInt OldASDMReader::getIFNo( unsigned int idx )
     673casacore::uInt OldASDMReader::getIFNo( unsigned int idx )
    674674{
    675675  prepareData( idx ) ;
     
    677677}
    678678
    679 casa::uInt OldASDMReader::getIFNo()
    680 {
    681   map<Tag,casa::uInt>::iterator iter = ifno_.find( specWinTag_ ) ;
     679casacore::uInt OldASDMReader::getIFNo()
     680{
     681  map<Tag,casacore::uInt>::iterator iter = ifno_.find( specWinTag_ ) ;
    682682  if ( iter != ifno_.end() )
    683683    return iter->second ;
     
    713713                               string &freqref )
    714714{
    715   casa::String funcName = "getFrequency" ;
     715  casacore::String funcName = "getFrequency" ;
    716716
    717717  int nchan = specWinRow_p->getNumChan() ;
     
    730730    }
    731731    else {
    732       throw (casa::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;
     732      throw (casacore::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;
    733733    }     
    734734  }
     
    745745    }
    746746    else {
    747       throw (casa::AipsError( "Either chanWidthArray or chanWidth must exist." )) ;
     747      throw (casacore::AipsError( "Either chanWidthArray or chanWidth must exist." )) ;
    748748    }     
    749749    if ( specWinRow_p->isChanFreqStepExists() ) {
     
    757757    }
    758758    else {
    759       throw (casa::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ;
     759      throw (casacore::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ;
    760760    }         
    761761    if ( specWinRow_p->isChanFreqStartExists() ) {
     
    766766    }
    767767    else {
    768       throw (casa::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;
     768      throw (casacore::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;
    769769    }     
    770770  }
     
    781781    }
    782782    else {
    783       throw (casa::AipsError( "Either chanWidthArray or chanWidth must exist." )) ;
     783      throw (casacore::AipsError( "Either chanWidthArray or chanWidth must exist." )) ;
    784784    }
    785785    if ( specWinRow_p->isChanFreqStepExists() ) {
     
    793793    }
    794794    else {
    795       throw (casa::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ;
     795      throw (casacore::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ;
    796796    }         
    797797    if ( specWinRow_p->isChanFreqStartExists() ) {
     
    803803    }
    804804    else {
    805       throw (casa::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;
     805      throw (casacore::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;
    806806    }     
    807807  }
     
    12371237    for ( unsigned int irow = 0 ; irow < nrow ; irow++ ) {
    12381238      CalAtmosphereRow *atmrow = atmrows[irow] ;
    1239       if ( casa::String(atmrow->getAntennaName()) != antennaName_
     1239      if ( casacore::String(atmrow->getAntennaName()) != antennaName_
    12401240           //|| atmrow->getReceiverBand() != rb
    12411241           //|| atmrow->getBasebandName() != bbname
     
    12791279                                 float &windaz )
    12801280{
    1281   casa::String funcName = "getWeatherInfo" ;
     1281  casacore::String funcName = "getWeatherInfo" ;
    12821282
    12831283  temperature = 0.0 ;
     
    16681668                          double &el,
    16691669                          double &mjd,
    1670                           casa::Vector<casa::Quantity> &antpos )
    1671 //                          casa::Vector<casa::Double> antpos )
     1670                          casacore::Vector<casacore::Quantity> &antpos )
     1671//                          casacore::Vector<casacore::Double> antpos )
    16721672{
    16731673  String funcName = "toJ2000" ;
     
    16811681
    16821682vector<double> OldASDMReader::toJ2000( vector<double> &dir,
    1683                                     casa::String &dirref,
     1683                                    casacore::String &dirref,
    16841684                                    double &mjd,
    1685                                     casa::Vector<casa::Quantity> &antpos )
    1686 //                                    casa::Vector<casa::Double> antpos )
    1687 {
    1688   casa::String funcName = "toJ2000" ;
     1685                                    casacore::Vector<casacore::Quantity> &antpos )
     1686//                                    casacore::Vector<casacore::Double> antpos )
     1687{
     1688  casacore::String funcName = "toJ2000" ;
    16891689
    16901690  vector<double> newd( dir ) ;
    16911691  if ( dirref != "J2000" ) {
    1692     casa::MEpoch me( casa::Quantity( (casa::Double)mjd, "d" ), casa::MEpoch::UTC ) ;
    1693     casa::MPosition mp( casa::MVPosition( antpos ),
    1694                         casa::MPosition::ITRF ) ;
     1692    casacore::MEpoch me( casacore::Quantity( (casacore::Double)mjd, "d" ), casacore::MEpoch::UTC ) ;
     1693    casacore::MPosition mp( casacore::MVPosition( antpos ),
     1694                        casacore::MPosition::ITRF ) ;
    16951695    //ostringstream oss ;
    16961696    //mp.print( oss ) ;
    16971697    //logsink_->postLocally( LogMessage(oss.str(),LogOrigin(className_,funcName,WHERE)) ) ;
    16981698   
    1699     casa::MeasFrame mf( me, mp ) ;
    1700     casa::MDirection::Types dirtype ;
    1701     casa::Bool b = casa::MDirection::getType( dirtype, dirref ) ;
     1699    casacore::MeasFrame mf( me, mp ) ;
     1700    casacore::MDirection::Types dirtype ;
     1701    casacore::Bool b = casacore::MDirection::getType( dirtype, dirref ) ;
    17021702    if ( b ) {
    1703       casa::MDirection::Convert toj2000( dirtype,
    1704                                          casa::MDirection::Ref( casa::MDirection::J2000, mf ) ) ;
    1705       casa::Vector<casa::Double> cdir = toj2000( dir ).getAngle( "rad" ).getValue() ;
     1703      casacore::MDirection::Convert toj2000( dirtype,
     1704                                         casacore::MDirection::Ref( casacore::MDirection::J2000, mf ) ) ;
     1705      casacore::Vector<casacore::Double> cdir = toj2000( dir ).getAngle( "rad" ).getValue() ;
    17061706      //logsink_->postLocally( LogMessage("cdir = "+String::toString(cdir),LogOrigin(className_,funcName,WHERE)) ) ;
    17071707      newd[0] = (double)(cdir[0]) ;
     
    17191719string OldASDMReader::getFrame()
    17201720{
    1721   casa::String funcName = "getFrame" ;
     1721  casacore::String funcName = "getFrame" ;
    17221722 
    17231723  // default is TOPO
     
    17481748int OldASDMReader::getNumIFs()
    17491749{
    1750   casa::String funcName = "getNumIFs" ;
     1750  casacore::String funcName = "getNumIFs" ;
    17511751
    17521752  int nif = 0 ;
  • trunk/external-alma/oldasdm2ASAP/OldASDMReader.h

    r2301 r3106  
    3131   * @return boolean status (true or false)
    3232   **/
    33   bool open( const std::string &filename, const casa::Record &rec ) ;
     33  bool open( const std::string &filename, const casacore::Record &rec ) ;
    3434
    3535  /**
     
    4646   * get antenna id
    4747   **/
    48   casa::Int getAntennaId() { return antennaId_ ; } ;
     48  casacore::Int getAntennaId() { return antennaId_ ; } ;
    4949
    5050  /**
    5151   * get antenna name
    5252   **/
    53   casa::String getAntennaName() { return antennaName_ ; } ;
     53  casacore::String getAntennaName() { return antennaName_ ; } ;
    5454
    5555  /**
     
    7474   * @param poltype polarization type
    7575   **/
    76   void fillHeader( casa::Int &nchan,
    77                    casa::Int &npol,
    78                    casa::Int &nif,
    79                    casa::Int &nbeam,
    80                    casa::String &observer,
    81                    casa::String &project,
    82                    casa::String &obstype,
    83                    casa::String &antennaname,
    84                    casa::Vector<casa::Double> &antennaposition,
    85                    casa::Float &equinox,
    86                    casa::String &freqref,
    87                    casa::Double &reffreq,
    88                    casa::Double &bandwidth,
    89                    casa::Double &utc,
    90                    casa::String &fluxunit,
    91                    casa::String &epoch,
    92                    casa::String &poltype ) ; 
     76  void fillHeader( casacore::Int &nchan,
     77                   casacore::Int &npol,
     78                   casacore::Int &nif,
     79                   casacore::Int &nbeam,
     80                   casacore::String &observer,
     81                   casacore::String &project,
     82                   casacore::String &obstype,
     83                   casacore::String &antennaname,
     84                   casacore::Vector<casacore::Double> &antennaposition,
     85                   casacore::Float &equinox,
     86                   casacore::String &freqref,
     87                   casacore::Double &reffreq,
     88                   casacore::Double &bandwidth,
     89                   casacore::Double &utc,
     90                   casacore::String &fluxunit,
     91                   casacore::String &epoch,
     92                   casacore::String &poltype ) ; 
    9393
    9494  /**
     
    100100   * @return list of valid configDescriptionId
    101101   **/
    102   casa::Vector<casa::uInt> getConfigDescriptionIdList() { return configDescIdList_ ; } ;
     102  casacore::Vector<casacore::uInt> getConfigDescriptionIdList() { return configDescIdList_ ; } ;
    103103
    104104  /**
    105105   * get list of fieldId
    106106   *
    107    * @return list of fieldId as casa::uInt
    108    **/
    109   casa::Vector<casa::uInt> getFieldIdList() ;
     107   * @return list of fieldId as casacore::uInt
     108   **/
     109  casacore::Vector<casacore::uInt> getFieldIdList() ;
    110110
    111111  /**
     
    114114   * @return number of rows in Main table
    115115   **/
    116   casa::uInt getNumMainRow() ;
     116  casacore::uInt getNumMainRow() ;
    117117
    118118  /**
     
    128128   * @param fieldId
    129129   **/
    130   casa::Bool setMainRow( casa::uInt configDescId, casa::uInt fieldId ) ;
     130  casacore::Bool setMainRow( casacore::uInt configDescId, casacore::uInt fieldId ) ;
    131131
    132132  /**
     
    136136   * @return boolean indicating the row is valid or not
    137137   **/
    138   casa::Bool setMainRow( casa::uInt irow ) ;
     138  casacore::Bool setMainRow( casacore::uInt irow ) ;
    139139
    140140  /**
     
    174174   * @return IF number
    175175   **/
    176   casa::uInt getIFNo( unsigned int idx ) ;
    177   casa::uInt getIFNo() ;
     176  casacore::uInt getIFNo( unsigned int idx ) ;
     177  casacore::uInt getIFNo() ;
    178178
    179179  /**
     
    380380   * @return boolean status
    381381   **/
    382   casa::Bool setData() ;
     382  casacore::Bool setData() ;
    383383
    384384  /**
     
    401401   * @param logger (LogSinkInterface)
    402402   **/
    403   void setLogger( casa::CountedPtr<casa::LogSinkInterface> &logsink ) ;
     403  void setLogger( casacore::CountedPtr<casacore::LogSinkInterface> &logsink ) ;
    404404
    405405
     
    490490                double &el,
    491491                double &mjd,
    492                 casa::Vector<casa::Quantity> &antpos ) ;
     492                casacore::Vector<casacore::Quantity> &antpos ) ;
    493493
    494494  /**
     
    502502  **/
    503503  std::vector<double> toJ2000( std::vector<double> &dir,
    504                                casa::String &dirref,
     504                               casacore::String &dirref,
    505505                               double &mjd,
    506                                casa::Vector<casa::Quantity> &antpos ) ;
     506                               casacore::Vector<casacore::Quantity> &antpos ) ;
    507507  /**
    508508   * get nIF
     
    569569  const sdmbin::VMSData *vmsData_ ;
    570570 
    571   casa::Int antennaId_ ; // antenna id
    572   casa::String antennaName_ ; // antenna name
    573   casa::String stationName_ ; // station name
    574   casa::Vector<casa::Quantity> antennaPosition_ ; // antenna position
    575   casa::Vector<casa::uInt> configDescIdList_ ; // list of valid configDescriptionId
    576   casa::Vector<casa::uInt> feedIdList_ ; // list of valid feedId
    577   casa::Vector<casa::uInt> fieldIdList_ ; // list of fieldId
    578   casa::Int row_ ; // current row index
    579   map<asdm::Tag,casa::uInt> ifno_ ; // list of IFNO for each SpectralWindow rows
     571  casacore::Int antennaId_ ; // antenna id
     572  casacore::String antennaName_ ; // antenna name
     573  casacore::String stationName_ ; // station name
     574  casacore::Vector<casacore::Quantity> antennaPosition_ ; // antenna position
     575  casacore::Vector<casacore::uInt> configDescIdList_ ; // list of valid configDescriptionId
     576  casacore::Vector<casacore::uInt> feedIdList_ ; // list of valid feedId
     577  casacore::Vector<casacore::uInt> fieldIdList_ ; // list of fieldId
     578  casacore::Int row_ ; // current row index
     579  map<asdm::Tag,casacore::uInt> ifno_ ; // list of IFNO for each SpectralWindow rows
    580580  unsigned int numData_ ; // number of valid data in vmsData_ where v_antennaId equals antennaId_
    581581  vector<unsigned int> dataIdList_ ; // list of valid data indexes in vmsData_ 
     
    587587  EnumSet<TimeSamplingMod::TimeSampling> timeSampling_ ; // time sampling
    588588  EnumSet<SpectralResolutionTypeMod::SpectralResolutionType> resolutionType_ ; // spectral resolution type
    589   casa::CountedPtr<casa::LogSinkInterface> logsink_ ; // Logger
    590   casa::String className_ ;
     589  casacore::CountedPtr<casacore::LogSinkInterface> logsink_ ; // Logger
     590  casacore::String className_ ;
    591591  unsigned int dataIndex_ ;
    592592
    593593  // Tables/Rows for ASDM
    594   casa::Vector<asdm::MainRow *> mainRow_ ; // list of pointers to all Main rows
     594  casacore::Vector<asdm::MainRow *> mainRow_ ; // list of pointers to all Main rows
    595595  //asdm::AntennaRow *antennaRow_p ; // pointer to target Antenna row
    596596  //asdm::StationRow *stationRow_p ; // pointer to target Station row that target antenna is located
  • trunk/src/Accelerator.h

    r3084 r3106  
    1919namespace asap {
    2020
    21 using namespace casa;
     21using namespace casacore;
    2222
    2323class TableExprPredicate {
  • trunk/src/AsapLogSink.cpp

    r3070 r3106  
    1616#include "AsapLogSink.h"
    1717
    18 using namespace casa;
     18using namespace casacore;
    1919
    2020namespace asap {
  • trunk/src/AsapLogSink.h

    r1859 r3106  
    1818namespace asap {
    1919/**
    20   * This class provides the a casa::LogSink implementation for asap
     20  * This class provides the a casacore::LogSink implementation for asap
    2121  * It should be used to catch all casa logMessage and replace the globalSink.
    2222  * It provides an overloaded postLocally which accepts strings so it can also
     
    2727  * @version
    2828  */
    29 class AsapLogSink : public casa::MemoryLogSink {
     29class AsapLogSink : public casacore::MemoryLogSink {
    3030public:
    3131  /**
  • trunk/src/BufferedLinearInterpolator1D.tcc

    r2756 r3106  
    4747{
    4848  //assert(this->isready());
    49   assert_<casa::AipsError>(this->isready(), "object is not ready to process.");
     49  assert_<casacore::AipsError>(this->isready(), "object is not ready to process.");
    5050  if (this->n_ == 1)
    5151    return this->y_[0];
  • trunk/src/CalibrationHelper.h

    r3072 r3106  
    1111#include "STSelector.h"
    1212
    13 using namespace casa;
     13using namespace casacore;
    1414using namespace asap;
    1515
  • trunk/src/CalibrationManager.cpp

    r3085 r3106  
    3030
    3131
    32 using namespace casa;
     32using namespace casacore;
    3333using namespace std;
    3434
  • trunk/src/CalibrationManager.h

    r3085 r3106  
    5353  void setFrequencyInterpolation(const std::string &interp, int order=-1);
    5454  void setTsysSpw(const std::vector<int> &spwlist);
    55   void setTsysSpwWithRange(const casa::Record &spwlist, bool average=false);
     55  void setTsysSpwWithRange(const casacore::Record &spwlist, bool average=false);
    5656  void setTsysTransfer(unsigned int from,
    5757                       const std::vector<unsigned int> &to);
    58   void setCalibrationOptions(const casa::Record &options) {options_ = options;}
     58  void setCalibrationOptions(const casacore::Record &options) {options_ = options;}
    5959  void resetCalSetup();
    6060  void reset();
     
    6767  STCalEnum::InterpolationType stringToInterpolationEnum(const std::string &s);
    6868
    69   casa::Bool isAlmaAntenna();
     69  casacore::Bool isAlmaAntenna();
    7070
    71   casa::CountedPtr<STApplyCal> applicator_;
     71  casacore::CountedPtr<STApplyCal> applicator_;
    7272
    73   std::vector<casa::CountedPtr<STApplyTable> > skytables_;
    74   std::vector<casa::CountedPtr<STApplyTable> > tsystables_;
     73  std::vector<casacore::CountedPtr<STApplyTable> > skytables_;
     74  std::vector<casacore::CountedPtr<STApplyTable> > tsystables_;
    7575
    76   casa::CountedPtr<Scantable> target_;
     76  casacore::CountedPtr<Scantable> target_;
    7777
    78   casa::String calmode_;
     78  casacore::String calmode_;
    7979  std::vector<int> spwlist_;
    80   casa::Record spwlist_withrange_;
     80  casacore::Record spwlist_withrange_;
    8181  bool do_average_;
    8282
    83   casa::LogIO os_;
     83  casacore::LogIO os_;
    8484
    85   casa::Record options_;
     85  casacore::Record options_;
    8686};
    8787
  • trunk/src/CalibrationManagerWrapper.h

    r3046 r3106  
    7878    calibrationManagerImpl_.setTsysSpw(spwlist);
    7979  }
    80   void setTsysSpwWithRange(const casa::Record &spwlist, bool average=false)
     80  void setTsysSpwWithRange(const casacore::Record &spwlist, bool average=false)
    8181  {
    8282    calibrationManagerImpl_.setTsysSpwWithRange(spwlist, average);
     
    8787    calibrationManagerImpl_.setTsysTransfer(from, to);
    8888  }
    89   void setCalibrationOptions(const casa::Record &options)
     89  void setCalibrationOptions(const casacore::Record &options)
    9090  {
    9191    calibrationManagerImpl_.setCalibrationOptions(options);
  • trunk/src/Calibrator.cpp

    r2756 r3106  
    1818#include "Calibrator.h"
    1919
    20 using namespace casa;
     20using namespace casacore;
    2121
    2222namespace asap {
  • trunk/src/Calibrator.h

    r2720 r3106  
    3333  virtual ~Calibrator();
    3434
    35   void setSource(casa::Vector<casa::Float> &v);
    36   void setReference(casa::Vector<casa::Float> &v);
    37   void setReference2(casa::Vector<casa::Float> &v);
    38   void setScaler(casa::Vector<casa::Float> &v);
     35  void setSource(casacore::Vector<casacore::Float> &v);
     36  void setReference(casacore::Vector<casacore::Float> &v);
     37  void setReference2(casacore::Vector<casacore::Float> &v);
     38  void setScaler(casacore::Vector<casacore::Float> &v);
    3939
    40   const casa::Vector<casa::Float> getCalibrated();
     40  const casacore::Vector<casacore::Float> getCalibrated();
    4141
    4242  virtual void calibrate() = 0;
     
    4545  void initStorage();
    4646  void freeStorage();
    47   void set(casa::Float *p, casa::Vector<casa::Float> &v);
     47  void set(casacore::Float *p, casacore::Vector<casacore::Float> &v);
    4848
    4949  unsigned int nchan_;
    5050  unsigned int nchanS_;
    5151
    52   casa::Float *source_;
    53   casa::Float *ref_;
    54   casa::Float *ref2_;
    55   casa::Float *scaler_;
    56   casa::Float *calibrated_;
     52  casacore::Float *source_;
     53  casacore::Float *ref_;
     54  casacore::Float *ref2_;
     55  casacore::Float *scaler_;
     56  casacore::Float *calibrated_;
    5757};
    5858
  • trunk/src/CubicSplineInterpolator1D.tcc

    r2850 r3106  
    6262{
    6363  //assert(this->isready());
    64   assert_<casa::AipsError>(this->isready(), "object is not ready to process.");
     64  assert_<casacore::AipsError>(this->isready(), "object is not ready to process.");
    6565  if (this->n_ == 1)
    6666    return this->y_[0];
  • trunk/src/EdgeDetector.cpp

    r2983 r3106  
    1515
    1616using namespace std ;
    17 using namespace casa ;
     17using namespace casacore ;
    1818
    1919namespace asap {
  • trunk/src/EdgeDetector.h

    r2613 r3106  
    2626  virtual ~EdgeDetector() ;
    2727
    28   void setDirection( const casa::Matrix<casa::Double> &dir ) ;
    29   void setTime( const casa::Vector<casa::Double> &t ) ;
    30   void setOption( const casa::Record &option ) ;
    31   virtual casa::Vector<casa::uInt> detect() = 0 ;
     28  void setDirection( const casacore::Matrix<casacore::Double> &dir ) ;
     29  void setTime( const casacore::Vector<casacore::Double> &t ) ;
     30  void setOption( const casacore::Record &option ) ;
     31  virtual casacore::Vector<casacore::uInt> detect() = 0 ;
    3232
    3333protected:
    34   virtual void parseOption( const casa::Record &option ) = 0 ;
    35   casa::Vector<casa::uInt> vectorFromTempStorage( const casa::uInt &n ) ;
     34  virtual void parseOption( const casacore::Record &option ) = 0 ;
     35  casacore::Vector<casacore::uInt> vectorFromTempStorage( const casacore::uInt &n ) ;
    3636  void initDetect() ;
    3737
    3838  // input data
    39   casa::Matrix<casa::Double> dir_ ;
    40   casa::Vector<casa::Double> time_ ;
     39  casacore::Matrix<casacore::Double> dir_ ;
     40  casacore::Vector<casacore::Double> time_ ;
    4141
    4242  // output data: list of indexes for OFF positions
    43   casa::Vector<casa::uInt> off_ ;
     43  casacore::Vector<casacore::uInt> off_ ;
    4444 
    4545  // temporary memory storage
    46   casa::Block<casa::uInt> tempuInt_ ;
    47   casa::IPosition tempIP_ ;
     46  casacore::Block<casacore::uInt> tempuInt_ ;
     47  casacore::IPosition tempIP_ ;
    4848
    4949  // logging
    50   casa::LogIO os_ ;
     50  casacore::LogIO os_ ;
    5151
    5252private:
    53   void resizeTempArea( const casa::uInt &n ) ;
     53  void resizeTempArea( const casacore::uInt &n ) ;
    5454} ;
    5555
  • trunk/src/EdgeMarker.cpp

    r2916 r3106  
    2525
    2626using namespace std ;
    27 using namespace casa ;
     27using namespace casacore;
    2828
    2929namespace asap {
  • trunk/src/EdgeMarker.h

    r2757 r3106  
    3434  virtual ~EdgeMarker() ;
    3535
    36   void setdata( const casa::CountedPtr<Scantable> &s,
    37                 const casa::Bool &insitu ) ;
     36  void setdata( const casacore::CountedPtr<Scantable> &s,
     37                const casacore::Bool &insitu ) ;
    3838  void examine() ;
    39   void setoption( const casa::Record &option ) ;
     39  void setoption( const casacore::Record &option ) ;
    4040  void detect() ;
    4141  void mark() ;
    42   casa::Block<casa::uInt> getDetectedRows() ;
    43   casa::CountedPtr<Scantable> get() ;
     42  casacore::Block<casacore::uInt> getDetectedRows() ;
     43  casacore::CountedPtr<Scantable> get() ;
    4444//   void reset() ;
    4545
     
    4848
    4949  // data
    50   casa::CountedPtr<Scantable> st_ ;
     50  casacore::CountedPtr<Scantable> st_ ;
    5151
    5252  // pointer to detector object
    53   casa::CountedPtr<EdgeDetector> detector_ ;
     53  casacore::CountedPtr<EdgeDetector> detector_ ;
    5454 
    5555  // list of IFNO for WVR
    56   casa::Vector<casa::uInt> wvr_ ;
     56  casacore::Vector<casacore::uInt> wvr_ ;
    5757
    5858  // off position list
    59   casa::Block<casa::uInt> off_ ;
    60   casa::uInt noff_ ;
     59  casacore::Block<casacore::uInt> off_ ;
     60  casacore::uInt noff_ ;
    6161
    6262  // logger
    63   casa::LogIO os_ ;
     63  casacore::LogIO os_ ;
    6464} ;
    6565
  • trunk/src/EdgeMarkerWrapper.h

    r2613 r3106  
    3737                const bool &insitu )
    3838  {
    39     EdgeMarker::setdata( s.getCP(), (casa::Bool)insitu ) ;
     39    EdgeMarker::setdata( s.getCP(), (casacore::Bool)insitu ) ;
    4040  }
    4141
    4242  ScantableWrapper get()
    4343  {
    44     casa::CountedPtr<Scantable> s = EdgeMarker::get() ;
     44    casacore::CountedPtr<Scantable> s = EdgeMarker::get() ;
    4545    return ScantableWrapper( s ) ;
    4646  }
  • trunk/src/FillerBase.cpp

    r3084 r3106  
    1616#include "FillerBase.h"
    1717
    18 using namespace casa;
     18using namespace casacore;
    1919
    2020namespace asap {
    2121
    22 FillerBase::FillerBase(casa::CountedPtr<Scantable> stable) :
     22FillerBase::FillerBase(casacore::CountedPtr<Scantable> stable) :
    2323  table_(stable)
    2424{
     
    281281      TableRow row( tab ) ;
    282282      TableRecord &rec = row.record() ;
    283       RecordFieldPtr<casa::uInt> rfpi ;
     283      RecordFieldPtr<casacore::uInt> rfpi ;
    284284      rfpi.attachToRecord( rec, "ID" ) ;
    285285      *rfpi = (uInt)nrow ;
    286       RecordFieldPtr<casa::Float> rfp ;
     286      RecordFieldPtr<casacore::Float> rfp ;
    287287      rfp.attachToRecord( rec, "TEMPERATURE" ) ;
    288288      *rfp = temperature ;
  • trunk/src/FillerBase.h

    r2289 r3106  
    4141{
    4242  public:
    43     explicit FillerBase(casa::CountedPtr<Scantable> stable);
     43    explicit FillerBase(casacore::CountedPtr<Scantable> stable);
    4444    virtual ~FillerBase() {;}
    4545
    46     virtual bool open(const std::string& filename, const casa::Record& rec) = 0;
     46    virtual bool open(const std::string& filename, const casacore::Record& rec) = 0;
    4747    //    virtual bool open(const std::string& filename) = 0;
    4848    virtual void fill() = 0;
     
    5656    void commitRow();
    5757    void setHeader(const STHeader& header);
    58     void setSpectrum(const casa::Vector<casa::Float>& spectrum,
    59                              const casa::Vector<casa::uChar>& flags,
    60                              const casa::Vector<casa::Float>& tsys);
    61     void setFlagrow(casa::uInt flag);
    62     void setOpacity(casa::Float opacity=0.0f);
    63     void setIndex(casa::uInt scanno, casa::uInt cycleno,
    64                           casa::uInt ifno, casa::uInt polno,
    65                           casa::uInt beamno=0);
    66     void setFrequency(casa::Double refpix, casa::Double refval,
    67                               casa::Double incr);
    68     void setMolecule(const casa::Vector<casa::Double>& restfreq);
    69     void setDirection(const casa::Vector<casa::Double>& dir,
    70                               casa::Float az=0.0f, casa::Float el=0.0f);
     58    void setSpectrum(const casacore::Vector<casacore::Float>& spectrum,
     59                             const casacore::Vector<casacore::uChar>& flags,
     60                             const casacore::Vector<casacore::Float>& tsys);
     61    void setFlagrow(casacore::uInt flag);
     62    void setOpacity(casacore::Float opacity=0.0f);
     63    void setIndex(casacore::uInt scanno, casacore::uInt cycleno,
     64                          casacore::uInt ifno, casacore::uInt polno,
     65                          casacore::uInt beamno=0);
     66    void setFrequency(casacore::Double refpix, casacore::Double refval,
     67                              casacore::Double incr);
     68    void setMolecule(const casacore::Vector<casacore::Double>& restfreq);
     69    void setDirection(const casacore::Vector<casacore::Double>& dir,
     70                              casacore::Float az=0.0f, casacore::Float el=0.0f);
    7171
    72     void setFocus(casa::Float pa=0.0f, casa::Float faxis=0.0f,
    73                           casa::Float ftan=0.0f, casa::Float frot=0.0f);
    74     void setTime(casa::Double mjd, casa::Double integration);
    75     void setWeather(casa::Float temperature=0.0f,
    76                             casa::Float pressure=0.0f,
    77                             casa::Float humidity=0.0f,
    78                             casa::Float windspeed=0.0f,
    79                             casa::Float windaz=0.0f);
    80     void setWeather2(casa::Float temperature=0.0f,
    81                             casa::Float pressure=0.0f,
    82                             casa::Float humidity=0.0f,
    83                             casa::Float windspeed=0.0f,
    84                             casa::Float windaz=0.0f);
    85     void setTcal(const casa::String& caltime="",
    86                          const casa::Vector<casa::Float>& tcal=casa::Vector<casa::Float>());
    87     void setTcal2(const casa::String& caltime="",
    88                          const casa::Vector<casa::Float>& tcal=casa::Vector<casa::Float>());
    89     void setScanRate(const casa::Vector<casa::Double>& srate=casa::Vector<casa::Double>());
    90     void setReferenceBeam(casa::Int beamno=-1);
    91     void setSource(const std::string& name, casa::Int type,
     72    void setFocus(casacore::Float pa=0.0f, casacore::Float faxis=0.0f,
     73                          casacore::Float ftan=0.0f, casacore::Float frot=0.0f);
     74    void setTime(casacore::Double mjd, casacore::Double integration);
     75    void setWeather(casacore::Float temperature=0.0f,
     76                            casacore::Float pressure=0.0f,
     77                            casacore::Float humidity=0.0f,
     78                            casacore::Float windspeed=0.0f,
     79                            casacore::Float windaz=0.0f);
     80    void setWeather2(casacore::Float temperature=0.0f,
     81                            casacore::Float pressure=0.0f,
     82                            casacore::Float humidity=0.0f,
     83                            casacore::Float windspeed=0.0f,
     84                            casacore::Float windaz=0.0f);
     85    void setTcal(const casacore::String& caltime="",
     86                         const casacore::Vector<casacore::Float>& tcal=casacore::Vector<casacore::Float>());
     87    void setTcal2(const casacore::String& caltime="",
     88                         const casacore::Vector<casacore::Float>& tcal=casacore::Vector<casacore::Float>());
     89    void setScanRate(const casacore::Vector<casacore::Double>& srate=casacore::Vector<casacore::Double>());
     90    void setReferenceBeam(casacore::Int beamno=-1);
     91    void setSource(const std::string& name, casacore::Int type,
    9292                           const std::string& fieldname="",
    93                            const casa::Vector<casa::Double>& dir=casa::Vector<casa::Double>(),
    94                            const casa::Vector<casa::Double>& propermot=casa::Vector<casa::Double>(),
    95                            casa::Double velocity=0.0);
     93                           const casacore::Vector<casacore::Double>& dir=casacore::Vector<casacore::Double>(),
     94                           const casacore::Vector<casacore::Double>& propermot=casacore::Vector<casacore::Double>(),
     95                           casacore::Double velocity=0.0);
    9696
    97     casa::CountedPtr< Scantable > table_;
     97    casacore::CountedPtr< Scantable > table_;
    9898
    9999  private:
     
    102102    FillerBase(const FillerBase&);
    103103    FillerBase& operator=(const FillerBase&);
    104     casa::String referenceRx_;
    105     casa::TableRow row_;
     104    casacore::String referenceRx_;
     105    casacore::TableRow row_;
    106106 
    107     std::vector< casa::Vector<casa::Double> > mEntry_ ;
    108     std::vector<casa::uInt> mIdx_ ;
    109     std::vector< casa::Vector<casa::Double> > fEntry_ ;
    110     std::vector<casa::uInt> fIdx_ ;
    111     std::vector< casa::Vector<casa::Float> > wEntry_ ;
    112     std::vector<casa::uInt> wIdx_ ;
     107    std::vector< casacore::Vector<casacore::Double> > mEntry_ ;
     108    std::vector<casacore::uInt> mIdx_ ;
     109    std::vector< casacore::Vector<casacore::Double> > fEntry_ ;
     110    std::vector<casacore::uInt> fIdx_ ;
     111    std::vector< casacore::Vector<casacore::Float> > wEntry_ ;
     112    std::vector<casacore::uInt> wIdx_ ;
    113113};
    114114
  • trunk/src/FillerWrapper.h

    r2998 r3106  
    3939
    4040
    41   void open(const std::string& filename, const casa::Record& rec) {
     41  void open(const std::string& filename, const casacore::Record& rec) {
    4242    //  void open(const std::string& filename) {
    43     casa::File file(filename);
     43    casacore::File file(filename);
    4444    if ( !file.exists() ) {
    4545      throw(AipsError("File does not exist"));
     
    6262    filler_ = 0;
    6363    attached_ = false;
    64     throw casa::AipsError("Unknown Data Format");
     64    throw casacore::AipsError("Unknown Data Format");
    6565  }
    6666  void close() {
     
    8888    int pks = 0 ;
    8989    int nro = 1 ;
    90     casa::File file( filename ) ;
     90    casacore::File file( filename ) ;
    9191    if ( file.isDirectory() )
    9292      ret = pks ;
     
    103103      // So, one can distinguish NRO and non-NRO data by examining
    104104      // first keyword name.
    105       if ( casa::String( buf ) == "SIMPLE" ) {
     105      if ( casacore::String( buf ) == "SIMPLE" ) {
    106106        ret = pks ;
    107107      }
     
    117117  FillerWrapper& operator=(const FillerWrapper&);
    118118
    119   casa::CountedPtr<FillerBase> filler_;
     119  casacore::CountedPtr<FillerBase> filler_;
    120120  bool attached_;
    121   casa::CountedPtr<Scantable> stable_;
     121  casacore::CountedPtr<Scantable> stable_;
    122122};
    123123
  • trunk/src/GenericEdgeDetector.cpp

    r3041 r3106  
    2525
    2626using namespace std ;
    27 using namespace casa ;
     27using namespace casacore ;
    2828
    2929namespace asap {
  • trunk/src/GenericEdgeDetector.h

    r2639 r3106  
    2626  virtual ~GenericEdgeDetector() ;
    2727
    28   casa::Vector<casa::uInt> detect() ;
     28  casacore::Vector<casacore::uInt> detect() ;
    2929
    3030private:
    3131  // parse options
    32   void parseOption( const casa::Record &option ) ;
     32  void parseOption( const casacore::Record &option ) ;
    3333
    3434  // steps for edge detection algorithm
     
    4343  // internal methods
    4444  void setup() ;
    45   casa::uInt _labeling() ;
    46   casa::uInt __labeling( casa::Vector<casa::uInt> &a ) ;
    47   casa::uInt _trimming() ;
    48   casa::uInt _trimming1DX() ;
    49   casa::uInt _trimming1DY() ;
    50   casa::uInt _trimming1D( casa::Vector<casa::uInt> &a ) ;
    51   void _search( casa::uInt &start,
    52                 casa::uInt &end,
    53                 const casa::Vector<casa::uInt> &a ) ;
     45  casacore::uInt _labeling() ;
     46  casacore::uInt __labeling( casacore::Vector<casacore::uInt> &a ) ;
     47  casacore::uInt _trimming() ;
     48  casacore::uInt _trimming1DX() ;
     49  casacore::uInt _trimming1DY() ;
     50  casacore::uInt _trimming1D( casacore::Vector<casacore::uInt> &a ) ;
     51  void _search( casacore::uInt &start,
     52                casacore::uInt &end,
     53                const casacore::Vector<casacore::uInt> &a ) ;
    5454
    5555  // pixel info
    56   casa::Double cenx_ ;
    57   casa::Double ceny_ ;
    58   casa::Double pcenx_ ;
    59   casa::Double pceny_ ;
    60   casa::uInt nx_ ;
    61   casa::uInt ny_ ;
    62   casa::Double dx_ ;
    63   casa::Double dy_ ;
     56  casacore::Double cenx_ ;
     57  casacore::Double ceny_ ;
     58  casacore::Double pcenx_ ;
     59  casacore::Double pceny_ ;
     60  casacore::uInt nx_ ;
     61  casacore::uInt ny_ ;
     62  casacore::Double dx_ ;
     63  casacore::Double dy_ ;
    6464 
    6565  // storage for detection
    66   casa::Matrix<casa::Double> pdir_ ;
    67   casa::Matrix<casa::uInt> apix_ ;
     66  casacore::Matrix<casacore::Double> pdir_ ;
     67  casacore::Matrix<casacore::uInt> apix_ ;
    6868
    6969  // options
    70   casa::Float width_ ;
    71   casa::Float fraction_ ;
    72   casa::Bool elongated_ ;
     70  casacore::Float width_ ;
     71  casacore::Float fraction_ ;
     72  casacore::Bool elongated_ ;
    7373} ;
    7474
  • trunk/src/Interpolator1D.tcc

    r2756 r3106  
    2020#include "BisectionLocator.h"
    2121#include "HuntLocator.h"
    22 
    23 using namespace casa;
    2422
    2523namespace asap {
     
    5452{
    5553  //assert(n_ == 0 || n_ == n);
    56   casa::assert_<casa::AipsError>(n_ == 0 || n_ == n, "length mismatch in data.");
     54  casacore::assert_<casacore::AipsError>(n_ == 0 || n_ == n, "length mismatch in data.");
    5755  x_ = x;
    5856  n_ = n;
     
    6563{
    6664  //assert(n_ == 0 || n_ == n);
    67   casa::assert_<casa::AipsError>(n_ == 0 || n_ == n, "length mismatch in data.");
     65  casacore::assert_<casacore::AipsError>(n_ == 0 || n_ == n, "length mismatch in data.");
    6866  y_ = y;
    6967  n_ = n;
  • trunk/src/LineCatalog.cpp

    r3084 r3106  
    2828#include "LineCatalog.h"
    2929
    30 using namespace casa;
     30using namespace casacore;
    3131
    3232namespace asap
  • trunk/src/LineCatalog.h

    r1534 r3106  
    107107   * @param lmax the upper limit
    108108   * @param colname the columd to apply the limits to
    109    * @return a new casa::Table
     109   * @return a new casacore::Table
    110110   */
    111   casa::Table setLimits(double lmin, double lmax, const std::string& colname);
     111  casacore::Table setLimits(double lmin, double lmax, const std::string& colname);
    112112
    113113  double getDouble(const std::string& colname, uint row) const;
    114114
    115115  // the table with seelection
    116   casa::Table table_;
     116  casacore::Table table_;
    117117  // the pristine table
    118   casa::Table baseTable_;
     118  casacore::Table baseTable_;
    119119};
    120120
  • trunk/src/MSFiller.cpp

    r3100 r3106  
    5656#include "MathUtils.h"
    5757
    58 using namespace casa ;
     58using namespace casacore;
    5959using namespace std ;
    6060
     
    15821582};
    15831583
    1584 MSFiller::MSFiller( casa::CountedPtr<Scantable> stable )
     1584MSFiller::MSFiller( casacore::CountedPtr<Scantable> stable )
    15851585  : table_( stable ),
    15861586    tablename_( "" ),
     
    16091609}
    16101610
    1611 bool MSFiller::open( const std::string &filename, const casa::Record &rec )
     1611bool MSFiller::open( const std::string &filename, const casacore::Record &rec )
    16121612{
    16131613  os_.origin( LogOrigin( "MSFiller", "open()", WHERE ) ) ;
  • trunk/src/MSFiller.h

    r2754 r3106  
    4545#include "MathUtils.h"
    4646
    47 using namespace casa;
     47using namespace casacore;
    4848
    4949namespace asap
  • trunk/src/MSFillerWrapper.h

    r3071 r3106  
    3939  virtual ~MSFillerWrapper() { close() ; }
    4040
    41   void open(const std::string& filename, const casa::Record& rec)
     41  void open(const std::string& filename, const casacore::Record& rec)
    4242  {
    43     casa::File file( filename ) ;
     43    casacore::File file( filename ) ;
    4444    if ( !file.exists() ) {
    45       throw casa::AipsError( "File does not exist" ) ;
     45      throw casacore::AipsError( "File does not exist" ) ;
    4646    }
    4747    filler_ = new MSFiller( stable_ ) ;
     
    5151    }
    5252    else {
    53       throw casa::AipsError( "Failed to open file" ) ;
     53      throw casacore::AipsError( "Failed to open file" ) ;
    5454    }
    5555  }
     
    8282  MSFillerWrapper& operator=(const MSFillerWrapper&) ;
    8383
    84   casa::CountedPtr<MSFiller> filler_ ;
     84  casacore::CountedPtr<MSFiller> filler_ ;
    8585  bool attached_ ;
    86   casa::CountedPtr<Scantable> stable_ ;
     86  casacore::CountedPtr<Scantable> stable_ ;
    8787};
    8888
  • trunk/src/MSWriter.cpp

    r3089 r3106  
    4444#include "TableTraverse.h"
    4545
    46 using namespace casa ;
     46using namespace casacore;
    4747using namespace std ;
    4848
  • trunk/src/MSWriter.h

    r2309 r3106  
    6262{
    6363public:
    64   explicit MSWriter(casa::CountedPtr<Scantable> stable) ;
     64  explicit MSWriter(casacore::CountedPtr<Scantable> stable) ;
    6565  virtual ~MSWriter() ;
    6666 
    67   virtual bool write(const std::string& filename, const casa::Record& rec) ;
     67  virtual bool write(const std::string& filename, const casacore::Record& rec) ;
    6868 
    6969protected:
     
    8787
    8888  // utility
    89   void getValidTimeRange( casa::Double &me, casa::Double &interval, casa::Table &tab ) ;
    90   void getValidTimeRange( casa::Double &me, casa::Double &interval, casa::Vector<casa::Double> &atime, casa::Vector<casa::Double> &ainterval ) ;
    91   void antennaProperty( casa::String &name, casa::String &mount, casa::String &type, casa::Double &diameter ) ;
     89  void getValidTimeRange( casacore::Double &me, casacore::Double &interval, casacore::Table &tab ) ;
     90  void getValidTimeRange( casacore::Double &me, casacore::Double &interval, casacore::Vector<casacore::Double> &atime, casacore::Vector<casacore::Double> &ainterval ) ;
     91  void antennaProperty( casacore::String &name, casacore::String &mount, casacore::String &type, casacore::Double &diameter ) ;
    9292
    93   casa::CountedPtr<Scantable> table_ ;
     93  casacore::CountedPtr<Scantable> table_ ;
    9494  STHeader header_ ;
    95   casa::MeasurementSet *mstable_ ;
     95  casacore::MeasurementSet *mstable_ ;
    9696
    97   casa::Bool isWeather_ ;
     97  casacore::Bool isWeather_ ;
    9898
    99   casa::Bool useFloatData_ ;
    100   casa::Bool useData_ ;
    101   casa::Bool tcalSpec_ ;
    102   casa::Bool tsysSpec_ ;
     99  casacore::Bool useFloatData_ ;
     100  casacore::Bool useData_ ;
     101  casacore::Bool tcalSpec_ ;
     102  casacore::Bool tsysSpec_ ;
    103103
    104   casa::String ptTabName_ ;
     104  casacore::String ptTabName_ ;
    105105
    106   casa::String polType_ ;
     106  casacore::String polType_ ;
    107107
    108   casa::String filename_ ;
     108  casacore::String filename_ ;
    109109
    110   casa::LogIO os_ ;
     110  casacore::LogIO os_ ;
    111111
    112   casa::Record srcRec_ ;
     112  casacore::Record srcRec_ ;
    113113 
    114114  MSWriter();
  • trunk/src/MSWriterWrapper.h

    r3046 r3106  
    3838  virtual ~MSWriterWrapper() {}
    3939
    40   void write(const std::string& filename, const casa::Record& rec)
     40  void write(const std::string& filename, const casacore::Record& rec)
    4141  {
    4242    GILHandler scopedRelease;
    4343
    44     casa::File file( filename ) ;
     44    casacore::File file( filename ) ;
    4545    writer_ = new MSWriter( stable_ ) ;
    4646    if ( writer_->write( filename, rec ) ) {
     
    4848    }
    4949    else {
    50       throw casa::AipsError( "Failed to write data" ) ;
     50      throw casacore::AipsError( "Failed to write data" ) ;
    5151    }
    5252  }
     
    5858  MSWriterWrapper& operator=(const MSWriterWrapper&) ;
    5959
    60   casa::CountedPtr<MSWriter> writer_ ;
    61   casa::CountedPtr<Scantable> stable_ ;
     60  casacore::CountedPtr<MSWriter> writer_ ;
     61  casacore::CountedPtr<Scantable> stable_ ;
    6262};
    6363
  • trunk/src/MathUtils.cpp

    r2670 r3106  
    4949#include "MathUtils.h"
    5050
    51 using namespace casa;
     51using namespace casacore;
    5252
    5353float mathutil::statistics(const String& which,
     
    251251}
    252252
    253 void mathutil::doZeroOrderInterpolation(casa::Vector<casa::Float>& data,
     253void mathutil::doZeroOrderInterpolation(casacore::Vector<casacore::Float>& data,
    254254                                        std::vector<bool>& mask) {
    255255  int fstart = -1;
  • trunk/src/MathUtils.h

    r2619 r3106  
    5151 * @param ignoreOther drop every second channel (NYI)
    5252 */
    53 void hanning(casa::Vector<casa::Float>& out,
    54              casa::Vector<casa::Bool>& outmask,
    55              const casa::Vector<casa::Float>& in,
    56              const casa::Vector<casa::Bool>& mask,
    57              casa::Bool relaxed=casa::False,
    58              casa::Bool ignoreOther=casa::False);
     53void hanning(casacore::Vector<casacore::Float>& out,
     54             casacore::Vector<casacore::Bool>& outmask,
     55             const casacore::Vector<casacore::Float>& in,
     56             const casacore::Vector<casacore::Bool>& mask,
     57             casacore::Bool relaxed=casacore::False,
     58             casacore::Bool ignoreOther=casacore::False);
    5959
    6060/**
     
    6868 * @param hwidth half-width of the smoothing window
    6969 */
    70 void runningMedian(casa::Vector<casa::Float>& out,
    71                    casa::Vector<casa::Bool>& outflag,
    72                    const casa::Vector<casa::Float>& in,
    73                    const casa::Vector<casa::Bool>& flag,
     70void runningMedian(casacore::Vector<casacore::Float>& out,
     71                   casacore::Vector<casacore::Bool>& outflag,
     72                   const casacore::Vector<casacore::Float>& in,
     73                   const casacore::Vector<casacore::Bool>& flag,
    7474                   float hwidth);
    7575
    76 void polyfit(casa::Vector<casa::Float>& out,
    77              casa::Vector<casa::Bool>& outmask,
    78              const casa::Vector<casa::Float>& in,
    79              const casa::Vector<casa::Bool>& mask,
     76void polyfit(casacore::Vector<casacore::Float>& out,
     77             casacore::Vector<casacore::Bool>& outmask,
     78             const casacore::Vector<casacore::Float>& in,
     79             const casacore::Vector<casacore::Bool>& mask,
    8080             float hwidth, int order);
    8181
    8282// Generate specified statistic
    83 float statistics(const casa::String& which,
    84                  const casa::MaskedArray<casa::Float>& data);
     83float statistics(const casacore::String& which,
     84                 const casacore::MaskedArray<casacore::Float>& data);
    8585
    8686// Return a position of min or max value
    87 casa::IPosition minMaxPos(const casa::String& which,
    88                  const casa::MaskedArray<casa::Float>& data);
     87casacore::IPosition minMaxPos(const casacore::String& which,
     88                 const casacore::MaskedArray<casacore::Float>& data);
    8989
    9090// Replace masked value by zero
    91 void replaceMaskByZero(casa::Vector<casa::Float>& data,
    92                        const casa::Vector<casa::Bool>& mask);
     91void replaceMaskByZero(casacore::Vector<casacore::Float>& data,
     92                       const casacore::Vector<casacore::Bool>& mask);
    9393
    9494/**
     
    9797 * @return a std vector of std strings
    9898 */
    99 std::vector<std::string> tovectorstring(const casa::Vector<casa::String>& in);
     99std::vector<std::string> tovectorstring(const casacore::Vector<casacore::String>& in);
    100100
    101101/**
     
    104104 * @return
    105105 */
    106 casa::Vector<casa::String> toVectorString(const std::vector<std::string>& in);
     106casacore::Vector<casacore::String> toVectorString(const std::vector<std::string>& in);
    107107
    108 void doZeroOrderInterpolation(casa::Vector<casa::Float>& data,
     108void doZeroOrderInterpolation(casacore::Vector<casacore::Float>& data,
    109109                              std::vector<bool>& mask);
    110110
     
    112112 * RA nomalization: n*2pi rotation if necessary
    113113 **/
    114 void rotateRA( const casa::Vector<casa::Double> &in,
    115                casa::Vector<casa::Double> &out ) ;
    116 void rotateRA( casa::Vector<casa::Double> &v ) ;
     114void rotateRA( const casacore::Vector<casacore::Double> &in,
     115               casacore::Vector<casacore::Double> &out ) ;
     116void rotateRA( casacore::Vector<casacore::Double> &v ) ;
    117117
    118118/**
  • trunk/src/NROFiller.cpp

    r2776 r3106  
    2525#include <casa/Logging/LogIO.h>
    2626
    27 using namespace casa;
     27using namespace casacore;
    2828
    2929namespace asap
  • trunk/src/NROFiller.h

    r1904 r3106  
    4242{
    4343  public:
    44     explicit NROFiller(casa::CountedPtr<Scantable> stable);
     44    explicit NROFiller(casacore::CountedPtr<Scantable> stable);
    4545    virtual ~NROFiller();
    4646
    47     bool open(const std::string& filename, const casa::Record& rec) ;
     47    bool open(const std::string& filename, const casacore::Record& rec) ;
    4848    void fill() ;
    4949    void close() ;
     
    5858    // pointer to the reader
    5959    //NROReader *reader_ ;
    60     casa::CountedPtr<NROReader> reader_ ;
     60    casacore::CountedPtr<NROReader> reader_ ;
    6161};
    6262
  • trunk/src/NearestInterpolator1D.tcc

    r2756 r3106  
    1717#include "NearestInterpolator1D.h"
    1818
    19 using namespace casa;
    20 
    2119namespace asap {
    2220
     
    3331{
    3432  //assert(this->isready());
    35   casa::assert_<casa::AipsError>(this->isready(),"object is not ready to process.");
     33  casacore::assert_<casacore::AipsError>(this->isready(),"object is not ready to process.");
    3634  if (this->n_ == 1)
    3735    return this->y_[0];
  • trunk/src/PKSFiller.cpp

    r3075 r3106  
    4444#include "STHeader.h"
    4545
    46 using namespace casa;
     46using namespace casacore;
    4747
    4848namespace asap {
  • trunk/src/PKSFiller.h

    r2163 r3106  
    3232{
    3333  public:
    34     explicit PKSFiller(casa::CountedPtr<Scantable> stable);
     34    explicit PKSFiller(casacore::CountedPtr<Scantable> stable);
    3535    virtual ~PKSFiller();
    3636
    37     bool open(const std::string& filename, const casa::Record& rec);
     37    bool open(const std::string& filename, const casacore::Record& rec);
    3838    //    bool open(const std::string& filename);
    3939    void fill();
     
    4747    PKSFiller& operator=(const PKSFiller&);
    4848
    49     casa::CountedPtr<PKSreader> reader_;
    50     casa::String filename_;
    51     casa::Int nIF_, nBeam_, nPol_, nChan_, nInDataRow;
    52     casa::Vector<casa::Bool> haveXPol_;
     49    casacore::CountedPtr<PKSreader> reader_;
     50    casacore::String filename_;
     51    casacore::Int nIF_, nBeam_, nPol_, nChan_, nInDataRow;
     52    casacore::Vector<casacore::Bool> haveXPol_;
    5353};
    5454
  • trunk/src/PSAlmaCalibrator.cpp

    r2756 r3106  
    1717#include "PSAlmaCalibrator.h"
    1818
    19 using namespace casa;
     19using namespace casacore;
    2020
    2121namespace asap {
  • trunk/src/PlotHelper.cpp

    r3085 r3106  
    3232
    3333using namespace std ;
    34 using namespace casa ;
     34using namespace casacore ;
    3535using namespace asap ;
    3636
  • trunk/src/PlotHelper.h

    r3085 r3106  
    7878private:
    7979  /** Generate temporal coordinate from the DIRECTION column of a scantable**/
    80   casa::DirectionCoordinate getSTCoord(const int nx, const int ny,
    81                                        const casa::Projection::Type ptype);
     80  casacore::DirectionCoordinate getSTCoord(const int nx, const int ny,
     81                                       const casacore::Projection::Type ptype);
    8282
    8383  /** Generation of direction coordinate **/
    84   void setupCoord(const casa::MDirection::Types mdt,
    85                   const casa::Projection::Type pjt,
    86                   const casa::Double centx, const casa::Double centy,
    87                   const casa::Double incx, const casa::Double incy,
    88                   const casa::Double refx, const casa::Double refy);
     84  void setupCoord(const casacore::MDirection::Types mdt,
     85                  const casacore::Projection::Type pjt,
     86                  const casacore::Double centx, const casacore::Double centy,
     87                  const casacore::Double incx, const casacore::Double incy,
     88                  const casacore::Double refx, const casacore::Double refy);
    8989
    90   casa::DirectionCoordinate *dircoord_p;
    91   casa::CountedPtr<Scantable> data_p;
     90  casacore::DirectionCoordinate *dircoord_p;
     91  casacore::CountedPtr<Scantable> data_p;
    9292
    9393};
  • trunk/src/PolynomialInterpolator1D.tcc

    r2756 r3106  
    3535{
    3636  //casa::AlwaysAssert((this->isready()),(casa::AipsError));
    37   casa::assert_<casa::AipsError>(this->isready(), "object is not ready to process.");
     37  casacore::assert_<casacore::AipsError>(this->isready(), "object is not ready to process.");
    3838  if (this->n_ == 1)
    3939    return this->y_[0];
     
    9797        delete[] c;
    9898        delete[] d;
    99         throw casa::AipsError("x_ has duplicate elements");
     99        throw casacore::AipsError("x_ has duplicate elements");
    100100      }
    101101      c[i] = (xa[i] - x) * cd;
  • trunk/src/RasterEdgeDetector.cpp

    r2626 r3106  
    1919
    2020using namespace std ;
    21 using namespace casa ;
     21using namespace casacore ;
    2222
    2323namespace asap {
  • trunk/src/RasterEdgeDetector.h

    r2613 r3106  
    2626  virtual ~RasterEdgeDetector() ;
    2727
    28   casa::Vector<casa::uInt> detect() ;
     28  casacore::Vector<casacore::uInt> detect() ;
    2929
    3030private:
    3131  // parse options
    32   void parseOption( const casa::Record &option ) ;
     32  void parseOption( const casacore::Record &option ) ;
    3333 
    3434  // edge detection algorithm for raster
    3535  void detectGap() ;
    3636  void selection() ;
    37   void selectionPerRow( casa::uInt &idx,
    38                         const casa::uInt &start,
    39                         const casa::uInt &end ) ;
    40   void extractRow( const casa::uInt &irow ) ;
    41   casa::uInt numOff( const casa::uInt &n ) ;
    42   casa::uInt optimumNumber( const casa::uInt &n ) ;
     37  void selectionPerRow( casacore::uInt &idx,
     38                        const casacore::uInt &start,
     39                        const casacore::uInt &end ) ;
     40  void extractRow( const casacore::uInt &irow ) ;
     41  casacore::uInt numOff( const casacore::uInt &n ) ;
     42  casacore::uInt optimumNumber( const casacore::uInt &n ) ;
    4343
    4444  // gap list
    45   casa::Vector<casa::uInt> gaplist_ ;
     45  casacore::Vector<casacore::uInt> gaplist_ ;
    4646
    4747  // options
    48   casa::Float fraction_ ;
    49   casa::Int npts_ ;
     48  casacore::Float fraction_ ;
     49  casacore::Int npts_ ;
    5050} ;
    5151
  • trunk/src/RowAccumulator.cpp

    r3007 r3106  
    1818#include "RowAccumulator.h"
    1919
    20 using namespace casa;
     20using namespace casacore;
    2121using namespace asap;
    2222
  • trunk/src/RowAccumulator.h

    r2580 r3106  
    4646    * @param time the time of the observation
    4747    */
    48   void add(const casa::Vector<casa::Float>& v,
    49            const casa::Vector<casa::Bool>& m,
    50            const casa::Vector<casa::Float>& tsys,
    51            const casa::Double interval,
    52            const casa::Double time);
     48  void add(const casacore::Vector<casacore::Float>& v,
     49           const casacore::Vector<casacore::Bool>& m,
     50           const casacore::Vector<casacore::Float>& tsys,
     51           const casacore::Double interval,
     52           const casacore::Double time);
    5353  /**
    5454    * Also set a user mask which get combined with the individual masks
     
    5656    * @param m a boolean mask of teh same length as the spectrum
    5757    */
    58   void setUserMask(const casa::Vector<casa::Bool>& m);
     58  void setUserMask(const casacore::Vector<casacore::Bool>& m);
    5959  /**
    6060    * Get the spectrum. Applies the normalisation (averaging)
    6161    * @return the spectrum vector
    6262    */
    63   casa::Vector<casa::Float> getSpectrum() const;
     63  casacore::Vector<casacore::Float> getSpectrum() const;
    6464  /**
    6565    * Get the Tsys. Applies the normalisation (averaging)
    6666    * @return the Tsys vector
    6767    */
    68   casa::Vector<casa::Float> getTsys() const;
     68  casacore::Vector<casacore::Float> getTsys() const;
    6969  /**
    7070    * Get the spectrum's mask. Applies the normalisation (averaging)
    7171    * @return the mask vector
    7272    */
    73   casa::Vector<casa::Bool> getMask() const;
     73  casacore::Vector<casacore::Bool> getMask() const;
    7474  /**
    7575    * Get the total interval.
    7676    * @return the integration time
    7777    */
    78   casa::Double getInterval() const;
     78  casacore::Double getInterval() const;
    7979  /**
    8080    * Get the time of the observation. Retrieves the "mean" time.
    8181    * @return the integration time
    8282    */
    83   casa::Double getTime() const;
     83  casacore::Double getTime() const;
    8484  /**
    8585    * Reset the acummulator to the state at construction.
    8686    */
    87   void reset(const casa::uInt size=0, const casa::uInt tsysSize=0);
    88   void initialize(const casa::uInt size, const casa::uInt tsysSize);
     87  void reset(const casacore::uInt size=0, const casacore::uInt tsysSize=0);
     88  void initialize(const casacore::uInt size, const casacore::uInt tsysSize);
    8989  /**
    9090    * check the initialization state
    9191    */
    92   casa::Bool state() const;
     92  casacore::Bool state() const;
    9393  /**
    9494    * replace NaN values with (normal) values at the same channels in the given spetrum.
     
    9898
    9999private:
    100   void addSpectrum(const casa::Vector<casa::Float>& v,
    101                    const casa::Vector<casa::Bool>& m,
    102                    const casa::Vector<casa::Float>& tsys,
    103                    const casa::Double interval,
    104                    const casa::Double time);
    105   void doAddSpectrum(const casa::Vector<casa::Float>& v,
    106                      const casa::Vector<casa::Bool>& m,
    107                      const casa::Vector<casa::Float>& tsys,
    108                      const casa::Double interval,
    109                      const casa::Double time,
    110                      const casa::Bool inverseMask);
    111   void doAddSpectrum2(const casa::Vector<casa::Float>& v,
    112                       const casa::Vector<casa::Bool>& m,
    113                       const casa::Vector<casa::Float>& tsys,
    114                       const casa::Double interval,
    115                       const casa::Double time);
    116   casa::Float getTotalWeight(const casa::MaskedArray<casa::Float>& data,
    117                              const casa::Vector<casa::Float>& tsys,
    118                              const casa::Double interval,
    119                              const casa::Double time,
    120                              const casa::Bool inverseMask);
    121   casa::Float addTsys(const casa::Vector<casa::Float>& v, casa::Bool inverseMask);
    122   casa::Float addInterval(casa::Double inter, casa::Bool inverseMask);
    123   void addTime(casa::Double t, casa::Bool inverseMask);
     100  void addSpectrum(const casacore::Vector<casacore::Float>& v,
     101                   const casacore::Vector<casacore::Bool>& m,
     102                   const casacore::Vector<casacore::Float>& tsys,
     103                   const casacore::Double interval,
     104                   const casacore::Double time);
     105  void doAddSpectrum(const casacore::Vector<casacore::Float>& v,
     106                     const casacore::Vector<casacore::Bool>& m,
     107                     const casacore::Vector<casacore::Float>& tsys,
     108                     const casacore::Double interval,
     109                     const casacore::Double time,
     110                     const casacore::Bool inverseMask);
     111  void doAddSpectrum2(const casacore::Vector<casacore::Float>& v,
     112                      const casacore::Vector<casacore::Bool>& m,
     113                      const casacore::Vector<casacore::Float>& tsys,
     114                      const casacore::Double interval,
     115                      const casacore::Double time);
     116  casacore::Float getTotalWeight(const casacore::MaskedArray<casacore::Float>& data,
     117                             const casacore::Vector<casacore::Float>& tsys,
     118                             const casacore::Double interval,
     119                             const casacore::Double time,
     120                             const casacore::Bool inverseMask);
     121  casacore::Float addTsys(const casacore::Vector<casacore::Float>& v, casacore::Bool inverseMask);
     122  casacore::Float addInterval(casacore::Double inter, casacore::Bool inverseMask);
     123  void addTime(casacore::Double t, casacore::Bool inverseMask);
    124124
    125125  WeightType weightType_;
    126   casa::Bool initialized_;
     126  casacore::Bool initialized_;
    127127  //these are Vectors
    128   casa::MaskedArray<casa::Float> spectrum_;
    129   casa::MaskedArray<casa::Float> weightSum_;
    130   casa::MaskedArray<casa::uInt> n_;
     128  casacore::MaskedArray<casacore::Float> spectrum_;
     129  casacore::MaskedArray<casacore::Float> weightSum_;
     130  casacore::MaskedArray<casacore::uInt> n_;
    131131
    132132  //these three are used for normalise() (CAS-2776; 2011/04/07 by WK)
    133   casa::MaskedArray<casa::Float> spectrumNoMask_;
    134   casa::MaskedArray<casa::Float> weightSumNoMask_;
    135   casa::MaskedArray<casa::uInt> nNoMask_;
     133  casacore::MaskedArray<casacore::Float> spectrumNoMask_;
     134  casacore::MaskedArray<casacore::Float> weightSumNoMask_;
     135  casacore::MaskedArray<casacore::uInt> nNoMask_;
    136136
    137   casa::Vector<casa::Bool> userMask_;
     137  casacore::Vector<casacore::Bool> userMask_;
    138138
    139   casa::Vector<casa::Float> tsysSum_, tsysSumNoMask_;
    140   casa::Double timeSum_, timeSumNoMask_;
    141   casa::Double intervalSum_, intervalSumNoMask_;
     139  casacore::Vector<casacore::Float> tsysSum_, tsysSumNoMask_;
     140  casacore::Double timeSum_, timeSumNoMask_;
     141  casacore::Double intervalSum_, intervalSumNoMask_;
    142142};
    143143
  • trunk/src/STApplyCal.cpp

    r3077 r3106  
    4242
    4343
    44 using namespace casa;
     44using namespace casacore;
    4545using namespace std;
    4646
     
    683683uInt STApplyCal::getIFForTsys(uInt to)
    684684{
    685   for (map<casa::uInt, Vector<uInt> >::iterator i = spwmap_.begin();
     685  for (map<casacore::uInt, Vector<uInt> >::iterator i = spwmap_.begin();
    686686       i != spwmap_.end(); i++) {
    687687    Vector<uInt> tolist = i->second;
  • trunk/src/STApplyCal.h

    r2963 r3106  
    4848public:
    4949  STApplyCal();
    50   STApplyCal(casa::CountedPtr<Scantable> target);
     50  STApplyCal(casacore::CountedPtr<Scantable> target);
    5151
    5252  ~STApplyCal();
    5353
    5454  // set data
    55   void setTarget(casa::CountedPtr<Scantable> target);
    56   void setTarget(const casa::String &name);
     55  void setTarget(casacore::CountedPtr<Scantable> target);
     56  void setTarget(const casacore::String &name);
    5757
    5858  // push new caltable
     
    6161
    6262  // set interpolation method
    63   //void setInterpolation(STCalEnum::InterpolationAxis axis, STCalEnum::InterpolationType itype, casa::Int order=-1);
    64   void setTimeInterpolation(STCalEnum::InterpolationType itype, casa::Int order=-1);
    65   void setFrequencyInterpolation(STCalEnum::InterpolationType itype, casa::Int order=-1);
     63  //void setInterpolation(STCalEnum::InterpolationAxis axis, STCalEnum::InterpolationType itype, casacore::Int order=-1);
     64  void setTimeInterpolation(STCalEnum::InterpolationType itype, casacore::Int order=-1);
     65  void setFrequencyInterpolation(STCalEnum::InterpolationType itype, casacore::Int order=-1);
    6666
    6767  // set IF (spw) mapping for Tsys transfer
    68   void setTsysTransfer(casa::uInt from, casa::Vector<casa::uInt> to);
     68  void setTsysTransfer(casacore::uInt from, casacore::Vector<casacore::uInt> to);
    6969
    7070  // apply tables
    71   void apply(casa::Bool insitu=false, casa::Bool filltsys=true);
     71  void apply(casacore::Bool insitu=false, casacore::Bool filltsys=true);
    7272
    7373  // split target data and store it to disk
    74   void save(const casa::String &name);
     74  void save(const casacore::String &name);
    7575
    7676  // reset all settings except target scantable
     
    8888
    8989  // single loop element in apply()
    90   void doapply(casa::uInt beamno, casa::uInt ifno, casa::uInt polno,
    91                casa::Vector<casa::uInt> &rows,
    92                casa::Vector<casa::uInt> &skylist,
    93                casa::Bool filltsys=true);
     90  void doapply(casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno,
     91               casacore::Vector<casacore::uInt> &rows,
     92               casacore::Vector<casacore::uInt> &skylist,
     93               casacore::Bool filltsys=true);
    9494
    9595  // get frequency information from FREQUENCIES subtable
    96   casa::Vector<casa::Double> getBaseFrequency(casa::uInt whichrow);
     96  casacore::Vector<casacore::Double> getBaseFrequency(casacore::uInt whichrow);
    9797
    9898  // search spwmap_ to get IFNO for Tsys
    99   casa::uInt getIFForTsys(casa::uInt to);
     99  casacore::uInt getIFForTsys(casacore::uInt to);
    100100
    101101  // target data
    102   casa::CountedPtr<Scantable> target_;
     102  casacore::CountedPtr<Scantable> target_;
    103103
    104104  // working data
    105   casa::CountedPtr<Scantable> work_;
     105  casacore::CountedPtr<Scantable> work_;
    106106
    107107  // calibrator
    108   casa::CountedPtr<Calibrator> calibrator_;
     108  casacore::CountedPtr<Calibrator> calibrator_;
    109109
    110110  // interpolation method
    111111  STCalEnum::InterpolationType iTime_;
    112112  STCalEnum::InterpolationType iFreq_;
    113   casa::Int order_;
    114   casa::CountedPtr<Interpolator1D<casa::Double, casa::Float> > interpolatorT_;
    115   casa::CountedPtr<Interpolator1D<casa::Double, casa::Float> > interpolatorF_;
    116   casa::CountedPtr<Interpolator1D<casa::Double, casa::Float> > interpolatorS_;
     113  casacore::Int order_;
     114  casacore::CountedPtr<Interpolator1D<casacore::Double, casacore::Float> > interpolatorT_;
     115  casacore::CountedPtr<Interpolator1D<casacore::Double, casacore::Float> > interpolatorF_;
     116  casacore::CountedPtr<Interpolator1D<casacore::Double, casacore::Float> > interpolatorS_;
    117117
    118118  // IF (spw) mapping for Tsys transfer
    119   map<casa::uInt, casa::Vector<casa::uInt> > spwmap_;
     119  map<casacore::uInt, casacore::Vector<casacore::uInt> > spwmap_;
    120120
    121121  // list of apply tables
     
    125125  // calibration type
    126126  STCalEnum::CalType caltype_;
    127   casa::Bool doTsys_;
     127  casacore::Bool doTsys_;
    128128
    129129  // selector
     
    131131
    132132  // logger
    133   casa::LogIO os_;
     133  casacore::LogIO os_;
    134134};
    135135
  • trunk/src/STApplyTable.cpp

    r3084 r3106  
    2626
    2727
    28 using namespace casa;
     28using namespace casacore;
    2929
    3030namespace asap {
    3131
    32 STApplyTable::STApplyTable( const Scantable& parent, const casa::String& name )
     32STApplyTable::STApplyTable( const Scantable& parent, const casacore::String& name )
    3333{
    3434  TableDesc td("", "1", TableDesc::Scratch);
  • trunk/src/STApplyTable.h

    r2964 r3106  
    3636public:
    3737  STApplyTable() {;}
    38   STApplyTable(const Scantable& parent, const casa::String& name);
    39   STApplyTable(const casa::String &name);
     38  STApplyTable(const Scantable& parent, const casacore::String& name);
     39  STApplyTable(const casacore::String &name);
    4040
    4141  virtual ~STApplyTable();
     
    4949   * Name of the table
    5050   ***/
    51   virtual const casa::String& name() const = 0;
     51  virtual const casacore::String& name() const = 0;
    5252
    53   const casa::Table& table() const { return table_; }
    54   casa::Table table() { return table_; }
     53  const casacore::Table& table() const { return table_; }
     54  casacore::Table table() { return table_; }
    5555  void attach();
    5656  void attachBaseColumns();
    5757  virtual void attachOptionalColumns() = 0;
    5858
    59   casa::uInt nrow() {return table_.nrow();}
     59  casacore::uInt nrow() {return table_.nrow();}
    6060
    61   casa::Vector<casa::uInt> getScan() const {return scanCol_.getColumn();}
    62   casa::Vector<casa::uInt> getCycle() const {return cycleCol_.getColumn();}
    63   casa::Vector<casa::uInt> getBeam() const {return beamCol_.getColumn();}
    64   casa::Vector<casa::uInt> getIF() const {return ifCol_.getColumn();}
    65   casa::Vector<casa::uInt> getPol() const {return polCol_.getColumn();}
    66   casa::Vector<casa::Double> getTime() const {return timeCol_.getColumn();}
     61  casacore::Vector<casacore::uInt> getScan() const {return scanCol_.getColumn();}
     62  casacore::Vector<casacore::uInt> getCycle() const {return cycleCol_.getColumn();}
     63  casacore::Vector<casacore::uInt> getBeam() const {return beamCol_.getColumn();}
     64  casacore::Vector<casacore::uInt> getIF() const {return ifCol_.getColumn();}
     65  casacore::Vector<casacore::uInt> getPol() const {return polCol_.getColumn();}
     66  casacore::Vector<casacore::Double> getTime() const {return timeCol_.getColumn();}
    6767
    6868  void setSelection(STSelector &sel, bool sortByTime=false);
    6969  void unsetSelection();
    70   casa::String caltype();
     70  casacore::String caltype();
    7171
    72   void save(const casa::String &name);
     72  void save(const casacore::String &name);
    7373
    74   virtual casa::uInt nchan(casa::uInt ifno) = 0;
     74  virtual casacore::uInt nchan(casacore::uInt ifno) = 0;
    7575
    7676  // static methods
    77   static STCalEnum::CalType getCalType(const casa::String &name);
    78   static STCalEnum::CalType getCalType(casa::CountedPtr<STApplyTable> tab);
     77  static STCalEnum::CalType getCalType(const casacore::String &name);
     78  static STCalEnum::CalType getCalType(casacore::CountedPtr<STApplyTable> tab);
    7979  static STCalEnum::CalType getCalType(STApplyTable *tab);
    8080
    8181protected:
    82   void setbasedata(casa::uInt irow, casa::uInt scanno, casa::uInt cycleno,
    83                    casa::uInt beamno, casa::uInt ifno, casa::uInt polno,
    84                    casa::uInt freqid, casa::Double time);
    85   casa::Block<casa::Double> getFrequenciesRow(casa::uInt id);
     82  void setbasedata(casacore::uInt irow, casacore::uInt scanno, casacore::uInt cycleno,
     83                   casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno,
     84                   casacore::uInt freqid, casacore::Double time);
     85  casacore::Block<casacore::Double> getFrequenciesRow(casacore::uInt id);
    8686
    87   casa::Table table_, originaltable_;
    88   casa::ScalarColumn<casa::uInt> scanCol_, cycleCol_, beamCol_, ifCol_, polCol_, freqidCol_;
    89   casa::ScalarColumn<casa::Double> timeCol_;
    90   casa::MEpoch::ScalarColumn timeMeasCol_;
     87  casacore::Table table_, originaltable_;
     88  casacore::ScalarColumn<casacore::uInt> scanCol_, cycleCol_, beamCol_, ifCol_, polCol_, freqidCol_;
     89  casacore::ScalarColumn<casacore::Double> timeCol_;
     90  casacore::MEpoch::ScalarColumn timeMeasCol_;
    9191  STSelector sel_;
    92   casa::LogIO os_;
     92  casacore::LogIO os_;
    9393
    9494private:
    95   static STCalEnum::CalType stringToType(const casa::String &caltype);
     95  static STCalEnum::CalType stringToType(const casacore::String &caltype);
    9696};
    9797
  • trunk/src/STAsciiWriter.cpp

    r2658 r3106  
    6161#include "STAsciiWriter.h"
    6262
    63 using namespace casa;
     63using namespace casacore;
    6464using namespace asap;
    6565
  • trunk/src/STAsciiWriter.h

    r2658 r3106  
    3939
    4040
    41 namespace casa {
     41namespace casacore {
    4242  template<class T> class Vector;
    4343  class MDirection;
     
    5757
    5858// Write out ascii table
    59   casa::Bool write(const Scantable& table, const casa::String& name);
     59  casacore::Bool write(const Scantable& table, const casacore::String& name);
    6060
    6161private:
    62   casa::String formatDirection(const casa::MDirection& md) const;
     62  casacore::String formatDirection(const casacore::MDirection& md) const;
    6363  template <class T>
    64   void addLine(std::ostream& of, const casa::String& lbl,
     64  void addLine(std::ostream& of, const casacore::String& lbl,
    6565               const T& value);
    6666};
  • trunk/src/STAtmosphere.cpp

    r1823 r3106  
    5050#include <cmath>
    5151
    52 using namespace casa;
     52using namespace casacore;
    5353using namespace asap;
    5454
     
    157157       const double pressure = gndPressure * exp(-M*g/(QC::R.get().getValue()*itsGndTemperature)*
    158158                   (height+0.5*itsLapseRate*height*height/itsGndTemperature));
    159        itsVapourPressures[layer] = casa::min(itsGndHumidity*exp(-height/itsWVScale)*wvGndSaturationPressure,
     159       itsVapourPressures[layer] = casacore::min(itsGndHumidity*exp(-height/itsWVScale)*wvGndSaturationPressure,
    160160                                             wvSaturationPressure(itsTemperatures[layer]));
    161161       itsDryPressures[layer] = pressure - itsVapourPressures[layer];                                     
     
    404404             itsVapourPressures[layer])+vapourRefractivity(freq,itsTemperatures[layer],itsDryPressures[layer],
    405405             itsVapourPressures[layer]));
    406        tau += dH*4.*casa::C::pi/QC::c.get().getValue()*freq*nImag;
     406       tau += dH*4.*casacore::C::pi/QC::c.get().getValue()*freq*nImag;
    407407  }
    408408  return tau;
     
    457457       // length increment
    458458       const double dL = dH*nReal/sqrt(nReal*nReal+sineEl*sineEl-1.);
    459        tau += dL*4.*casa::C::pi/QC::c.get().getValue()*freq*nImag;
     459       tau += dL*4.*casacore::C::pi/QC::c.get().getValue()*freq*nImag;
    460460  }
    461461  return tau; 
  • trunk/src/STAttr.cpp

    r2658 r3106  
    4545#include "STAttr.h"
    4646
    47 using namespace casa;
     47using namespace casacore;
    4848using namespace asap;
    4949
     
    123123                                      const Vector<Float>& freqs) const
    124124{
    125    casa::LogIO os( casa::LogOrigin( "STAttr", "beamEfficiency()" ) );
     125   casacore::LogIO os( casacore::LogOrigin( "STAttr", "beamEfficiency()" ) );
    126126   // Look at date where appropriate
    127127   MVTime t(dateObs.getValue());
     
    134134          if (year<2003) {
    135135            os << "There is no beam efficiency data from before 2003"
    136                <<" - using 2003 data" << casa::LogIO::POST;
     136               <<" - using 2003 data" << casacore::LogIO::POST;
    137137            facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2003Y_);
    138138          } else if (year==2003) {
    139             os << "Using beam efficiency data from 2003" << casa::LogIO::POST;
     139            os << "Using beam efficiency data from 2003" << casacore::LogIO::POST;
    140140            facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2003Y_);
    141141          } else {
    142             os << "Using beam efficiency data from 2004" << casa::LogIO::POST;
     142            os << "Using beam efficiency data from 2004" << casacore::LogIO::POST;
    143143            facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2004Y_);
    144144          }
     
    148148     {
    149149       os << "No beam efficiency data for this instrument - assuming unity"
    150           << casa::LogIO::POST;
     150          << casacore::LogIO::POST;
    151151     }
    152152   }
     
    158158                                         const Vector<Float>& freqs) const
    159159{
    160    casa::LogIO os( casa::LogOrigin( "STAttr", "apertureEfficiency()" ) );
     160   casacore::LogIO os( casacore::LogOrigin( "STAttr", "apertureEfficiency()" ) );
    161161  // Look at date where appropriate
    162162  MVTime t(dateObs.getValue());
     
    169169      if (year<2004) {
    170170        os << "There is no aperture efficiency data from before 2004"
    171            << " - using 2004 data" << casa::LogIO::POST;
     171           << " - using 2004 data" << casacore::LogIO::POST;
    172172        facs = interp(freqs/1.0e9f, MopEtaApX_, MopEtaAp2004Y_);
    173173      } else {
    174         os << "Using aperture efficiency data from 2004" << casa::LogIO::POST;
     174        os << "Using aperture efficiency data from 2004" << casacore::LogIO::POST;
    175175        facs = interp(freqs/1.0e9f, MopEtaApX_, MopEtaAp2004Y_);
    176176      }
     
    185185    {
    186186      os << "No aperture efficiency data for this instrument"
    187          <<  " - assuming unity" << casa::LogIO::POST;
     187         <<  " - assuming unity" << casacore::LogIO::POST;
    188188    }
    189189  }
  • trunk/src/STAttr.h

    r2658 r3106  
    4040#include "STDefs.h"
    4141
    42 namespace casa {
     42namespace casacore {
    4343  template<class T> class Vector;
    4444}
     
    6363
    6464  // Telescope diameter(m). Throws exception if unknown.
    65   casa::Float diameter(Instrument inst) const;
     65  casacore::Float diameter(Instrument inst) const;
    6666
    6767  // Beam efficiency.  Frequency in Hz.  Returns 1 if unknown.
    68   casa::Vector<casa::Float>
    69   beamEfficiency(Instrument instr, const casa::MEpoch& dateObs,
    70                  const casa::Vector<casa::Float>& freqs) const;
     68  casacore::Vector<casacore::Float>
     69  beamEfficiency(Instrument instr, const casacore::MEpoch& dateObs,
     70                 const casacore::Vector<casacore::Float>& freqs) const;
    7171
    7272  // Aperture efficiency. Frequency in Hz.  Returns 1 if unknown.
    73   casa::Vector<casa::Float>
     73  casacore::Vector<casacore::Float>
    7474  apertureEfficiency(Instrument instr,
    75                      const casa::MEpoch& dateObs,
    76                      const casa::Vector<casa::Float>& freqs) const;
     75                     const casacore::MEpoch& dateObs,
     76                     const casacore::Vector<casacore::Float>& freqs) const;
    7777
    7878  // Find factor to convert Jy -> K for this telescope, date of
    7979  // observation and frequency (Hz)
    80   casa::Vector<casa::Float> JyPerK(Instrument instr,
    81                                    const casa::MEpoch& dateObs,
    82                                    const casa::Vector<casa::Float>& freqs)
     80  casacore::Vector<casacore::Float> JyPerK(Instrument instr,
     81                                   const casacore::MEpoch& dateObs,
     82                                   const casacore::Vector<casacore::Float>& freqs)
    8383    const;
    8484
    8585  // Gain Elevation polynomial correction coefficients (elevation in
    8686  // degrees) Returns length 0 if not known.
    87    casa::Vector<casa::Float> gainElevationPoly(Instrument instr) const;
     87   casacore::Vector<casacore::Float> gainElevationPoly(Instrument instr) const;
    8888
    8989  // Find feed polarization type of feeds. In future this needs to come
     
    9292
    9393  // Helper function to check instrument (antenna) name and give enum
    94   static Instrument convertInstrument(const casa::String& instrument,
    95                                       casa::Bool throwIt);
     94  static Instrument convertInstrument(const casacore::String& instrument,
     95                                      casacore::Bool throwIt);
    9696
    9797  // Helper function.  Finds factor to convert K -> Jy. Provide
    9898  // aperture efficiency and dish geometric diameter (m)
    99   static casa::Float findJyPerK(casa::Float etaAp, casa::Float D);
     99  static casacore::Float findJyPerK(casacore::Float etaAp, casacore::Float D);
    100100
    101101private:
    102102
    103103  // Static data
    104   casa::Vector<casa::Float> MopEtaBeamX_;     // Beam efficiency
    105   casa::Vector<casa::Float> MopEtaBeam2003Y_;
    106   casa::Vector<casa::Float> MopEtaBeam2004Y_;
     104  casacore::Vector<casacore::Float> MopEtaBeamX_;     // Beam efficiency
     105  casacore::Vector<casacore::Float> MopEtaBeam2003Y_;
     106  casacore::Vector<casacore::Float> MopEtaBeam2004Y_;
    107107
    108   casa::Vector<casa::Float> MopEtaApX_;       // Aperture efficiency
    109   casa::Vector<casa::Float> MopEtaAp2004Y_;
     108  casacore::Vector<casacore::Float> MopEtaApX_;       // Aperture efficiency
     109  casacore::Vector<casacore::Float> MopEtaAp2004Y_;
    110110
    111   casa::Vector<casa::Float> TidEtaApX_;       // Aperture efficiency
    112   casa::Vector<casa::Float> TidEtaApY_;
     111  casacore::Vector<casacore::Float> TidEtaApX_;       // Aperture efficiency
     112  casacore::Vector<casacore::Float> TidEtaApY_;
    113113
    114   casa::Vector<casa::Float> TidGainElPoly_;   // Gain-el correction poly coeffs
    115   casa::Vector<casa::Float> ParkesGainElPoly_;// K-band Gain-el correction
     114  casacore::Vector<casacore::Float> TidGainElPoly_;   // Gain-el correction poly coeffs
     115  casacore::Vector<casacore::Float> ParkesGainElPoly_;// K-band Gain-el correction
    116116                                              //poly coeffs
    117117
     
    120120
    121121  // Linear interpolation
    122   casa::Vector<casa::Float> interp(const casa::Vector<casa::Float>& xOut,
    123                                    const casa::Vector<casa::Float>& xIn,
    124                                    const casa::Vector<casa::Float>& yIn) const;
     122  casacore::Vector<casacore::Float> interp(const casacore::Vector<casacore::Float>& xOut,
     123                                   const casacore::Vector<casacore::Float>& xIn,
     124                                   const casacore::Vector<casacore::Float>& yIn) const;
    125125
    126126
  • trunk/src/STBaselineTable.cpp

    r2883 r3106  
    2727
    2828
    29 using namespace casa;
     29using namespace casacore;
    3030
    3131namespace asap {
     
    231231}
    232232
    233 void STBaselineTable::setresult(casa::uInt irow,
    234                                 casa::Vector<casa::Float> res,
    235                                 casa::Float rms)
     233void STBaselineTable::setresult(casacore::uInt irow,
     234                                casacore::Vector<casacore::Float> res,
     235                                casacore::Float rms)
    236236{
    237237  resCol_.put(irow, res);
  • trunk/src/STBaselineTable.h

    r2773 r3106  
    3434  STBaselineTable() {;}
    3535  STBaselineTable(const Scantable& parent);
    36   STBaselineTable(const casa::String &name);
     36  STBaselineTable(const casacore::String &name);
    3737
    3838  virtual ~STBaselineTable();
    3939
    4040  void setup();
    41   const casa::String& name() const {return name_;};
     41  const casacore::String& name() const {return name_;};
    4242
    4343  void attachOptionalColumns();
    4444  void save(const std::string &filename);
    45   void setdata(casa::uInt irow, casa::uInt scanno, casa::uInt cycleno,
    46                casa::uInt beamno, casa::uInt ifno, casa::uInt polno,
    47                casa::uInt freqid, casa::Double time,
    48                casa::Bool apply,
     45  void setdata(casacore::uInt irow, casacore::uInt scanno, casacore::uInt cycleno,
     46               casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno,
     47               casacore::uInt freqid, casacore::Double time,
     48               casacore::Bool apply,
    4949               STBaselineFunc::FuncName ftype,
    50                casa::Vector<casa::Int> fpar,
    51                casa::Vector<casa::Float> ffpar,
    52                casa::Vector<casa::uInt> mask,
    53                casa::Vector<casa::Float> res,
    54                casa::Float rms,
    55                casa::uInt nchan,
    56                casa::Float cthres,
    57                casa::uInt citer,
    58                casa::Float lfthres,
    59                casa::uInt lfavg,
    60                casa::Vector<casa::uInt> lfedge);
     50               casacore::Vector<casacore::Int> fpar,
     51               casacore::Vector<casacore::Float> ffpar,
     52               casacore::Vector<casacore::uInt> mask,
     53               casacore::Vector<casacore::Float> res,
     54               casacore::Float rms,
     55               casacore::uInt nchan,
     56               casacore::Float cthres,
     57               casacore::uInt citer,
     58               casacore::Float lfthres,
     59               casacore::uInt lfavg,
     60               casacore::Vector<casacore::uInt> lfedge);
    6161  void appenddata(int scanno, int cycleno,
    6262                  int beamno, int ifno, int polno,
    63                   int freqid, casa::Double time,
     63                  int freqid, casacore::Double time,
    6464                  bool apply,
    6565                  STBaselineFunc::FuncName ftype,
    6666                  vector<int> fpar,
    6767                  vector<float> ffpar,
    68                   casa::Vector<casa::uInt> mask,
     68                  casacore::Vector<casacore::uInt> mask,
    6969                  vector<float> res,
    7070                  float rms,
     
    7777  void appenddata(int scanno, int cycleno,
    7878                  int beamno, int ifno, int polno,
    79                   int freqid, casa::Double time,
     79                  int freqid, casacore::Double time,
    8080                  bool apply,
    8181                  STBaselineFunc::FuncName ftype,
    8282                  int fpar,
    8383                  vector<float> ffpar,
    84                   casa::Vector<casa::uInt> mask,
     84                  casacore::Vector<casacore::uInt> mask,
    8585                  vector<float> res,
    8686                  float rms,
     
    9191                  int lfavg,
    9292                  vector<int> lfedge);
    93   void appenddata(casa::uInt scanno, casa::uInt cycleno,
    94                   casa::uInt beamno, casa::uInt ifno, casa::uInt polno,
    95                   casa::uInt freqid, casa::Double time,
    96                   casa::Bool apply,
     93  void appenddata(casacore::uInt scanno, casacore::uInt cycleno,
     94                  casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno,
     95                  casacore::uInt freqid, casacore::Double time,
     96                  casacore::Bool apply,
    9797                  STBaselineFunc::FuncName ftype,
    98                   casa::Vector<casa::Int> fpar,
    99                   casa::Vector<casa::Float> ffpar,
    100                   casa::Vector<casa::uInt> mask,
    101                   casa::Vector<casa::Float> res,
    102                   casa::Float rms,
    103                   casa::uInt nchan,
    104                   casa::Float cthres,
    105                   casa::uInt citer,
    106                   casa::Float lfthres,
    107                   casa::uInt lfavg,
    108                   casa::Vector<casa::uInt> lfedge);
     98                  casacore::Vector<casacore::Int> fpar,
     99                  casacore::Vector<casacore::Float> ffpar,
     100                  casacore::Vector<casacore::uInt> mask,
     101                  casacore::Vector<casacore::Float> res,
     102                  casacore::Float rms,
     103                  casacore::uInt nchan,
     104                  casacore::Float cthres,
     105                  casacore::uInt citer,
     106                  casacore::Float lfthres,
     107                  casacore::uInt lfavg,
     108                  casacore::Vector<casacore::uInt> lfedge);
    109109  void appendbasedata(int scanno, int cycleno,
    110110                      int beamno, int ifno, int polno,
    111                       int freqid, casa::Double time);
    112   void setresult(casa::uInt irow,
    113                  casa::Vector<casa::Float> res,
    114                  casa::Float rms);
    115   casa::uInt nchan(casa::uInt ifno);
    116   casa::Vector<casa::Bool> getApply() {return applyCol_.getColumn();}
     111                      int freqid, casacore::Double time);
     112  void setresult(casacore::uInt irow,
     113                 casacore::Vector<casacore::Float> res,
     114                 casacore::Float rms);
     115  casacore::uInt nchan(casacore::uInt ifno);
     116  casacore::Vector<casacore::Bool> getApply() {return applyCol_.getColumn();}
    117117  bool getApply(int irow);
    118   casa::Vector<casa::uInt> getFunction() {return ftypeCol_.getColumn();}
    119   casa::Vector<STBaselineFunc::FuncName> getFunctionNames();
     118  casacore::Vector<casacore::uInt> getFunction() {return ftypeCol_.getColumn();}
     119  casacore::Vector<STBaselineFunc::FuncName> getFunctionNames();
    120120  STBaselineFunc::FuncName getFunctionName(int irow);
    121   casa::Matrix<casa::Int> getFuncParam() {return fparCol_.getColumn();}
     121  casacore::Matrix<casacore::Int> getFuncParam() {return fparCol_.getColumn();}
    122122  std::vector<int> getFuncParam(int irow);
    123   casa::Matrix<casa::Float> getFuncFParam() {return ffparCol_.getColumn();}
    124   casa::Matrix<casa::uInt> getMaskList() {return maskCol_.getColumn();}
     123  casacore::Matrix<casacore::Float> getFuncFParam() {return ffparCol_.getColumn();}
     124  casacore::Matrix<casacore::uInt> getMaskList() {return maskCol_.getColumn();}
    125125  std::vector<bool> getMask(int irow);
    126   casa::Matrix<casa::Float> getResult() {return resCol_.getColumn();}
    127   casa::Vector<casa::Float> getRms() {return rmsCol_.getColumn();}
    128   casa::Vector<casa::uInt> getNChan() {return nchanCol_.getColumn();}
    129   casa::uInt getNChan(int irow);
    130   casa::Vector<casa::Float> getClipThreshold() {return cthresCol_.getColumn();}
    131   casa::Vector<casa::uInt> getClipIteration() {return citerCol_.getColumn();}
    132   casa::Vector<casa::Float> getLineFinderThreshold() {return lfthresCol_.getColumn();}
    133   casa::Vector<casa::uInt> getLineFinderChanAvg() {return lfavgCol_.getColumn();}
    134   casa::Matrix<casa::uInt> getLineFinderEdge() {return lfedgeCol_.getColumn();}
     126  casacore::Matrix<casacore::Float> getResult() {return resCol_.getColumn();}
     127  casacore::Vector<casacore::Float> getRms() {return rmsCol_.getColumn();}
     128  casacore::Vector<casacore::uInt> getNChan() {return nchanCol_.getColumn();}
     129  casacore::uInt getNChan(int irow);
     130  casacore::Vector<casacore::Float> getClipThreshold() {return cthresCol_.getColumn();}
     131  casacore::Vector<casacore::uInt> getClipIteration() {return citerCol_.getColumn();}
     132  casacore::Vector<casacore::Float> getLineFinderThreshold() {return lfthresCol_.getColumn();}
     133  casacore::Vector<casacore::uInt> getLineFinderChanAvg() {return lfavgCol_.getColumn();}
     134  casacore::Matrix<casacore::uInt> getLineFinderEdge() {return lfedgeCol_.getColumn();}
    135135  void setApply(int irow, bool apply);
    136136
    137137private:
    138   static const casa::String name_ ;
    139   casa::ScalarColumn<casa::Bool> applyCol_;
    140   casa::ScalarColumn<casa::uInt> ftypeCol_;
    141   casa::ArrayColumn<casa::Int> fparCol_;
    142   casa::ArrayColumn<casa::Float> ffparCol_;
    143   casa::ArrayColumn<casa::uInt> maskCol_;
    144   casa::ArrayColumn<casa::Float> resCol_;
    145   casa::ScalarColumn<casa::Float> rmsCol_;
    146   casa::ScalarColumn<casa::uInt> nchanCol_;
    147   casa::ScalarColumn<casa::Float> cthresCol_;
    148   casa::ScalarColumn<casa::uInt> citerCol_;
    149   casa::ScalarColumn<casa::Float> lfthresCol_;
    150   casa::ScalarColumn<casa::uInt> lfavgCol_;
    151   casa::ArrayColumn<casa::uInt> lfedgeCol_;
     138  static const casacore::String name_ ;
     139  casacore::ScalarColumn<casacore::Bool> applyCol_;
     140  casacore::ScalarColumn<casacore::uInt> ftypeCol_;
     141  casacore::ArrayColumn<casacore::Int> fparCol_;
     142  casacore::ArrayColumn<casacore::Float> ffparCol_;
     143  casacore::ArrayColumn<casacore::uInt> maskCol_;
     144  casacore::ArrayColumn<casacore::Float> resCol_;
     145  casacore::ScalarColumn<casacore::Float> rmsCol_;
     146  casacore::ScalarColumn<casacore::uInt> nchanCol_;
     147  casacore::ScalarColumn<casacore::Float> cthresCol_;
     148  casacore::ScalarColumn<casacore::uInt> citerCol_;
     149  casacore::ScalarColumn<casacore::Float> lfthresCol_;
     150  casacore::ScalarColumn<casacore::uInt> lfavgCol_;
     151  casacore::ArrayColumn<casacore::uInt> lfedgeCol_;
    152152};
    153153
  • trunk/src/STCalSkyOtfAlma.cpp

    r2983 r3106  
    2222
    2323using namespace std;
    24 using namespace casa;
     24using namespace casacore;
    2525
    2626namespace asap {
  • trunk/src/STCalSkyOtfAlma.h

    r2823 r3106  
    3636class STCalSkyOtfAlma : public STCalSkyPSAlma {
    3737public:
    38   STCalSkyOtfAlma(casa::CountedPtr<Scantable> &s, bool israster=false);
     38  STCalSkyOtfAlma(casacore::CountedPtr<Scantable> &s, bool israster=false);
    3939
    4040  virtual ~STCalSkyOtfAlma() {;}
     
    4747  bool israster_;
    4848
    49   casa::Vector<casa::uInt> rowNumbers_;
     49  casacore::Vector<casacore::uInt> rowNumbers_;
    5050};
    5151
  • trunk/src/STCalSkyPSAlma.cpp

    r2955 r3106  
    2121
    2222using namespace std;
    23 using namespace casa;
     23using namespace casacore;
    2424
    2525namespace asap {
  • trunk/src/STCalSkyPSAlma.h

    r2955 r3106  
    3737class STCalSkyPSAlma : public STCalibration {
    3838public:
    39   STCalSkyPSAlma(casa::CountedPtr<Scantable> &s);
     39  STCalSkyPSAlma(casacore::CountedPtr<Scantable> &s);
    4040
    4141  virtual ~STCalSkyPSAlma() {;}
     
    4343protected:
    4444  virtual void setupSelector(const STSelector &sel);
    45   virtual void appenddata(casa::uInt scanno, casa::uInt cycleno,
    46                           casa::uInt beamno, casa::uInt ifno, casa::uInt polno,
    47                           casa::uInt freqid, casa::Double time, casa::Float elevation,
    48                           const casa::Vector<casa::Float> &any_data,
    49                           const casa::Vector<casa::uChar> &channel_flag);
     45  virtual void appenddata(casacore::uInt scanno, casacore::uInt cycleno,
     46                          casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno,
     47                          casacore::uInt freqid, casacore::Double time, casacore::Float elevation,
     48                          const casacore::Vector<casacore::Float> &any_data,
     49                          const casacore::Vector<casacore::uChar> &channel_flag);
    5050};
    5151
  • trunk/src/STCalSkyTable.cpp

    r2955 r3106  
    2828
    2929
    30 using namespace casa;
     30using namespace casacore;
    3131
    3232namespace asap {
  • trunk/src/STCalSkyTable.h

    r2964 r3106  
    3434public:
    3535  STCalSkyTable() {;}
    36   STCalSkyTable(const Scantable& parent, const casa::String &caltype);
    37   STCalSkyTable(const casa::String &name);
     36  STCalSkyTable(const Scantable& parent, const casacore::String &caltype);
     37  STCalSkyTable(const casacore::String &name);
    3838
    3939  virtual ~STCalSkyTable();
     
    4242  void attachOptionalColumns();
    4343
    44   const casa::String& name() const {return name_;}
     44  const casacore::String& name() const {return name_;}
    4545
    46   void setdata(casa::uInt irow, casa::uInt scannos, casa::uInt cycleno,
    47                casa::uInt beamno, casa::uInt ifno, casa::uInt polno,
    48                casa::uInt freqid, casa::Double time, casa::Float elevation,
    49                const casa::Vector<casa::Float> &spectra,
    50                const casa::Vector<casa::uChar> &flagtra);
    51   void appenddata(casa::uInt scanno, casa::uInt cycleno, casa::uInt beamno,
    52                   casa::uInt ifno, casa::uInt polno, casa::uInt freqid, 
    53                   casa::Double time, casa::Float elevation,
    54                   const casa::Vector<casa::Float> &spectra,
    55                   const casa::Vector<casa::uChar> &flagtra);
     46  void setdata(casacore::uInt irow, casacore::uInt scannos, casacore::uInt cycleno,
     47               casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno,
     48               casacore::uInt freqid, casacore::Double time, casacore::Float elevation,
     49               const casacore::Vector<casacore::Float> &spectra,
     50               const casacore::Vector<casacore::uChar> &flagtra);
     51  void appenddata(casacore::uInt scanno, casacore::uInt cycleno, casacore::uInt beamno,
     52                  casacore::uInt ifno, casacore::uInt polno, casacore::uInt freqid, 
     53                  casacore::Double time, casacore::Float elevation,
     54                  const casacore::Vector<casacore::Float> &spectra,
     55                  const casacore::Vector<casacore::uChar> &flagtra);
    5656 
    57   casa::Vector<casa::Float> getElevation() const {return elCol_.getColumn();}
    58   casa::Matrix<casa::Float> getSpectra() const {return spectraCol_.getColumn();}
    59   casa::Matrix<casa::uChar> getFlagtra() const {return flagtraCol_.getColumn();}
    60   casa::uInt nchan(casa::uInt ifno);
     57  casacore::Vector<casacore::Float> getElevation() const {return elCol_.getColumn();}
     58  casacore::Matrix<casacore::Float> getSpectra() const {return spectraCol_.getColumn();}
     59  casacore::Matrix<casacore::uChar> getFlagtra() const {return flagtraCol_.getColumn();}
     60  casacore::uInt nchan(casacore::uInt ifno);
    6161
    62   //casa::Vector<casa::Double> getBaseFrequency(casa::uInt whichrow);
     62  //casacore::Vector<casacore::Double> getBaseFrequency(casacore::uInt whichrow);
    6363
    6464private:
    65   static const casa::String name_;
    66   const casa::String caltype_;
    67   casa::ArrayColumn<casa::Float> spectraCol_;
    68   casa::ArrayColumn<casa::uChar> flagtraCol_;
    69   casa::ScalarColumn<casa::Float> elCol_;
     65  static const casacore::String name_;
     66  const casacore::String caltype_;
     67  casacore::ArrayColumn<casacore::Float> spectraCol_;
     68  casacore::ArrayColumn<casacore::uChar> flagtraCol_;
     69  casacore::ScalarColumn<casacore::Float> elCol_;
    7070};
    7171
  • trunk/src/STCalTsys.cpp

    r3062 r3106  
    2323
    2424using namespace std;
    25 using namespace casa;
     25using namespace casacore;
    2626
    2727namespace asap {
  • trunk/src/STCalTsys.h

    r2955 r3106  
    3939class STCalTsys : public STCalibration {
    4040public:
    41   STCalTsys(casa::CountedPtr<Scantable> &s, vector<int> &iflist);
    42   STCalTsys(casa::CountedPtr<Scantable> &s, casa::Record &iflist, bool average=false);
     41  STCalTsys(casacore::CountedPtr<Scantable> &s, vector<int> &iflist);
     42  STCalTsys(casacore::CountedPtr<Scantable> &s, casacore::Record &iflist, bool average=false);
    4343
    4444  ~STCalTsys() {;}
     
    4646private:
    4747  void setupSelector(const STSelector &sel);
    48   virtual void appenddata(casa::uInt scanno, casa::uInt cycleno,
    49                           casa::uInt beamno, casa::uInt ifno, casa::uInt polno,
    50                           casa::uInt freqid, casa::Double time, casa::Float elevation,
    51                           const casa::Vector<casa::Float> &any_data,
    52                           const casa::Vector<casa::uChar> &channel_flag);
     48  virtual void appenddata(casacore::uInt scanno, casacore::uInt cycleno,
     49                          casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno,
     50                          casacore::uInt freqid, casacore::Double time, casacore::Float elevation,
     51                          const casacore::Vector<casacore::Float> &any_data,
     52                          const casacore::Vector<casacore::uChar> &channel_flag);
    5353
    5454  vector<int> iflist_;
    55   casa::Record tsysspw_;
     55  casacore::Record tsysspw_;
    5656  bool do_average_;
    5757};
  • trunk/src/STCalTsysTable.cpp

    r2955 r3106  
    2828
    2929
    30 using namespace casa;
     30using namespace casacore;
    3131
    3232namespace asap {
  • trunk/src/STCalTsysTable.h

    r2964 r3106  
    3333  STCalTsysTable() {;}
    3434  STCalTsysTable(const Scantable& parent);
    35   STCalTsysTable(const casa::String &name);
     35  STCalTsysTable(const casacore::String &name);
    3636
    3737  virtual ~STCalTsysTable();
    3838
    3939  void setup();
    40   const casa::String& name() const {return name_;};
     40  const casacore::String& name() const {return name_;};
    4141
    4242  void attachOptionalColumns();
    4343
    44   void setdata(casa::uInt irow, casa::uInt scanno, casa::uInt cycleno,
    45                casa::uInt beamno, casa::uInt ifno, casa::uInt polno,
    46                casa::uInt freqid, casa::Double time, casa::Float elevation,
    47                const casa::Vector<casa::Float> &tsys,
    48                const casa::Vector<casa::uChar> &flagtra);
    49   void appenddata(casa::uInt scanno, casa::uInt cycleno,
    50                   casa::uInt beamno, casa::uInt ifno, casa::uInt polno,
    51                   casa::uInt freqid, casa::Double time, casa::Float elevation,
    52                   const casa::Vector<casa::Float> &tsys,
    53                   const casa::Vector<casa::uChar> &flagtra);
     44  void setdata(casacore::uInt irow, casacore::uInt scanno, casacore::uInt cycleno,
     45               casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno,
     46               casacore::uInt freqid, casacore::Double time, casacore::Float elevation,
     47               const casacore::Vector<casacore::Float> &tsys,
     48               const casacore::Vector<casacore::uChar> &flagtra);
     49  void appenddata(casacore::uInt scanno, casacore::uInt cycleno,
     50                  casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno,
     51                  casacore::uInt freqid, casacore::Double time, casacore::Float elevation,
     52                  const casacore::Vector<casacore::Float> &tsys,
     53                  const casacore::Vector<casacore::uChar> &flagtra);
    5454 
    55   casa::Vector<casa::Float> getElevation() const {return elCol_.getColumn();}
    56   casa::Matrix<casa::Float> getTsys() const {return tsysCol_.getColumn();}
    57   casa::Matrix<casa::uChar> getFlagtra() const {return flagtraCol_.getColumn();}
    58   casa::uInt nchan(casa::uInt ifno);
     55  casacore::Vector<casacore::Float> getElevation() const {return elCol_.getColumn();}
     56  casacore::Matrix<casacore::Float> getTsys() const {return tsysCol_.getColumn();}
     57  casacore::Matrix<casacore::uChar> getFlagtra() const {return flagtraCol_.getColumn();}
     58  casacore::uInt nchan(casacore::uInt ifno);
    5959
    60   casa::Vector<casa::Double> getBaseFrequency(casa::uInt whichrow);
     60  casacore::Vector<casacore::Double> getBaseFrequency(casacore::uInt whichrow);
    6161
    6262private:
    63   static const casa::String name_ ;
    64   casa::ArrayColumn<casa::Float> tsysCol_;
    65   casa::ArrayColumn<casa::uChar> flagtraCol_;
    66   casa::ScalarColumn<casa::Float> elCol_;
     63  static const casacore::String name_ ;
     64  casacore::ArrayColumn<casacore::Float> tsysCol_;
     65  casacore::ArrayColumn<casacore::uChar> flagtraCol_;
     66  casacore::ScalarColumn<casacore::Float> elCol_;
    6767};
    6868
  • trunk/src/STCalibration.cpp

    r3094 r3106  
    1616#include "STIdxIter.h"
    1717
    18 using namespace casa;
     18using namespace casacore;
    1919
    2020namespace asap {
  • trunk/src/STCalibration.h

    r2955 r3106  
    3535class STCalibration {
    3636public:
    37   STCalibration(casa::CountedPtr<Scantable> &s, const casa::String target_column);
     37  STCalibration(casacore::CountedPtr<Scantable> &s, const casacore::String target_column);
    3838
    3939  void calibrate();
     
    4141  virtual ~STCalibration() {;}
    4242
    43   void save(casa::String name) {applytable_->save(name);}
     43  void save(casacore::String name) {applytable_->save(name);}
    4444  //const STApplyTable &applytable() {return *applytable_;}
    45   const casa::CountedPtr<STApplyTable> applytable() {return applytable_;}
     45  const casacore::CountedPtr<STApplyTable> applytable() {return applytable_;}
    4646
    47   void setOption(casa::Record &rec) {options_ = rec;}
     47  void setOption(casacore::Record &rec) {options_ = rec;}
    4848
    4949protected:
    5050  virtual void setupSelector(const STSelector &sel) = 0;
    5151  virtual void fillCalTable();
    52   virtual void appenddata(casa::uInt scanno, casa::uInt cycleno,
    53                           casa::uInt beamno, casa::uInt ifno, casa::uInt polno,
    54                           casa::uInt freqid, casa::Double time, casa::Float elevation,
    55                           const casa::Vector<casa::Float> &any_data,
    56                           const casa::Vector<casa::uChar> &channel_flag) = 0;
     52  virtual void appenddata(casacore::uInt scanno, casacore::uInt cycleno,
     53                          casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno,
     54                          casacore::uInt freqid, casacore::Double time, casacore::Float elevation,
     55                          const casacore::Vector<casacore::Float> &any_data,
     56                          const casacore::Vector<casacore::uChar> &channel_flag) = 0;
    5757
    5858  STSelector sel_;
    59   casa::CountedPtr<Scantable> scantable_;
    60   casa::CountedPtr<STApplyTable> applytable_;
    61   casa::LogIO os_;
    62   casa::Record options_;
    63   const casa::String target_column_;
     59  casacore::CountedPtr<Scantable> scantable_;
     60  casacore::CountedPtr<STApplyTable> applytable_;
     61  casacore::LogIO os_;
     62  casacore::Record options_;
     63  const casacore::String target_column_;
    6464};
    6565 
  • trunk/src/STCoordinate.h

    r1823 r3106  
    2828    STCoordinate(const STCoordinate& other) : spec_(other.spec_) {};
    2929
    30     STCoordinate(const casa::SpectralCoordinate& spec) :
     30    STCoordinate(const casacore::SpectralCoordinate& spec) :
    3131      spec_(spec) {};
    3232
     
    4646
    4747    double toFrequency(double pix) {
    48       casa::Double world;
     48      casacore::Double world;
    4949      spec_.toWorld(world, pix);
    5050      return world;
     
    5252
    5353    double toVelocity(double pix) {
    54       casa::Double vel;
     54      casacore::Double vel;
    5555      spec_.pixelToVelocity(vel, pix);
    5656      return vel;
     
    5858
    5959    double toPixel(double world) {
    60       casa::Double pix;
     60      casacore::Double pix;
    6161      spec_.toPixel(pix, world);
    6262      return pix;
     
    6464
    6565  private:
    66     casa::SpectralCoordinate spec_;
     66    casacore::SpectralCoordinate spec_;
    6767};
    6868
  • trunk/src/STFITSImageWriter.cpp

    r2658 r3106  
    6767#include "STFITSImageWriter.h"
    6868
    69 using namespace casa;
     69using namespace casacore;
    7070using namespace asap;
    7171
     
    274274    fits_close_file(fptr, &status);
    275275   
    276     LogIO os( casa::LogOrigin("STFITSImageWriter"));
     276    LogIO os( casacore::LogOrigin("STFITSImageWriter"));
    277277    os << "Wrote " << fileName << LogIO::POST;
    278278    ++iter;
  • trunk/src/STFITSImageWriter.h

    r2658 r3106  
    3838//#include "Scantable.h"
    3939
    40 namespace casa {
     40namespace casacore {
    4141  class String;
    4242}
     
    5959
    6060// Write out ascii table
    61   casa::Bool write(const Scantable& table, const casa::String& name);
     61  casacore::Bool write(const Scantable& table, const casacore::String& name);
    6262
    63   void setClass(casa::Bool flag)  { isClass_ = flag; }
     63  void setClass(casacore::Bool flag)  { isClass_ = flag; }
    6464
    6565private:
    66   casa::DirectionCoordinate getDirectionCoordinate(const casa::String& reff,
    67                                                    casa::Double lon,
    68                                                    casa::Double lat);
     66  casacore::DirectionCoordinate getDirectionCoordinate(const casacore::String& reff,
     67                                                   casacore::Double lon,
     68                                                   casacore::Double lat);
    6969
    70   casa::Bool isClass_;
     70  casacore::Bool isClass_;
    7171};
    7272
  • trunk/src/STFiller.cpp

    r2658 r3106  
    4747#include "STHeader.h"
    4848
    49 using namespace casa;
     49using namespace casacore;
    5050
    5151namespace asap {
     
    8484}
    8585
    86 void STFiller::open( const std::string& filename, const std::string& antenna, int whichIF, int whichBeam, casa::Bool getPt )
     86void STFiller::open( const std::string& filename, const std::string& antenna, int whichIF, int whichBeam, casacore::Bool getPt )
    8787{
    8888  if (table_.null())  {
     
    164164    throw(AipsError("Failed to get header."));
    165165  }
    166   LogIO os( casa::LogOrigin( "STFiller") );
     166  LogIO os( casacore::LogOrigin( "STFiller") );
    167167 
    168168  if ((header_->obstype).matches("*SW*")) {
  • trunk/src/STFiller.h

    r3089 r3106  
    5252   * @param stbl
    5353   */
    54   explicit STFiller(casa::CountedPtr< Scantable > stbl);
     54  explicit STFiller(casacore::CountedPtr< Scantable > stbl);
    5555
    5656
     
    7676   * @exception AipsError Creation of PKSreader failed
    7777   */
    78   void open( const std::string& filename, const std::string& antenna, int whichIF=-1, int whichBeam=-1, casa::Bool getPt=casa::False );
     78  void open( const std::string& filename, const std::string& antenna, int whichIF=-1, int whichBeam=-1, casacore::Bool getPt=casacore::False );
    7979
    8080  /**
     
    9292  int read( );
    9393
    94   casa::CountedPtr<Scantable> getTable() const { return table_;}
     94  casacore::CountedPtr<Scantable> getTable() const { return table_;}
    9595
    9696  /**
     
    109109  void openNRO( int whichIF=-1, int whichBeam=-1 ) ;
    110110  int readNRO() ;
    111   casa::Bool fileCheck() ;
     111  casacore::Bool fileCheck() ;
    112112
    113113  void setReferenceExpr(const std::string& rx) { refRx_ = rx; }
     
    117117  PKSreader* reader_;
    118118  STHeader* header_;
    119   casa::String filename_;
    120   casa::CountedPtr< Scantable > table_;
    121   casa::Int nIF_, nBeam_, /* nPol_, nChan_,*/ nInDataRow;
    122   casa::uInt ifOffset_, beamOffset_;
    123   casa::Vector<casa::Bool> haveXPol_;
    124   casa::String refRx_;
     119  casacore::String filename_;
     120  casacore::CountedPtr< Scantable > table_;
     121  casacore::Int nIF_, nBeam_, /* nPol_, nChan_,*/ nInDataRow;
     122  casacore::uInt ifOffset_, beamOffset_;
     123  casacore::Vector<casacore::Bool> haveXPol_;
     124  casacore::String refRx_;
    125125  NROReader *nreader_ ;
    126   casa::Bool isNRO_ ;
     126  casacore::Bool isNRO_ ;
    127127};
    128128
  • trunk/src/STFit.cpp

    r3084 r3106  
    2525#include "STFit.h"
    2626
    27 
    28 using namespace casa;
     27using namespace casacore;
    2928
    3029namespace asap {
    3130
    32 const casa::String STFit::name_ = "FIT";
     31const String STFit::name_ = "FIT";
    3332
    3433STFit::STFit(const Scantable& parent) :
     
    5150}
    5251
    53 asap::STFit::STFit( casa::Table tab ) : STSubTable(tab, name_)
     52asap::STFit::STFit( casacore::Table tab ) : STSubTable(tab, name_)
    5453{
    5554    funcCol_.attach(table_,"FUNCTIONS");
  • trunk/src/STFit.h

    r1932 r3106  
    3131public:
    3232  STFit() {;}
    33   explicit STFit(casa::Table tab);
     33  explicit STFit(casacore::Table tab);
    3434  explicit STFit( const Scantable& parent);
    3535
     
    3838  STFit& operator=(const STFit& other);
    3939
    40   casa::uInt addEntry( const STFitEntry& fit, casa::Int id=-1 );
    41   void getEntry( STFitEntry& fit, casa::uInt id ) const;
     40  casacore::uInt addEntry( const STFitEntry& fit, casacore::Int id=-1 );
     41  void getEntry( STFitEntry& fit, casacore::uInt id ) const;
    4242
    43   const casa::String& name() const { return name_; }
     43  const casacore::String& name() const { return name_; }
    4444
    4545private:
    4646  void setup();
    47   static const casa::String name_;
    48   casa::ArrayColumn<casa::String> funcCol_;
    49   casa::ArrayColumn<casa::Int> compCol_;
    50   casa::ArrayColumn<casa::Double> parCol_;
    51   //  casa::ArrayColumn<casa::Double> errCol_;
    52   casa::ArrayColumn<casa::Bool> maskCol_;
    53   casa::ArrayColumn<casa::String> frameCol_;
     47  static const casacore::String name_;
     48  casacore::ArrayColumn<casacore::String> funcCol_;
     49  casacore::ArrayColumn<casacore::Int> compCol_;
     50  casacore::ArrayColumn<casacore::Double> parCol_;
     51  //  casacore::ArrayColumn<casacore::Double> errCol_;
     52  casacore::ArrayColumn<casacore::Bool> maskCol_;
     53  casacore::ArrayColumn<casacore::String> frameCol_;
    5454};
    5555
  • trunk/src/STFitEntry.cpp

    r1932 r3106  
    1313#include <casa/iostream.h>
    1414
    15 using namespace casa;
    1615namespace asap {
    1716
  • trunk/src/STFitter.cpp

    r3087 r3106  
    4949
    5050using namespace asap;
     51using namespace casacore;
    5152using namespace casa;
     53
     54namespace asap {
    5255
    5356Fitter::Fitter()
     
    483486  return fit;
    484487}
     488
     489}
  • trunk/src/STFitter.h

    r2666 r3106  
    8080private:
    8181  void clear();
    82   void applyConstraints(casa::GenericL2Fit<casa::Float>& fitter);
    83   casa::Vector<casa::Float> x_;
    84   casa::Vector<casa::Float> y_;
    85   casa::Vector<casa::Bool> m_;
    86   casa::PtrBlock<casa::Function<casa::Float>* > funcs_;
     82  void applyConstraints(casacore::GenericL2Fit<casacore::Float>& fitter);
     83  casacore::Vector<casacore::Float> x_;
     84  casacore::Vector<casacore::Float> y_;
     85  casacore::Vector<casacore::Bool> m_;
     86  casacore::PtrBlock<casacore::Function<casacore::Float>* > funcs_;
    8787  std::vector<std::string> funcnames_;
    8888  std::vector<int> funccomponents_;
    8989 
    9090  //Bool estimateSet_;
    91   casa::Float chisquared_;
    92   casa::Vector<casa::Float> parameters_;
    93   casa::Vector<casa::Bool> fixedpar_;
     91  casacore::Float chisquared_;
     92  casacore::Vector<casacore::Float> parameters_;
     93  casacore::Vector<casacore::Bool> fixedpar_;
    9494  std::vector<std::vector<float> > constraints_;
    9595
    96   casa::Vector<casa::Float> error_;
    97   casa::Vector<casa::Float> thefit_;
    98   casa::Vector<casa::Float> residual_;
    99   casa::Vector<casa::Float> estimate_;
     96  casacore::Vector<casacore::Float> error_;
     97  casacore::Vector<casacore::Float> thefit_;
     98  casacore::Vector<casacore::Float> residual_;
     99  casacore::Vector<casacore::Float> estimate_;
    100100};
    101101
  • trunk/src/STFocus.cpp

    r3084 r3106  
    2222
    2323
    24 using namespace casa;
     24using namespace casacore;
    2525
    2626namespace asap {
    2727
    28 const casa::String STFocus::name_ = "FOCUS";
     28const casacore::String STFocus::name_ = "FOCUS";
    2929
    3030STFocus::STFocus(const Scantable& parent ) :
     
    3434}
    3535
    36 STFocus::STFocus( casa::Table tab ) :
     36STFocus::STFocus( casacore::Table tab ) :
    3737  STSubTable(tab, name_)
    3838{
     
    158158
    159159
    160 casa::Float STFocus::getTotalAngle( casa::uInt id ) const
     160casacore::Float STFocus::getTotalAngle( casacore::uInt id ) const
    161161{
    162162  Float total = 0.0f;
     
    179179
    180180
    181 casa::Float STFocus::getFeedHand( casa::uInt id ) const
     181casacore::Float STFocus::getFeedHand( casacore::uInt id ) const
    182182{
    183183  Table t = table_(table_.col("ID") == Int(id), 1 );
  • trunk/src/STFocus.h

    r2289 r3106  
    3030public:
    3131  STFocus() {;}
    32   explicit STFocus(casa::Table tab);
     32  explicit STFocus(casacore::Table tab);
    3333  explicit STFocus( const Scantable& parent );
    3434
     
    3737  STFocus& operator=(const STFocus& other);
    3838
    39   casa::uInt addEntry( casa::Float pa, casa::Float faxis, casa::Float ftan,
    40                        casa::Float frot, casa::Float hand=1.0f,
    41                        casa::Float mount=0.0f, casa::Float user=0.0f,
    42                        casa::Float xyphase=0.0f,
    43                        casa::Float xyphaseoffset=0.0f);
     39  casacore::uInt addEntry( casacore::Float pa, casacore::Float faxis, casacore::Float ftan,
     40                       casacore::Float frot, casacore::Float hand=1.0f,
     41                       casacore::Float mount=0.0f, casacore::Float user=0.0f,
     42                       casacore::Float xyphase=0.0f,
     43                       casacore::Float xyphaseoffset=0.0f);
    4444
    45   void getEntry( casa::Float& pa, casa::Float& fax, casa::Float& ftan,
    46                  casa::Float& frot, casa::Float& hand,
    47                  casa::Float& mount, casa::Float& user,
    48                  casa::Float& xyphase, casa::Float& xyphaseoffset,
    49                  casa::uInt id) const;
     45  void getEntry( casacore::Float& pa, casacore::Float& fax, casacore::Float& ftan,
     46                 casacore::Float& frot, casacore::Float& hand,
     47                 casacore::Float& mount, casacore::Float& user,
     48                 casacore::Float& xyphase, casacore::Float& xyphaseoffset,
     49                 casacore::uInt id) const;
    5050
    51   casa::Float getTotalAngle(casa::uInt id) const;
     51  casacore::Float getTotalAngle(casacore::uInt id) const;
    5252
    53   casa::Float getParAngle(casa::uInt id) const {
     53  casacore::Float getParAngle(casacore::uInt id) const {
    5454    return parangleCol_(id);
    5555  }
    56   casa::Float getFeedHand(casa::uInt id) const;
     56  casacore::Float getFeedHand(casacore::uInt id) const;
    5757
    5858  void setParallactify(bool istrue=false);
    5959
    60   const casa::String& name() const { return name_; }
     60  const casacore::String& name() const { return name_; }
    6161
    6262private:
    6363  void setup();
    64   static const casa::String name_;
    65   casa::ScalarColumn<casa::Float> rotationCol_, axisCol_,
     64  static const casacore::String name_;
     65  casacore::ScalarColumn<casacore::Float> rotationCol_, axisCol_,
    6666    tanCol_,handCol_, parangleCol_,
    6767    mountCol_,userCol_, xyphCol_,xyphoffCol_;
  • trunk/src/STFrequencies.cpp

    r3084 r3106  
    3131
    3232
    33 using namespace casa;
     33using namespace casacore;
    3434
    3535namespace asap {
     
    4343}
    4444
    45 STFrequencies::STFrequencies( casa::Table tab ) :
     45STFrequencies::STFrequencies( casacore::Table tab ) :
    4646  STSubTable(tab, name_)
    4747{
     
    266266  if (!MFrequency::getType(mft, rf)) {
    267267    ostringstream oss;
    268     LogIO os( casa::LogOrigin( "STFrequencies", "getFrame") );
     268    LogIO os( casacore::LogOrigin( "STFrequencies", "getFrame") );
    269269    os << LogIO::WARN << "WARNING: Frequency type unknown assuming TOPO"
    270270       << LogIO::POST;
  • trunk/src/STFrequencies.h

    r2900 r3106  
    3232public:
    3333  STFrequencies() {;}
    34   explicit STFrequencies(casa::Table tab);
     34  explicit STFrequencies(casacore::Table tab);
    3535  explicit STFrequencies(const Scantable& parent);
    3636
     
    4646   * @return an index into the frequency table
    4747   */
    48   casa::uInt addEntry( casa::Double refpix, casa::Double refval,
    49                        casa::Double inc );
     48  casacore::uInt addEntry( casacore::Double refpix, casacore::Double refval,
     49                       casacore::Double inc );
    5050
    5151  /**
     
    5656   * @param id the identifier
    5757   */
    58   void getEntry( casa::Double& refpix, casa::Double& refval,
    59                  casa::Double& inc, casa::uInt id );
     58  void getEntry( casacore::Double& refpix, casacore::Double& refval,
     59                 casacore::Double& inc, casacore::uInt id );
    6060
    6161  /***
     
    6868   * 17/09/2008 Takeshi Nakazato
    6969   ***/
    70   void setEntry( casa::Double refpix, casa::Double refval,
    71                  casa::Double inc, casa::uInt id ) ;
     70  void setEntry( casacore::Double refpix, casacore::Double refval,
     71                 casacore::Double inc, casacore::uInt id ) ;
    7272
    7373
     
    7575
    7676  /**
    77    * Retrieve  the frequency values as a casa::SpectralCoordinate
     77   * Retrieve  the frequency values as a casacore::SpectralCoordinate
    7878   * @param freqID
    79    * @return casa::SpectralCoordinate
    80    */
    81   casa::SpectralCoordinate getSpectralCoordinate( casa::uInt freqID ) const;
    82 
    83   /**
    84   casa::SpectralCoordinate getSpectralCoordinate( const casa::MDirection& md,
    85                                                   const casa::MPosition& mp,
    86                                                   const casa::MEpoch& me,
    87                                                   casa::Double restfreq,
    88                                                   casa::uInt freqID
     79   * @return casacore::SpectralCoordinate
     80   */
     81  casacore::SpectralCoordinate getSpectralCoordinate( casacore::uInt freqID ) const;
     82
     83  /**
     84  casacore::SpectralCoordinate getSpectralCoordinate( const casacore::MDirection& md,
     85                                                  const casacore::MPosition& mp,
     86                                                  const casacore::MEpoch& me,
     87                                                  casacore::Double restfreq,
     88                                                  casacore::uInt freqID
    8989                                                  ) const;
    9090  **/
    91   casa::SpectralCoordinate getSpectralCoordinate( const casa::MDirection& md,
    92                                                   const casa::MPosition& mp,
    93                                                   const casa::MEpoch& me,
    94                                                   casa::Vector<casa::Double> restfreq,
    95                                                   casa::uInt freqID
     91  casacore::SpectralCoordinate getSpectralCoordinate( const casacore::MDirection& md,
     92                                                  const casacore::MPosition& mp,
     93                                                  const casacore::MEpoch& me,
     94                                                  casacore::Vector<casacore::Double> restfreq,
     95                                                  casacore::uInt freqID
    9696                                                  ) const;
    9797
    9898  /**
    9999   * Return the unit of the frequency values
    100    * @return casa::Unit
    101    */
    102   casa::Unit getUnit() const;
     100   * @return casacore::Unit
     101   */
     102  casacore::Unit getUnit() const;
    103103  std::string getUnitString() const;
    104104
    105105  /**
    106106   * Return the doppler type of the values
    107    * @return casa::MDoppler::Types
    108    */
    109   casa::MDoppler::Types getDoppler() const;
     107   * @return casacore::MDoppler::Types
     108   */
     109  casacore::MDoppler::Types getDoppler() const;
    110110  std::string getDopplerString() const;
    111111
     
    114114   * Return the frame type, e.g MFrequency::TOPO
    115115   * @param base return the base frame or the user frame
    116    * @return casa::MFrequency::Types
    117    */
    118   casa::MFrequency::Types getFrame(bool base=false) const;
     116   * @return casacore::MFrequency::Types
     117   */
     118  casacore::MFrequency::Types getFrame(bool base=false) const;
    119119
    120120  /**
     
    131131  void setFrame(const std::string& frame, bool base=false);
    132132  /**
    133    * set the frequency frame from a casa::MFrequency::Types
    134    * @param frame casa::MFrequency::Types
    135    */
    136   void setFrame(casa::MFrequency::Types frame, bool base=false);
     133   * set the frequency frame from a casacore::MFrequency::Types
     134   * @param frame casacore::MFrequency::Types
     135   */
     136  void setFrame(casacore::MFrequency::Types frame, bool base=false);
    137137  void setUnit( const std::string & unit );
    138138  void setDoppler( const std::string & doppler );
     
    144144   * @li "RESAMPLE"
    145145   */
    146   void rescale(casa::Float factor, const std::string& mode);
     146  void rescale(casacore::Float factor, const std::string& mode);
    147147
    148148  /**
     
    152152   * @return teh reference frequency
    153153   */
    154   float getRefFreq(casa::uInt id, casa::uInt channel);
     154  float getRefFreq(casacore::uInt id, casacore::uInt channel);
    155155
    156156  /**
     
    159159    * @param id the coordinate id
    160160    */
    161   void shiftRefPix(int npix, casa::uInt id);
     161  void shiftRefPix(int npix, casacore::uInt id);
    162162  /**
    163163   * Return this table or s specific row as a string representation
     
    165165   * @return a string
    166166   */
    167   std::string print(int id=-1, casa::Bool strip=casa::False) const;
     167  std::string print(int id=-1, casacore::Bool strip=casacore::False) const;
    168168
    169169  std::vector<std::string> getInfo() const;
    170170  void setInfo( const std::vector<std::string>& theinfo );
    171171
    172   const casa::String& name() const { return name_; }
     172  const casacore::String& name() const { return name_; }
    173173
    174174  /**
     
    185185   * @return boolean indicating match with any rows or not
    186186   */
    187   bool match( casa::Double refpix, casa::Double refval, casa::Double inc,
    188               casa::Double freqTolInHz, casa::uInt &id);
     187  bool match( casacore::Double refpix, casacore::Double refval, casacore::Double inc,
     188              casacore::Double freqTolInHz, casacore::uInt &id);
    189189
    190190private:
    191191
    192192  /**
    193    * setup the the column structure of the casa::table
     193   * setup the the column structure of the casacore::table
    194194   */
    195195  void setup();
     
    198198   * @param sc
    199199   * @param factor the bin factor
    200    * @return casa::SpectralCoordinate
    201    */
    202   casa::SpectralCoordinate binCsys(const casa::SpectralCoordinate& sc, casa::Int factor);
     200   * @return casacore::SpectralCoordinate
     201   */
     202  casacore::SpectralCoordinate binCsys(const casacore::SpectralCoordinate& sc, casacore::Int factor);
    203203  /**
    204204   * the actual resampling of the SpectralCoordinate as called by rescale
     
    207207   * @return
    208208   */
    209   casa::SpectralCoordinate resampleCsys(const casa::SpectralCoordinate& sc, casa::Float width);
    210 
    211   static const casa::String name_;
    212   casa::ScalarColumn<casa::Double> refvalCol_, refpixCol_, incrCol_;
     209  casacore::SpectralCoordinate resampleCsys(const casacore::SpectralCoordinate& sc, casacore::Float width);
     210
     211  static const casacore::String name_;
     212  casacore::ScalarColumn<casacore::Double> refvalCol_, refpixCol_, incrCol_;
    213213};
    214214
  • trunk/src/STGrid.cpp

    r3085 r3106  
    4040using namespace std ;
    4141using namespace concurrent ;
    42 using namespace casa ;
     42using namespace casacore;
    4343using namespace asap ;
    4444
  • trunk/src/STGrid.h

    r3085 r3106  
    3838
    3939using namespace std ;
    40 using namespace casa ;
     40using namespace casacore;
    4141
    4242namespace asap {
  • trunk/src/STHeader.cpp

    r1819 r3106  
    4444#include "STHeader.h"
    4545
    46 using namespace casa;
     46using namespace casacore;
    4747using namespace asap;
    4848
  • trunk/src/STHeader.h

    r1439 r3106  
    4040#include <measures/Measures/MDirection.h>
    4141
    42 namespace casa {
     42namespace casacore {
    4343  template<class T> class Matrix;
    4444}
     
    5050
    5151  bool conformant(const STHeader& other);
    52   casa::String diff( const STHeader& other );
     52  casacore::String diff( const STHeader& other );
    5353
    5454
    55   casa::Int nchan;
    56   casa::Int npol;
    57   casa::Int nif;
    58   casa::Int nbeam;
    59   casa::String observer;
    60   casa::String project;
    61   casa::String obstype;
    62   casa::String antennaname;
    63   casa::Vector<casa::Double> antennaposition;
    64   casa::Float equinox;
    65   casa::String freqref;
    66   casa::Double reffreq;
    67   casa::Double bandwidth;
    68   casa::Double utc;
    69   casa::String fluxunit;
    70   casa::String epoch;
    71   casa::String poltype;
     55  casacore::Int nchan;
     56  casacore::Int npol;
     57  casacore::Int nif;
     58  casacore::Int nbeam;
     59  casacore::String observer;
     60  casacore::String project;
     61  casacore::String obstype;
     62  casacore::String antennaname;
     63  casacore::Vector<casacore::Double> antennaposition;
     64  casacore::Float equinox;
     65  casacore::String freqref;
     66  casacore::Double reffreq;
     67  casacore::Double bandwidth;
     68  casacore::Double utc;
     69  casacore::String fluxunit;
     70  casacore::String epoch;
     71  casacore::String poltype;
    7272  void print() const ;
    7373};
     
    8585  // direction and another integer index which are just stored along
    8686  // with the the primary entries
    87   casa::uInt addEntry(const casa::String& source, casa::uInt ID,
    88                       const casa::MDirection& secDir, casa::uInt secID);
     87  casacore::uInt addEntry(const casacore::String& source, casacore::uInt ID,
     88                      const casacore::MDirection& secDir, casacore::uInt secID);
    8989
    9090  // Number of entries
    91   casa::Int length() const { return n_;}
     91  casacore::Int length() const { return n_;}
    9292
    9393  // Get attributes
    94   casa::String source(casa::uInt which) const {return source_[which];}
    95   casa::uInt ID(casa::uInt which) const {return ID_[which];}
    96   casa::uInt secID(casa::uInt which) const {return secID_[which];}
    97   casa::MDirection secDir(casa::uInt which) const {return secDir_[which];}
     94  casacore::String source(casacore::uInt which) const {return source_[which];}
     95  casacore::uInt ID(casacore::uInt which) const {return ID_[which];}
     96  casacore::uInt secID(casacore::uInt which) const {return secID_[which];}
     97  casacore::MDirection secDir(casacore::uInt which) const {return secDir_[which];}
    9898
    9999  // Summary
     
    101101
    102102private:
    103   casa::uInt n_;
    104   casa::Vector<casa::String> source_;
    105   casa::Vector<casa::uInt> ID_, secID_;
    106   casa::Block<casa::MDirection> secDir_;
     103  casacore::uInt n_;
     104  casacore::Vector<casacore::String> source_;
     105  casacore::Vector<casacore::uInt> ID_, secID_;
     106  casacore::Block<casacore::MDirection> secDir_;
    107107
    108108  SDDataDesc(const SDDataDesc& other);
  • trunk/src/STHistory.cpp

    r3084 r3106  
    2222#include "MathUtils.h"
    2323
    24 using namespace casa;
     24using namespace casacore;
    2525
    2626namespace asap {
    2727
    28 const casa::String STHistory::name_ = "HISTORY";
     28const casacore::String STHistory::name_ = "HISTORY";
    2929
    3030STHistory::STHistory(const Scantable& parent ) :
     
    3434}
    3535
    36 asap::STHistory::STHistory( casa::Table tab ) : STSubTable(tab, name_)
     36asap::STHistory::STHistory( casacore::Table tab ) : STSubTable(tab, name_)
    3737{
    3838  itemCol_.attach(table_,"ITEM");
  • trunk/src/STHistory.h

    r2820 r3106  
    3030public:
    3131  STHistory() {;}
    32   explicit STHistory(casa::Table tab);
     32  explicit STHistory(casacore::Table tab);
    3333  explicit STHistory( const Scantable& parent );
    3434
     
    4242   * @return an ID (irrelevant)
    4343   */
    44   casa::uInt addEntry( const casa::String& item);
     44  casacore::uInt addEntry( const casacore::String& item);
    4545
    4646  /**
     
    5050   * @param id an uInt ID
    5151   */
    52   void getEntry( casa::String& item, casa::uInt id);
     52  void getEntry( casacore::String& item, casacore::uInt id);
    5353
    5454  /**
     
    6464  std::vector<std::string> getHistory(int nrow=-1, int start=0 ) const;
    6565
    66   const casa::String& name() const { return name_; }
     66  const casacore::String& name() const { return name_; }
    6767
    6868  int nrow() const { return table_.nrow(); }
     
    7373private:
    7474  void setup();
    75   static const casa::String name_;
    76   casa::ScalarColumn<casa::String> itemCol_;
     75  static const casacore::String name_;
     76  casacore::ScalarColumn<casacore::String> itemCol_;
    7777};
    7878
  • trunk/src/STIdxIter.h

    r3078 r3106  
    1414
    1515using namespace std ;
    16 using namespace casa ;
     16using namespace casacore;
    1717
    1818//namespace {
  • trunk/src/STLineFinder.cpp

    r3086 r3106  
    4242
    4343using namespace asap;
    44 using namespace casa;
     44using namespace casacore;
    4545using namespace std;
    4646
     
    5757   // The input data to work with. Use reference symantics to avoid
    5858   // an unnecessary copying
    59    const casa::Vector<casa::Float>  &spectrum; // a buffer for the spectrum
    60    const casa::Vector<casa::Bool>   &mask; // associated mask
     59   const casacore::Vector<casacore::Float>  &spectrum; // a buffer for the spectrum
     60   const casacore::Vector<casacore::Bool>   &mask; // associated mask
    6161   const std::pair<int,int>         &edge; // start and stop+1 channels
    6262                                           // to work with
    6363
    6464   // statistics for running box filtering
    65    casa::Float sumf;       // sum of fluxes
    66    casa::Float sumf2;     // sum of squares of fluxes
    67    casa::Float sumch;       // sum of channel numbers (for linear fit)
    68    casa::Float sumch2;     // sum of squares of channel numbers (for linear fit)
    69    casa::Float sumfch;     // sum of flux*(channel number) (for linear fit)
     65   casacore::Float sumf;       // sum of fluxes
     66   casacore::Float sumf2;     // sum of squares of fluxes
     67   casacore::Float sumch;       // sum of channel numbers (for linear fit)
     68   casacore::Float sumch2;     // sum of squares of channel numbers (for linear fit)
     69   casacore::Float sumfch;     // sum of flux*(channel number) (for linear fit)
    7070
    7171   int box_chan_cntr;     // actual number of channels in the box
     
    7373                          // (calculated from boxsize and actual spectrum size)
    7474   // cache for derivative statistics
    75    mutable casa::Bool need2recalculate; // if true, values of the statistics
     75   mutable casacore::Bool need2recalculate; // if true, values of the statistics
    7676                                       // below are invalid
    77    mutable casa::Float linmean;  // a value of the linear fit to the
     77   mutable casacore::Float linmean;  // a value of the linear fit to the
    7878                                 // points in the running box
    79    mutable casa::Float linvariance; // the same for variance
     79   mutable casacore::Float linvariance; // the same for variance
    8080   int cur_channel;       // the number of the current channel
    8181   int start_advance;     // number of channel from which the box can
     
    8585   // set up the object with the references to actual data
    8686   // as well as the number of channels in the running box
    87    RunningBox(const casa::Vector<casa::Float>  &in_spectrum,
    88                  const casa::Vector<casa::Bool>   &in_mask,
     87   RunningBox(const casacore::Vector<casacore::Float>  &in_spectrum,
     88                 const casacore::Vector<casacore::Bool>   &in_mask,
    8989                 const std::pair<int,int>         &in_edge,
    9090                 int in_max_box_nchan);
    9191
    9292   // access to the statistics
    93    const casa::Float& getLinMean() const;
    94    const casa::Float& getLinVariance() const;
    95    casa::Float aboveMean() const;
     93   const casacore::Float& getLinMean() const;
     94   const casacore::Float& getLinVariance() const;
     95   casacore::Float aboveMean() const;
    9696   int getChannel() const;
    9797
     
    104104
    105105   // checking whether there are still elements
    106    casa::Bool haveMore() const;
     106   casacore::Bool haveMore() const;
    107107
    108108   // go to start
     
    136136   // was detected in the previous channels.
    137137   std::pair<int,int> cur_line;
    138    casa::Bool is_detected_before;
     138   casacore::Bool is_detected_before;
    139139   int  min_nchan;                         // A minimum number of consequtive
    140140                                           // channels, which should satisfy
    141141                                           // the detection criterion, to be
    142142                                           // a detection
    143    casa::Float threshold;                  // detection threshold - the
     143   casacore::Float threshold;                  // detection threshold - the
    144144                                           // minimal signal to noise ratio
    145145   std::list<pair<int,int> > &lines;       // list where detections are saved
    146146                                           // (pair: start and stop+1 channel)
    147147   RunningBox *running_box;                // running box filter
    148    casa::Vector<Int> signs;                // An array to store the signs of
     148   casacore::Vector<Int> signs;                // An array to store the signs of
    149149                                           // the value - current mean
    150150                                           // (used to search wings)
    151    casa::Int last_sign;                    // a sign (+1, -1 or 0) of the
     151   casacore::Int last_sign;                    // a sign (+1, -1 or 0) of the
    152152                                           // last point of the detected line
    153153                                           //
     
    163163   LFAboveThreshold(std::list<pair<int,int> > &in_lines,
    164164                    int in_min_nchan = 3,
    165                     casa::Float in_threshold = 5,
     165                    casacore::Float in_threshold = 5,
    166166                    bool use_median = false,
    167167                    int noise_sample_size = -1);
     
    169169
    170170   // replace the detection criterion
    171    void setCriterion(int in_min_nchan, casa::Float in_threshold);
     171   void setCriterion(int in_min_nchan, casacore::Float in_threshold);
    172172
    173173   // return the array with signs of the value-current mean
     
    175175   // This array is updated each time the findLines method is called and
    176176   // is used to search the line wings
    177    const casa::Vector<Int>& getSigns() const;
     177   const casacore::Vector<Int>& getSigns() const;
    178178
    179179   // find spectral lines and add them into list
     
    182182   //    spectrum, mask and edge - reference to the data
    183183   //    max_box_nchan  - number of channels in the running box
    184    void findLines(const casa::Vector<casa::Float> &spectrum,
    185                   const casa::Vector<casa::Bool> &mask,
     184   void findLines(const casacore::Vector<casacore::Float> &spectrum,
     185                  const casacore::Vector<casacore::Bool> &mask,
    186186                  const std::pair<int,int> &edge,
    187187                  int max_box_nchan);
     
    192192   // add a new line to the list, if necessary using processCurLine()
    193193   // detect=true indicates that the current channel satisfies the criterion
    194    void processChannel(Bool detect, const casa::Vector<casa::Bool> &mask);
     194   void processChannel(Bool detect, const casacore::Vector<casacore::Bool> &mask);
    195195
    196196   // process the interval of channels stored in curline
    197197   // if it satisfies the criterion, add this interval as a new line
    198    void processCurLine(const casa::Vector<casa::Bool> &mask);
     198   void processCurLine(const casacore::Vector<casacore::Bool> &mask);
    199199
    200200   // get the sign of runningBox->aboveMean(). The RunningBox pointer
    201201   // should be defined
    202    casa::Int getAboveMeanSign() const;
     202   casacore::Int getAboveMeanSign() const;
    203203};
    204204
     
    457457// set up the object with the references to actual data
    458458// and the number of channels in the running box
    459 RunningBox::RunningBox(const casa::Vector<casa::Float>  &in_spectrum,
    460                        const casa::Vector<casa::Bool>   &in_mask,
     459RunningBox::RunningBox(const casacore::Vector<casacore::Float>  &in_spectrum,
     460                       const casacore::Vector<casacore::Bool>   &in_mask,
    461461                       const std::pair<int,int>         &in_edge,
    462462                       int in_max_box_nchan) :
     
    488488
    489489// access to the statistics
    490 const casa::Float& RunningBox::getLinMean() const
     490const casacore::Float& RunningBox::getLinMean() const
    491491{
    492492  DebugAssert(cur_channel<edge.second, AipsError);
     
    495495}
    496496
    497 const casa::Float& RunningBox::getLinVariance() const
     497const casacore::Float& RunningBox::getLinVariance() const
    498498{
    499499  DebugAssert(cur_channel<edge.second, AipsError);
     
    502502}
    503503
    504 casa::Float RunningBox::aboveMean() const
     504casacore::Float RunningBox::aboveMean() const
    505505{
    506506  DebugAssert(cur_channel<edge.second, AipsError);
     
    561561
    562562// checking whether there are still elements
    563 casa::Bool RunningBox::haveMore() const
     563casacore::Bool RunningBox::haveMore() const
    564564{
    565565   return cur_channel<edge.second;
     
    611611LFAboveThreshold::LFAboveThreshold(std::list<pair<int,int> > &in_lines,
    612612                                   int in_min_nchan,
    613                                    casa::Float in_threshold,
     613                                   casacore::Float in_threshold,
    614614                                   bool use_median,
    615615                                   int noise_sample_size) :
     
    624624
    625625// replace the detection criterion
    626 void LFAboveThreshold::setCriterion(int in_min_nchan, casa::Float in_threshold)
     626void LFAboveThreshold::setCriterion(int in_min_nchan, casacore::Float in_threshold)
    627627{
    628628  min_nchan=in_min_nchan;
     
    632632// get the sign of runningBox->aboveMean(). The RunningBox pointer
    633633// should be defined
    634 casa::Int LFAboveThreshold::getAboveMeanSign() const
     634casacore::Int LFAboveThreshold::getAboveMeanSign() const
    635635{
    636636  const Float buf=running_box->aboveMean();
     
    644644// add a new line to the list, if necessary
    645645void LFAboveThreshold::processChannel(Bool detect,
    646                  const casa::Vector<casa::Bool> &mask)
     646                 const casacore::Vector<casacore::Bool> &mask)
    647647{
    648648  try {
     
    675675// process the interval of channels stored in cur_line
    676676// if it satisfies the criterion, add this interval as a new line
    677 void LFAboveThreshold::processCurLine(const casa::Vector<casa::Bool> &mask)
     677void LFAboveThreshold::processCurLine(const casacore::Vector<casacore::Bool> &mask)
    678678{
    679679  try {
     
    709709// This array is updated each time the findLines method is called and
    710710// is used to search the line wings
    711 const casa::Vector<Int>& LFAboveThreshold::getSigns() const
     711const casacore::Vector<Int>& LFAboveThreshold::getSigns() const
    712712{
    713713  return signs;
     
    715715
    716716// find spectral lines and add them into list
    717 void LFAboveThreshold::findLines(const casa::Vector<casa::Float> &spectrum,
    718                               const casa::Vector<casa::Bool> &mask,
     717void LFAboveThreshold::findLines(const casacore::Vector<casacore::Float> &spectrum,
     718                              const casacore::Vector<casacore::Bool> &mask,
    719719                              const std::pair<int,int> &edge,
    720720                              int max_box_nchan)
     
    905905// in_median    true if median statistics is used as opposed to average of
    906906//              the lowest 80% of deviations (default)
    907 void STLineFinder::setOptions(const casa::Float &in_threshold,
    908                               const casa::Int &in_min_nchan,
    909                               const casa::Int &in_avg_limit,
    910                               const casa::Float &in_box_size,
    911                               const casa::Float &in_noise_box,
    912                               const casa::Bool &in_median)
     907void STLineFinder::setOptions(const casacore::Float &in_threshold,
     908                              const casacore::Int &in_min_nchan,
     909                              const casacore::Int &in_avg_limit,
     910                              const casacore::Float &in_box_size,
     911                              const casacore::Float &in_noise_box,
     912                              const casacore::Bool &in_median)
    913913{
    914914  threshold=in_threshold;
     
    949949int STLineFinder::findLines(const std::vector<bool> &in_mask,
    950950                            const std::vector<int> &in_edge,
    951                             const casa::uInt &whichRow)
     951                            const casacore::uInt &whichRow)
    952952{
    953953  if (useScantable && scan.null())
     
    10961096// spectrum. It uses the Fitter class. This action is required before
    10971097// reducing the spectral resolution if the baseline shape is bad
    1098 void STLineFinder::subtractBaseline(const casa::Vector<casa::Bool> &temp_mask,
    1099                       const casa::Int &order)
     1098void STLineFinder::subtractBaseline(const casacore::Vector<casacore::Bool> &temp_mask,
     1099                      const casacore::Int &order)
    11001100{
    11011101  AlwaysAssert(spectrum.nelements(),AipsError);
     
    11121112  sdf.setExpression("poly",order);
    11131113  if (!sdf.lfit()) return; // fit failed, use old spectrum
    1114   spectrum=casa::Vector<casa::Float>(sdf.getResidual());
     1114  spectrum=casacore::Vector<casacore::Float>(sdf.getResidual());
    11151115}
    11161116
     
    11211121// array specified, rather than the field of this class
    11221122// boxsize - a number of adjacent channels to average
    1123 void STLineFinder::averageAdjacentChannels(casa::Vector<casa::Bool> &mask2update,
    1124                                    const casa::Int &boxsize)
     1123void STLineFinder::averageAdjacentChannels(casacore::Vector<casacore::Bool> &mask2update,
     1124                                   const casacore::Int &boxsize)
    11251125{
    11261126  DebugAssert(mask2update.nelements()==spectrum.nelements(), AipsError);
     
    12661266//                 nothing will be done if it is empty
    12671267// max_box_nchan - channels in the running box for baseline filtering
    1268 void STLineFinder::keepStrongestOnly(const casa::Vector<casa::Bool> &temp_mask,
     1268void STLineFinder::keepStrongestOnly(const casacore::Vector<casacore::Bool> &temp_mask,
    12691269                  std::list<std::pair<int, int> > &lines2update,
    12701270                  int max_box_nchan)
     
    13711371// merged together. Any masked channel stops the extension
    13721372void LFLineListOperations::searchForWings(std::list<std::pair<int, int> > &newlines,
    1373            const casa::Vector<casa::Int> &signs,
    1374            const casa::Vector<casa::Bool> &mask,
     1373           const casacore::Vector<casacore::Int> &signs,
     1374           const casacore::Vector<casacore::Bool> &mask,
    13751375           const std::pair<int,int> &edge)
    13761376{
  • trunk/src/STLineFinder.h

    r3085 r3106  
    7070   // merged together. Any masked channel stops the extension
    7171   static void searchForWings(std::list<std::pair<int, int> > &newlines,
    72                        const casa::Vector<casa::Int> &signs,
    73                        const casa::Vector<casa::Bool> &mask,
     72                       const casacore::Vector<casacore::Int> &signs,
     73                       const casacore::Vector<casacore::Bool> &mask,
    7474                       const std::pair<int,int> &edge);
    7575protected:
     
    153153   // in_median    true if median statistics is used as opposed to average of
    154154   //              the lowest 80% of deviations (default)
    155    void setOptions(const casa::Float &in_threshold=sqrt(3.),
    156                    const casa::Int &in_min_nchan=3,
    157                    const casa::Int &in_avg_limit=8,
    158                    const casa::Float &in_box_size=0.2,
    159                    const casa::Float &in_noise_box=-1.,
    160                    const casa::Bool &in_median = casa::False);
    161 
    162    void setDetailedOptions( const casa::Int &order=9 ) ;
     155   void setOptions(const casacore::Float &in_threshold=sqrt(3.),
     156                   const casacore::Int &in_min_nchan=3,
     157                   const casacore::Int &in_avg_limit=8,
     158                   const casacore::Float &in_box_size=0.2,
     159                   const casacore::Float &in_noise_box=-1.,
     160                   const casacore::Bool &in_median = casacore::False);
     161
     162   void setDetailedOptions( const casacore::Int &order=9 ) ;
    163163
    164164   // set the scan to work with (in_scan parameter)
     
    180180   int findLines(const std::vector<bool> &in_mask,
    181181                 const std::vector<int> &in_edge = std::vector<int>(),
    182                  const casa::uInt &whichRow = 0);
     182                 const casacore::uInt &whichRow = 0);
    183183
    184184   // get the mask to mask out all lines that have been found (default)
     
    202202   // array specified, rather than the field of this class
    203203   // boxsize - a number of adjacent channels to average
    204    void averageAdjacentChannels(casa::Vector<casa::Bool> &mask2update,
    205                                const casa::Int &boxsize);
     204   void averageAdjacentChannels(casacore::Vector<casacore::Bool> &mask2update,
     205                               const casacore::Int &boxsize);
    206206
    207207   // auxiliary function to fit and subtract a polynomial from the current
    208208   // spectrum. It uses the Fitter class. This action is required before
    209209   // reducing the spectral resolution if the baseline shape is bad
    210    void subtractBaseline(const casa::Vector<casa::Bool> &temp_mask,
    211                          const casa::Int &order);
     210   void subtractBaseline(const casacore::Vector<casacore::Bool> &temp_mask,
     211                         const casacore::Int &order);
    212212
    213213   // an auxiliary function to remove all lines from the list, except the
     
    224224   //                 nothing will be done if it is empty
    225225   // max_box_nchan - channels in the running box for baseline filtering
    226    void keepStrongestOnly(const casa::Vector<casa::Bool> &temp_mask,
     226   void keepStrongestOnly(const casacore::Vector<casacore::Bool> &temp_mask,
    227227                          std::list<std::pair<int, int> > &lines2update,
    228228                          int max_box_nchan);
    229229private:
    230    casa::CountedPtr<Scantable> scan; // the scan to work with
    231    casa::Vector<casa::Bool> mask;          // associated mask
     230   casacore::CountedPtr<Scantable> scan; // the scan to work with
     231   casacore::Vector<casacore::Bool> mask;          // associated mask
    232232   std::pair<int,int> edge;                // start and stop+1 channels
    233233                                           // to work with
    234    casa::Float threshold;                  // detection threshold - the
     234   casacore::Float threshold;                  // detection threshold - the
    235235                                           // minimal signal to noise ratio
    236    casa::Double box_size;                  // size of the box for running
     236   casacore::Double box_size;              // size of the box for running
    237237                                           // mean calculations, specified as
    238238                                           // a fraction of the whole spectrum
     
    241241                                           // the detection criterion, to be
    242242                                           // a detection
    243    casa::Int   avg_limit;                  // perform the averaging of no
     243   casacore::Int   avg_limit;                  // perform the averaging of no
    244244                                           // more than in_avg_limit
    245245                                           // adjacent channels to search
    246246                                           // for broad lines. see setOptions
    247    casa::uInt last_row_used;                // the Row number specified
     247   casacore::uInt last_row_used;                // the Row number specified
    248248                                           // during the last findLines call
    249249   std::list<std::pair<int, int> > lines;  // container of start and stop+1
    250250                                           // channels of the spectral lines
    251251   // a buffer for the spectrum
    252    mutable casa::Vector<casa::Float>  spectrum;
     252   mutable casacore::Vector<casacore::Float>  spectrum;
    253253
    254254   // the box size for off-line noise estimation (if working with
    255255   // local noise. Negative value means use global noise estimate
    256256   // Default is -1 (i.e. estimate using the whole spectrum)
    257    casa::Float itsNoiseBox;
     257   casacore::Float itsNoiseBox;
    258258
    259259   // true if median statistics is used as opposed to average of
    260260   // the lowest 80% of deviations (default)
    261    casa::Bool itsUseMedian;
     261   casacore::Bool itsUseMedian;
    262262
    263263   // true if spectra and mask data should be provided from
     
    266266
    267267   // shared object for nominal throw
    268    casa::AipsError err ;
     268   casacore::AipsError err ;
    269269};
    270270
  • trunk/src/STMath.cpp

    r3089 r3106  
    6363#include "CalibrationHelper.h"
    6464
    65 using namespace casa;
    66 using namespace asap;
     65using namespace casacore;
     66
     67namespace asap {
    6768
    6869// 2012/02/17 TN
     
    13081309                                          const CountedPtr < Scantable >& ref,
    13091310                                          int smoothref,
    1310                                           casa::Float tsysv,
    1311                                           casa::Float tau )
    1312 {
    1313   LogIO os( casa::LogOrigin( "STMath", "dosigref()"));
     1311                                          casacore::Float tsysv,
     1312                                          casacore::Float tau )
     1313{
     1314  LogIO os( casacore::LogOrigin( "STMath", "dosigref()"));
    13141315if ( ! ref->conformant(*sig) ) {
    13151316    throw(AipsError("'sig' and 'ref' scantables are not conformant."));
     
    14101411}
    14111412
    1412 CountedPtr< Scantable > STMath::donod(const casa::CountedPtr<Scantable>& s,
     1413CountedPtr< Scantable > STMath::donod(const casacore::CountedPtr<Scantable>& s,
    14131414                                     const std::vector<int>& scans,
    14141415                                     int smoothref,
    1415                                      casa::Float tsysv,
    1416                                      casa::Float tau,
    1417                                      casa::Float tcal )
     1416                                     casacore::Float tsysv,
     1417                                     casacore::Float tau,
     1418                                     casacore::Float tcal )
    14181419
    14191420{
    14201421  setInsitu(false);
    1421   LogIO os( casa::LogOrigin( "STMath", "donod()"));
     1422  LogIO os( casacore::LogOrigin( "STMath", "donod()"));
    14221423  STSelector sel;
    14231424  std::vector<int> scan1, scan2, beams, types;
     
    15891590                                      const std::vector<int>& scans,
    15901591                                      int smoothref,
    1591                                       casa::Float tsysv,
    1592                                       casa::Float tau,
    1593                                       casa::Float tcal )
     1592                                      casacore::Float tsysv,
     1593                                      casacore::Float tau,
     1594                                      casacore::Float tcal )
    15941595{
    15951596
     
    29282929                                const std::string & method)
    29292930{
    2930   LogIO os( casa::LogOrigin("STMath", "frequencyAlign()", WHERE));
     2931  LogIO os( casacore::LogOrigin("STMath", "frequencyAlign()", WHERE));
    29312932  // clone as this is not working insitu
    29322933  bool insitu = insitu_;
     
    31583159
    31593160std::vector<float>
    3160   asap::STMath::fft( const casa::CountedPtr< Scantable > & in,
     3161  asap::STMath::fft( const casacore::CountedPtr< Scantable > & in,
    31613162                     const std::vector<int>& whichrow,
    31623163                     bool getRealImag )
     
    32503251                     const std::string& weight,
    32513252                     const std::string& avmode )
    3252   throw ( casa::AipsError )
     3253  throw ( casacore::AipsError )
    32533254{
    32543255  LogIO os( LogOrigin( "STMath", "new_average()", WHERE ) ) ;
     
    43594360  return a ;
    43604361}
     4362
     4363}
  • trunk/src/STMath.h

    r2952 r3106  
    3737public:
    3838        // typedef for long method name
    39   typedef casa::InterpolateArray1D<casa::Double,
    40                                    casa::Float>::InterpolationMethod imethod;
     39  typedef casacore::InterpolateArray1D<casacore::Double,
     40                                   casacore::Float>::InterpolationMethod imethod;
    4141
    4242  // typedef for std::map
     
    6969    * @param weight weighting scheme
    7070    * @param avmode the mode ov averaging. Per "SCAN" or "ALL".
    71     * @return a casa::CountedPtr<Scantable> which either holds a new Scantable
     71    * @return a casacore::CountedPtr<Scantable> which either holds a new Scantable
    7272    * or returns the imput pointer.
    7373    */
    74   casa::CountedPtr<Scantable>
    75     average( const std::vector<casa::CountedPtr<Scantable> >& in,
     74  casacore::CountedPtr<Scantable>
     75    average( const std::vector<casacore::CountedPtr<Scantable> >& in,
    7676             const std::vector<bool>& mask = std::vector<bool>(),
    7777             const std::string& weight = "NONE",
     
    8383    * @param mode the averaging mode. Currently only "MEDIAN"
    8484    * @param avmode the mode ov averaging. Per "SCAN" or "ALL".
    85     * @return a casa::CountedPtr<Scantable> which either holds a new Scantable
     85    * @return a casacore::CountedPtr<Scantable> which either holds a new Scantable
    8686    * or returns the imput pointer.
    8787    */
    88   casa::CountedPtr<Scantable>
    89     averageChannel( const casa::CountedPtr<Scantable> & in,
     88  casacore::CountedPtr<Scantable>
     89    averageChannel( const casacore::CountedPtr<Scantable> & in,
    9090                    const std::string& mode = "MEDIAN",
    9191                    const std::string& avmode = "SCAN");
     
    9999    * @return
    100100    */
    101   casa::CountedPtr< Scantable >
    102     averagePolarisations( const casa::CountedPtr< Scantable > & in,
     101  casacore::CountedPtr< Scantable >
     102    averagePolarisations( const casacore::CountedPtr< Scantable > & in,
    103103                          const std::vector<bool>& mask,
    104104                          const std::string& weight );
     
    111111    * @return
    112112    */
    113   casa::CountedPtr< Scantable >
    114     averageBeams( const casa::CountedPtr< Scantable > & in,
     113  casacore::CountedPtr< Scantable >
     114    averageBeams( const casacore::CountedPtr< Scantable > & in,
    115115                   const std::vector<bool>& mask,
    116116                   const std::string& weight );
    117117
    118   casa::CountedPtr<Scantable>
    119     unaryOperate( const casa::CountedPtr<Scantable>& in, float val,
     118  casacore::CountedPtr<Scantable>
     119    unaryOperate( const casacore::CountedPtr<Scantable>& in, float val,
    120120                  const std::string& mode, bool tsys=false,
    121121                  bool skip_flaggedrow=false );
    122122
    123123  // array operation
    124   casa::CountedPtr<Scantable>
    125     arrayOperate( const casa::CountedPtr<Scantable>& in,
     124  casacore::CountedPtr<Scantable>
     125    arrayOperate( const casacore::CountedPtr<Scantable>& in,
    126126                  const std::vector<float> val,
    127127                  const std::string& mode,
     
    131131
    132132  // channel operation
    133   casa::CountedPtr<Scantable>
    134     arrayOperateChannel( const casa::CountedPtr<Scantable>& in,
     133  casacore::CountedPtr<Scantable>
     134    arrayOperateChannel( const casacore::CountedPtr<Scantable>& in,
    135135                         const std::vector<float> val,
    136136                         const std::string& mode, bool tsys=false,
     
    138138
    139139  // row operation
    140   casa::CountedPtr<Scantable>
    141     arrayOperateRow( const casa::CountedPtr<Scantable>& in,
     140  casacore::CountedPtr<Scantable>
     141    arrayOperateRow( const casacore::CountedPtr<Scantable>& in,
    142142                     const std::vector<float> val,
    143143                     const std::string& mode, bool tsys=false,
     
    145145
    146146  // 2d array operation
    147   casa::CountedPtr<Scantable>
    148     array2dOperate( const casa::CountedPtr<Scantable>& in,
     147  casacore::CountedPtr<Scantable>
     148    array2dOperate( const casacore::CountedPtr<Scantable>& in,
    149149                  const std::vector< std::vector<float> > val,
    150150                  const std::string& mode, bool tsys=false );
    151151
    152   casa::CountedPtr<Scantable>
    153     binaryOperate( const casa::CountedPtr<Scantable>& left,
    154                    const casa::CountedPtr<Scantable>& right,
     152  casacore::CountedPtr<Scantable>
     153    binaryOperate( const casacore::CountedPtr<Scantable>& left,
     154                   const casacore::CountedPtr<Scantable>& right,
    155155                   const std::string& mode);
    156156
    157   casa::CountedPtr<Scantable> autoQuotient(const casa::CountedPtr<Scantable>& in,
     157  casacore::CountedPtr<Scantable> autoQuotient(const casacore::CountedPtr<Scantable>& in,
    158158                                           const std::string& mode = "NEAREST",
    159159                                           bool preserve = true);
    160160
    161   casa::CountedPtr<Scantable> quotient( const casa::CountedPtr<Scantable>& on,
    162                                         const casa::CountedPtr<Scantable>& off,
     161  casacore::CountedPtr<Scantable> quotient( const casacore::CountedPtr<Scantable>& on,
     162                                        const casacore::CountedPtr<Scantable>& off,
    163163                                        bool preserve = true );
    164164
     
    168168    * @param caloff uncalibrated Scantable with no CAL signal
    169169    * @param tcal optional scalar Tcal, CAL temperature (K)
    170     * @return casa::CountedPtr<Scantable> which holds a calibrated Scantable
     170    * @return casacore::CountedPtr<Scantable> which holds a calibrated Scantable
    171171    * (spectrum - average of the two CAL on and off spectra;
    172172    * tsys - mean Tsys = <caloff>*Tcal/<calon-caloff> + Tcal/2)
    173173    */             
    174   casa::CountedPtr<Scantable> dototalpower( const casa::CountedPtr<Scantable>& calon,
    175                                             const casa::CountedPtr<Scantable>& caloff,
    176                                             casa::Float tcal=1.0 );
     174  casacore::CountedPtr<Scantable> dototalpower( const casacore::CountedPtr<Scantable>& calon,
     175                                            const casacore::CountedPtr<Scantable>& caloff,
     176                                            casacore::Float tcal=1.0 );
    177177
    178178  /**
     
    185185    * set tau, as well
    186186    * @param tau optional scalar Tau value
    187     * @return casa::CountedPtr<Scantable> which holds combined scans
     187    * @return casacore::CountedPtr<Scantable> which holds combined scans
    188188    * (spectrum = (sig-ref)/ref * Tsys )
    189189    */
    190   casa::CountedPtr<Scantable> dosigref( const casa::CountedPtr<Scantable>& sig,
    191                                         const casa::CountedPtr<Scantable>& ref,
     190  casacore::CountedPtr<Scantable> dosigref( const casacore::CountedPtr<Scantable>& sig,
     191                                        const casacore::CountedPtr<Scantable>& ref,
    192192                                        int smoothref=1,
    193                                         casa::Float tsysv=0.0,
    194                                         casa::Float tau=0.0 );
     193                                        casacore::Float tsysv=0.0,
     194                                        casacore::Float tau=0.0 );
    195195
    196196  /**
     
    203203    * @param tau optional scalar Tau value
    204204    * @param tcal optional scalar Tcal, CAL temperature (K)
    205     * @return casa::CountedPtr<Scantable> which holds calibrated scans
    206     */
    207   casa::CountedPtr<Scantable> donod( const casa::CountedPtr<Scantable>& s,
     205    * @return casacore::CountedPtr<Scantable> which holds calibrated scans
     206    */
     207  casacore::CountedPtr<Scantable> donod( const casacore::CountedPtr<Scantable>& s,
    208208                                     const std::vector<int>& scans,
    209209                                     int smoothref=1,
    210                                      casa::Float tsysv=0.0,
    211                                      casa::Float tau=0.0,
    212                                      casa::Float tcal=0.0 );
     210                                     casacore::Float tsysv=0.0,
     211                                     casacore::Float tau=0.0,
     212                                     casacore::Float tcal=0.0 );
    213213
    214214  /**
     
    221221    * @param tau optional scalar Tau value
    222222    * @param tcal optional scalar Tcal, CAL temperature (K)
    223     * @return casa::CountedPtr<Scantable> which holds calibrated scans
    224     */
    225   casa::CountedPtr<Scantable> dofs( const casa::CountedPtr<Scantable>& s,
     223    * @return casacore::CountedPtr<Scantable> which holds calibrated scans
     224    */
     225  casacore::CountedPtr<Scantable> dofs( const casacore::CountedPtr<Scantable>& s,
    226226                                    const std::vector<int>& scans,
    227227                                    int smoothref=1,
    228                                     casa::Float tsysv=0.0,
    229                                     casa::Float tau=0.0,
    230                                     casa::Float tcal=0.0 );
     228                                    casacore::Float tsysv=0.0,
     229                                    casacore::Float tau=0.0,
     230                                    casacore::Float tcal=0.0 );
    231231
    232232  /**
     
    241241   * @param a string that indicates antenna name
    242242   **/
    243   casa::CountedPtr<Scantable> cwcal( const casa::CountedPtr<Scantable>& s,
    244                                        const casa::String calmode,
    245                                        const casa::String antname );
     243  casacore::CountedPtr<Scantable> cwcal( const casacore::CountedPtr<Scantable>& s,
     244                                       const casacore::String calmode,
     245                                       const casacore::String antname );
    246246
    247247  /**
     
    254254   * @param a string that indicates antenna name
    255255   **/
    256   casa::CountedPtr<Scantable> cwcalfs( const casa::CountedPtr<Scantable>& s,
    257                                        const casa::String antname );
     256  casacore::CountedPtr<Scantable> cwcalfs( const casacore::CountedPtr<Scantable>& s,
     257                                       const casacore::String antname );
    258258
    259259
     
    264264   * @param choffset
    265265   **/
    266   casa::CountedPtr<Scantable> dofold( const casa::CountedPtr<Scantable> &sig,
    267                                       const casa::CountedPtr<Scantable> &ref,
    268                                       casa::Double choffset,
    269                                       casa::Double choffset2 = 0.0 );
     266  casacore::CountedPtr<Scantable> dofold( const casacore::CountedPtr<Scantable> &sig,
     267                                      const casacore::CountedPtr<Scantable> &ref,
     268                                      casacore::Double choffset,
     269                                      casacore::Double choffset2 = 0.0 );
    270270
    271271  /**
    272272   * ALMA calibration
    273273   **/
    274   casa::CountedPtr<Scantable> almacal( const casa::CountedPtr<Scantable>& s,
    275                                        const casa::String calmode ) ;
    276   casa::CountedPtr<Scantable> almacalfs( const casa::CountedPtr<Scantable>& s ) ;
    277 
    278   casa::CountedPtr<Scantable>
    279     freqSwitch( const casa::CountedPtr<Scantable>& in );
    280 
    281   std::vector<float> statistic(const casa::CountedPtr<Scantable>& in,
     274  casacore::CountedPtr<Scantable> almacal( const casacore::CountedPtr<Scantable>& s,
     275                                       const casacore::String calmode ) ;
     276  casacore::CountedPtr<Scantable> almacalfs( const casacore::CountedPtr<Scantable>& s ) ;
     277
     278  casacore::CountedPtr<Scantable>
     279    freqSwitch( const casacore::CountedPtr<Scantable>& in );
     280
     281  std::vector<float> statistic(const casacore::CountedPtr<Scantable>& in,
    282282                               const std::vector<bool>& mask,
    283283                               const std::string& which);
    284284
    285   std::vector<float> statisticRow(const casa::CountedPtr<Scantable>& in,
     285  std::vector<float> statisticRow(const casacore::CountedPtr<Scantable>& in,
    286286                               const std::vector<bool>& mask,
    287287                               const std::string& which,
    288288                               int row);
    289289
    290   std::vector< int > minMaxChan(const casa::CountedPtr<Scantable>& in,
     290  std::vector< int > minMaxChan(const casacore::CountedPtr<Scantable>& in,
    291291                                const std::vector<bool>& mask,
    292292                                const std::string& which);
    293293
    294   casa::CountedPtr<Scantable> bin( const casa::CountedPtr<Scantable>& in,
     294  casacore::CountedPtr<Scantable> bin( const casacore::CountedPtr<Scantable>& in,
    295295                                   int width=5);
    296   casa::CountedPtr<Scantable>
    297     resample(const casa::CountedPtr<Scantable>& in,
     296  casacore::CountedPtr<Scantable>
     297    resample(const casacore::CountedPtr<Scantable>& in,
    298298             const std::string& method, float width);
    299299
    300   casa::CountedPtr<Scantable>
    301     smooth(const casa::CountedPtr<Scantable>& in, const std::string& kernel,
     300  casacore::CountedPtr<Scantable>
     301    smooth(const casacore::CountedPtr<Scantable>& in, const std::string& kernel,
    302302                      float width, int order=2);
    303303
    304   casa::CountedPtr<Scantable>
    305     gainElevation(const casa::CountedPtr<Scantable>& in,
     304  casacore::CountedPtr<Scantable>
     305    gainElevation(const casacore::CountedPtr<Scantable>& in,
    306306                  const std::vector<float>& coeff,
    307307                  const std::string& fileName,
    308308                  const std::string& method);
    309   casa::CountedPtr<Scantable>
    310     convertFlux(const casa::CountedPtr<Scantable>& in, float d,
     309  casacore::CountedPtr<Scantable>
     310    convertFlux(const casacore::CountedPtr<Scantable>& in, float d,
    311311                float etaap, float jyperk);
    312312
    313   casa::CountedPtr<Scantable> opacity(const casa::CountedPtr<Scantable>& in,
     313  casacore::CountedPtr<Scantable> opacity(const casacore::CountedPtr<Scantable>& in,
    314314                                      const std::vector<float>& tau);
    315315
    316   casa::CountedPtr<Scantable>
    317     merge(const std::vector<casa::CountedPtr<Scantable> >& in,
     316  casacore::CountedPtr<Scantable>
     317    merge(const std::vector<casacore::CountedPtr<Scantable> >& in,
    318318          const std::string &freqTol = "");
    319319
    320   casa::CountedPtr<Scantable>
    321     invertPhase( const casa::CountedPtr<Scantable>& in);
    322 
    323   casa::CountedPtr<Scantable>
    324     rotateXYPhase( const casa::CountedPtr<Scantable>& in, float phase);
    325 
    326   casa::CountedPtr<Scantable>
    327     rotateLinPolPhase( const casa::CountedPtr<Scantable>& in, float phase);
    328 
    329   casa::CountedPtr<Scantable>
    330     swapPolarisations(const casa::CountedPtr<Scantable>& in);
    331 
    332   casa::CountedPtr<Scantable>
    333     frequencyAlign( const casa::CountedPtr<Scantable>& in,
     320  casacore::CountedPtr<Scantable>
     321    invertPhase( const casacore::CountedPtr<Scantable>& in);
     322
     323  casacore::CountedPtr<Scantable>
     324    rotateXYPhase( const casacore::CountedPtr<Scantable>& in, float phase);
     325
     326  casacore::CountedPtr<Scantable>
     327    rotateLinPolPhase( const casacore::CountedPtr<Scantable>& in, float phase);
     328
     329  casacore::CountedPtr<Scantable>
     330    swapPolarisations(const casacore::CountedPtr<Scantable>& in);
     331
     332  casacore::CountedPtr<Scantable>
     333    frequencyAlign( const casacore::CountedPtr<Scantable>& in,
    334334                    const std::string& refTime = "",
    335335                    const std::string& method = "cubic" );
    336336
    337   casa::CountedPtr<Scantable>
    338     convertPolarisation( const casa::CountedPtr<Scantable>& in,
     337  casacore::CountedPtr<Scantable>
     338    convertPolarisation( const casacore::CountedPtr<Scantable>& in,
    339339                         const std::string& newtype);
    340340
    341   casa::CountedPtr<Scantable>
    342     mxExtract( const casa::CountedPtr<Scantable>& in,
     341  casacore::CountedPtr<Scantable>
     342    mxExtract( const casacore::CountedPtr<Scantable>& in,
    343343               const std::string& srctype = "on");
    344344
     
    348348   * @param width the number of lags to flag left to the side of the frequency
    349349   */
    350   casa::CountedPtr<Scantable>
    351     lagFlag( const casa::CountedPtr<Scantable>& in, double start,
     350  casacore::CountedPtr<Scantable>
     351    lagFlag( const casacore::CountedPtr<Scantable>& in, double start,
    352352             double end, const std::string& mode="frequency");
    353353
    354354  std::vector<float>
    355     fft( const casa::CountedPtr<Scantable>& in,
     355    fft( const casacore::CountedPtr<Scantable>& in,
    356356         const std::vector<int>& whichrow,
    357357         bool getRealImag=false );
    358358
    359359  // test for average spectra with different channel/resolution
    360   casa::CountedPtr<Scantable>
    361     new_average( const std::vector<casa::CountedPtr<Scantable> >& in,
     360  casacore::CountedPtr<Scantable>
     361    new_average( const std::vector<casacore::CountedPtr<Scantable> >& in,
    362362                 const bool& compel,
    363363                 const std::vector<bool>& mask = std::vector<bool>(),
    364364                 const std::string& weight = "NONE",
    365365                 const std::string& avmode = "SCAN" )
    366     throw (casa::AipsError) ;
     366    throw (casacore::AipsError) ;
    367367
    368368private:
    369   casa::CountedPtr<Scantable>  applyToPol( const casa::CountedPtr<Scantable>& in,
     369  casacore::CountedPtr<Scantable>  applyToPol( const casacore::CountedPtr<Scantable>& in,
    370370                                           STPol::polOperation fptr,
    371                                            casa::Float phase);
     371                                           casacore::Float phase);
    372372
    373373  static imethod stringToIMethod(const std::string& in);
    374374  static WeightType stringToWeight(const std::string& in);
    375375
    376   void scaleByVector(casa::Table& in,
    377                      const casa::Vector<casa::Float>& factor,
     376  void scaleByVector(casacore::Table& in,
     377                     const casacore::Vector<casacore::Float>& factor,
    378378                     bool dotsys);
    379379
    380   void scaleFromAsciiTable(casa::Table& in, const std::string& filename,
     380  void scaleFromAsciiTable(casacore::Table& in, const std::string& filename,
    381381                           const std::string& method,
    382                            const casa::Vector<casa::Float>& xout,
     382                           const casacore::Vector<casacore::Float>& xout,
    383383                           bool dotsys);
    384384
    385   void scaleFromTable(casa::Table& in, const casa::Table& table,
     385  void scaleFromTable(casacore::Table& in, const casacore::Table& table,
    386386                      const std::string& method,
    387                       const casa::Vector<casa::Float>& xout, bool dotsys);
    388 
    389   void convertBrightnessUnits(casa::CountedPtr<Scantable>& in,
     387                      const casacore::Vector<casacore::Float>& xout, bool dotsys);
     388
     389  void convertBrightnessUnits(casacore::CountedPtr<Scantable>& in,
    390390                              bool tokelvin, float cfac);
    391391
    392   casa::CountedPtr< Scantable >
    393     smoothOther( const casa::CountedPtr< Scantable >& in,
     392  casacore::CountedPtr< Scantable >
     393    smoothOther( const casacore::CountedPtr< Scantable >& in,
    394394                 const std::string& kernel,
    395395                 float width, int order=2 );
    396396
    397   casa::CountedPtr< Scantable >
    398     getScantable(const casa::CountedPtr< Scantable >& in, bool droprows);
    399 
    400   casa::MaskedArray<casa::Float>
    401     maskedArray( const casa::Vector<casa::Float>& s,
    402                  const casa::Vector<casa::uChar>& f );
    403   casa::MaskedArray<casa::Double>
    404     maskedArray( const casa::Vector<casa::Double>& s,
    405                  const casa::Vector<casa::uChar>& f );
    406   casa::Vector<casa::uChar>
    407     flagsFromMA(const casa::MaskedArray<casa::Float>& ma);
     397  casacore::CountedPtr< Scantable >
     398    getScantable(const casacore::CountedPtr< Scantable >& in, bool droprows);
     399
     400  casacore::MaskedArray<casacore::Float>
     401    maskedArray( const casacore::Vector<casacore::Float>& s,
     402                 const casacore::Vector<casacore::uChar>& f );
     403  casacore::MaskedArray<casacore::Double>
     404    maskedArray( const casacore::Vector<casacore::Double>& s,
     405                 const casacore::Vector<casacore::uChar>& f );
     406  casacore::Vector<casacore::uChar>
     407    flagsFromMA(const casacore::MaskedArray<casacore::Float>& ma);
    408408
    409409  // Frequency switching
    410   void calibrateFS( casa::CountedPtr<Scantable> &sig,
    411                     casa::CountedPtr<Scantable> &ref,
    412                     const casa::CountedPtr<Scantable> &rsig,
    413                     const casa::CountedPtr<Scantable> &rref,
    414                     const casa::CountedPtr<Scantable> &sky,
    415                     const casa::CountedPtr<Scantable> &hot,
    416                     const casa::CountedPtr<Scantable> &cold,
    417                     const casa::Vector<casa::uInt> &rows ) ;
    418   void calibrateAPEXFS( casa::CountedPtr<Scantable> &sig,
    419                         casa::CountedPtr<Scantable> &ref,
    420                         const vector< casa::CountedPtr<Scantable> > &on,
    421                         const vector< casa::CountedPtr<Scantable> > &sky,
    422                         const vector< casa::CountedPtr<Scantable> > &hot,
    423                         const vector< casa::CountedPtr<Scantable> > &cold,
    424                         const casa::Vector<casa::uInt> &rows ) ;
    425   void copyRows( casa::Table &out,
    426                  const casa::Table &in,
    427                  casa::uInt startout,
    428                  casa::uInt startin,
    429                  casa::uInt nrow,
    430                  casa::Bool copySpectra=true,
    431                  casa::Bool copyFlagtra=true,
    432                  casa::Bool copyTsys=true ) ;
    433   casa::CountedPtr<Scantable> averageWithinSession( casa::CountedPtr<Scantable> &s,
     410  void calibrateFS( casacore::CountedPtr<Scantable> &sig,
     411                    casacore::CountedPtr<Scantable> &ref,
     412                    const casacore::CountedPtr<Scantable> &rsig,
     413                    const casacore::CountedPtr<Scantable> &rref,
     414                    const casacore::CountedPtr<Scantable> &sky,
     415                    const casacore::CountedPtr<Scantable> &hot,
     416                    const casacore::CountedPtr<Scantable> &cold,
     417                    const casacore::Vector<casacore::uInt> &rows ) ;
     418  void calibrateAPEXFS( casacore::CountedPtr<Scantable> &sig,
     419                        casacore::CountedPtr<Scantable> &ref,
     420                        const vector< casacore::CountedPtr<Scantable> > &on,
     421                        const vector< casacore::CountedPtr<Scantable> > &sky,
     422                        const vector< casacore::CountedPtr<Scantable> > &hot,
     423                        const vector< casacore::CountedPtr<Scantable> > &cold,
     424                        const casacore::Vector<casacore::uInt> &rows ) ;
     425  void copyRows( casacore::Table &out,
     426                 const casacore::Table &in,
     427                 casacore::uInt startout,
     428                 casacore::uInt startin,
     429                 casacore::uInt nrow,
     430                 casacore::Bool copySpectra=true,
     431                 casacore::Bool copyFlagtra=true,
     432                 casacore::Bool copyTsys=true ) ;
     433  casacore::CountedPtr<Scantable> averageWithinSession( casacore::CountedPtr<Scantable> &s,
    434434                                                    vector<bool> &mask,
    435435                                                    string weight ) ;
  • trunk/src/STMathWrapper.h

    r3008 r3106  
    4242             const std::string& avmode )
    4343  {
    44     std::vector<casa::CountedPtr<Scantable> > sts;
     44    std::vector<casacore::CountedPtr<Scantable> > sts;
    4545    for (unsigned int i=0; i<in.size(); ++i) sts.push_back(in[i].getCP());
    4646    return ScantableWrapper(STMath::average(sts, mask, weight, avmode));
     
    105105
    106106  ScantableWrapper dototalpower( const ScantableWrapper& calon,
    107                              const ScantableWrapper& caloff, casa::Float tcal= 0 )
     107                             const ScantableWrapper& caloff, casacore::Float tcal= 0 )
    108108  { return ScantableWrapper( STMath::dototalpower( calon.getCP(), caloff.getCP(), tcal ) ); }
    109109
    110110  ScantableWrapper dosigref( const ScantableWrapper& sig,
    111111                             const ScantableWrapper& ref,
    112                              int smoothref = 0, casa::Float tsysv=0.0, casa::Float tau=0.0)
     112                             int smoothref = 0, casacore::Float tsysv=0.0, casacore::Float tau=0.0)
    113113  { return ScantableWrapper( STMath::dosigref( sig.getCP(), ref.getCP(), smoothref, tsysv, tau ) ); }
    114114
     
    116116                          const std::vector<int>& scans,
    117117                          int smoothref = 0,
    118                           casa::Float tsysv=0.0, casa::Float tau=0.0, casa::Float tcal=0.0 )
     118                          casacore::Float tsysv=0.0, casacore::Float tau=0.0, casacore::Float tcal=0.0 )
    119119  { return ScantableWrapper( STMath::donod( s.getCP(), scans, smoothref, tsysv, tau, tcal ) ); }
    120120
     
    122122                         const std::vector<int>& scans,
    123123                         int smoothref = 0,
    124                          casa::Float tsysv=0.0, casa::Float tau=0.0, casa::Float tcal=0.0 )
     124                         casacore::Float tsysv=0.0, casacore::Float tau=0.0, casacore::Float tcal=0.0 )
    125125  { return ScantableWrapper( STMath::dofs( s.getCP(), scans, smoothref, tsysv, tau, tcal ) ); }
    126126
     
    180180          const std::string &freqTol)
    181181  {
    182     std::vector<casa::CountedPtr<Scantable> > sts;
     182    std::vector<casacore::CountedPtr<Scantable> > sts;
    183183    for (unsigned int i=0; i<in.size(); ++i) sts.push_back(in[i].getCP());
    184184    return ScantableWrapper(STMath::merge(sts, freqTol)); }
     
    229229                 const std::string& avmode )
    230230  {
    231     std::vector<casa::CountedPtr<Scantable> > sts;
     231    std::vector<casacore::CountedPtr<Scantable> > sts;
    232232    for (unsigned int i=0; i<in.size(); ++i) sts.push_back(in[i].getCP());
    233233    return ScantableWrapper(STMath::new_average(sts, compel, mask, weight, avmode));
     
    239239                          const std::string antname )
    240240  {
    241     casa::CountedPtr<Scantable> tab = in.getCP() ;
    242     casa::String mode( calmode ) ;
    243     casa::String name( antname ) ;
     241    casacore::CountedPtr<Scantable> tab = in.getCP() ;
     242    casacore::String mode( calmode ) ;
     243    casacore::String name( antname ) ;
    244244    return ScantableWrapper( STMath::cwcal( tab, mode, name ) ) ;
    245245  }
     
    248248                          const std::string calmode )
    249249  {
    250     casa::CountedPtr<Scantable> tab = in.getCP() ;
    251     casa::String mode( calmode ) ;
     250    casacore::CountedPtr<Scantable> tab = in.getCP() ;
     251    casacore::String mode( calmode ) ;
    252252    return ScantableWrapper( STMath::almacal( tab, mode ) ) ;
    253253  }
  • trunk/src/STMolecules.cpp

    r3084 r3106  
    2525
    2626
    27 using namespace casa;
     27using namespace casacore;
    2828
    2929namespace asap {
    3030
    31 const casa::String STMolecules::name_ = "MOLECULES";
     31const casacore::String STMolecules::name_ = "MOLECULES";
    3232
    3333STMolecules::STMolecules(const Scantable& parent) :
     
    3737}
    3838
    39 asap::STMolecules::STMolecules( casa::Table tab ) : STSubTable(tab, name_)
     39asap::STMolecules::STMolecules( casacore::Table tab ) : STSubTable(tab, name_)
    4040{
    4141  restfreqCol_.attach(table_,"RESTFREQUENCY");
  • trunk/src/STMolecules.h

    r2321 r3106  
    3232public:
    3333  STMolecules() {;}
    34   explicit STMolecules(casa::Table tab);
     34  explicit STMolecules(casacore::Table tab);
    3535  explicit STMolecules( const Scantable& parent);
    3636
     
    4040
    4141/***
    42   casa::uInt addEntry( casa::Double restfreq, const casa::String& name="",
    43                        const casa::String& formattedname="");
     42  casacore::uInt addEntry( casacore::Double restfreq, const casacore::String& name="",
     43                       const casacore::String& formattedname="");
    4444***/
    4545
    46   casa::uInt addEntry( casa::Vector<casa::Double> restfreq,
    47                        const casa::Vector<casa::String>& name=casa::Vector<casa::String>(0),
    48                        const casa::Vector<casa::String>& formattedname=casa::Vector<casa::String>(0));
     46  casacore::uInt addEntry( casacore::Vector<casacore::Double> restfreq,
     47                       const casacore::Vector<casacore::String>& name=casacore::Vector<casacore::String>(0),
     48                       const casacore::Vector<casacore::String>& formattedname=casacore::Vector<casacore::String>(0));
    4949
    5050/***
    51   void getEntry( casa::Double& restfreq, casa::String& name,
    52                  casa::String& formattedname, casa::uInt id) const;
     51  void getEntry( casacore::Double& restfreq, casacore::String& name,
     52                 casacore::String& formattedname, casacore::uInt id) const;
    5353***/
    54   void getEntry( casa::Vector<casa::Double>& restfreq,
    55                  casa::Vector<casa::String>& name,
    56                  casa::Vector<casa::String>& formattedname,
    57                  casa::uInt id) const;
     54  void getEntry( casacore::Vector<casacore::Double>& restfreq,
     55                 casacore::Vector<casacore::String>& name,
     56                 casacore::Vector<casacore::String>& formattedname,
     57                 casacore::uInt id) const;
    5858
    5959  std::vector<double> getRestFrequencies() const;
    60   std::vector<double> getRestFrequency( casa::uInt id ) const;
    61   const casa::String& name() const { return name_; }
     60  std::vector<double> getRestFrequency( casacore::uInt id ) const;
     61  const casacore::String& name() const { return name_; }
    6262  int nrow() const;
    6363
    6464private:
    6565  void setup();
    66   static const casa::String name_;
    67   //casa::Table table_;
    68   //casa::ScalarColumn<casa::uInt> freqidCol_;
    69   //casa::ScalarColumn<casa::Double> restfreqCol_;
    70   casa::ArrayColumn<casa::Double> restfreqCol_;
    71   //casa::ScalarColumn<casa::String> nameCol_;
    72   casa::ArrayColumn<casa::String> nameCol_;
    73   //casa::ScalarColumn<casa::String> formattednameCol_; // e.g. latex
    74   casa::ArrayColumn<casa::String> formattednameCol_; // e.g. latex
     66  static const casacore::String name_;
     67  //casacore::Table table_;
     68  //casacore::ScalarColumn<casacore::uInt> freqidCol_;
     69  //casacore::ScalarColumn<casacore::Double> restfreqCol_;
     70  casacore::ArrayColumn<casacore::Double> restfreqCol_;
     71  //casacore::ScalarColumn<casacore::String> nameCol_;
     72  casacore::ArrayColumn<casacore::String> nameCol_;
     73  //casacore::ScalarColumn<casacore::String> formattednameCol_; // e.g. latex
     74  casacore::ArrayColumn<casacore::String> formattednameCol_; // e.g. latex
    7575
    7676};
  • trunk/src/STPol.cpp

    r904 r3106  
    4343  if ( labelmap_.find(type) ==  labelmap_.end() ) {
    4444    std::string msg = "Illegal polarisation type "+type;
    45     throw(casa::AipsError(msg));
     45    throw(casacore::AipsError(msg));
    4646  } else {
    4747    std::map<int, std::string>  poltype = labelmap_[type];
    4848    if ( poltype.find(index) ==  poltype.end() ) {
    4949      std::string msg = "Illegal polarisation index";
    50       throw(casa::AipsError(msg));
     50      throw(casacore::AipsError(msg));
    5151    } else {
    5252      return poltype[index];
     
    9595  if ( polmap_.find(key) ==  polmap_.end() ) {
    9696    std::string msg = "Illegal polarisation type "+key;
    97     throw(casa::AipsError(msg));
     97    throw(casacore::AipsError(msg));
    9898  } else {
    9999    return polmap_[key];
  • trunk/src/STPol.h

    r2163 r3106  
    2727Convert betweeen the possible polarisations (linear, circular, stokes, stokes2)
    2828
    29 @author Malte Marquarding
    30 @date $Date:$
     29@author Malte Marquarding @date $Date:$
    3130
    3231*/
     
    3433public:
    3534
    36   typedef  void (STPol::*polOperation)( casa::Float phase );
     35  typedef  void (STPol::*polOperation)( casacore::Float phase );
    3736  STPol(): totalangle_(0.0),feedhand_(1.0) {}
    3837  virtual ~STPol() {}
     
    4443    { return factories[type]->create(); }
    4544
    46   casa::Vector<casa::Float> getSpectrum( casa::uInt index, const std::string& mode )
     45  casacore::Vector<casacore::Float> getSpectrum( casacore::uInt index, const std::string& mode )
    4746    {
    4847      if (mode == "linear")
     
    5554        return getCircular(index);
    5655      else
    57         throw(casa::AipsError("Polarisation type unknown"));
     56        throw(casacore::AipsError("Polarisation type unknown"));
    5857    }
    5958
    60   virtual casa::Vector<casa::Float> getCircular( casa::uInt index ) = 0;
     59  virtual casacore::Vector<casacore::Float> getCircular( casacore::uInt index ) = 0;
    6160
    62   virtual casa::Vector<casa::Float> getStokes( casa::uInt index ) = 0;
     61  virtual casacore::Vector<casacore::Float> getStokes( casacore::uInt index ) = 0;
    6362
    64   virtual casa::Vector<casa::Float> getLinPol( casa::uInt index ) = 0;
     63  virtual casacore::Vector<casacore::Float> getLinPol( casacore::uInt index ) = 0;
    6564
    66   virtual casa::Vector<casa::Float> getLinear( casa::uInt index ) = 0;
     65  virtual casacore::Vector<casacore::Float> getLinear( casacore::uInt index ) = 0;
    6766
    68   virtual void rotatePhase( casa::Float ) {}
    69   virtual void rotateLinPolPhase( casa::Float) {}
     67  virtual void rotatePhase( casacore::Float ) {}
     68  virtual void rotateLinPolPhase( casacore::Float) {}
    7069
    71   virtual void invertPhase( casa::Float ) {}
     70  virtual void invertPhase( casacore::Float ) {}
    7271
    73   casa::uInt nspec() const { return basespectra_.ncolumn(); }
     72  casacore::uInt nspec() const { return basespectra_.ncolumn(); }
    7473
    75   const casa::Vector<casa::Float> getSpectrum(casa::uInt index) const
     74  const casacore::Vector<casacore::Float> getSpectrum(casacore::uInt index) const
    7675    { return basespectra_.column(index); }
    7776
    78   casa::Matrix<casa::Float>& getSpectra()
     77  casacore::Matrix<casacore::Float>& getSpectra()
    7978    { return basespectra_; }
    8079
    81   void setSpectra(const casa::Matrix<casa::Float>& spec)
     80  void setSpectra(const casacore::Matrix<casacore::Float>& spec)
    8281    { basespectra_.resize(); basespectra_ = spec; }
    8382
    8483
    85   void setPhaseCorrections(casa::Float totalang=0.0, casa::Float feedhand=1.0)
     84  void setPhaseCorrections(casacore::Float totalang=0.0, casacore::Float feedhand=1.0)
    8685    { totalangle_=totalang;feedhand_=feedhand;}
    8786
    88   casa::Float getTotalPhase() const { return totalangle_; }
    89   casa::Float getFeedHand() const { return feedhand_; }
     87  casacore::Float getTotalPhase() const { return totalangle_; }
     88  casacore::Float getFeedHand() const { return feedhand_; }
    9089
    9190  static std::pair<int, std::string> polFromString(const std::string& key);
     
    9897  static std::map<std::string, std::map<int, std::string> > labelmap_;
    9998
    100   casa::Float totalangle_,feedhand_;
     99  casacore::Float totalangle_,feedhand_;
    101100  std::string mode_;
    102   casa::Matrix<casa::Float> basespectra_;
     101  casacore::Matrix<casacore::Float> basespectra_;
    103102
    104103};
  • trunk/src/STPolCircular.cpp

    r3080 r3106  
    1717#include "STPolCircular.h"
    1818
    19 using namespace casa;
     19using namespace casacore;
    2020
    2121namespace asap {
  • trunk/src/STPolCircular.h

    r1353 r3106  
    4040  STPolCircular() {}
    4141
    42   explicit STPolCircular(const casa::Matrix<casa::Float>& specs)
     42  explicit STPolCircular(const casacore::Matrix<casacore::Float>& specs)
    4343    { setSpectra(specs); }
    4444
     
    4747  static Factory<STPol,STPolCircular> myFactory;
    4848
    49   virtual casa::Vector<casa::Float> getCircular( casa::uInt index );
     49  virtual casacore::Vector<casacore::Float> getCircular( casacore::uInt index );
    5050
    51   virtual casa::Vector<casa::Float> getStokes( casa::uInt index);
     51  virtual casacore::Vector<casacore::Float> getStokes( casacore::uInt index);
    5252
    53   virtual casa::Vector<casa::Float> getLinPol( casa::uInt index);
     53  virtual casacore::Vector<casacore::Float> getLinPol( casacore::uInt index);
    5454
    55   virtual casa::Vector<casa::Float> getLinear( casa::uInt index );
     55  virtual casacore::Vector<casacore::Float> getLinear( casacore::uInt index );
    5656
    5757};
  • trunk/src/STPolLinear.cpp

    r3080 r3106  
    1717#include "STPolLinear.h"
    1818
    19 using namespace casa;
     19using namespace casacore;
    2020
    2121namespace asap {
     
    138138}
    139139
    140 void asap::STPolLinear::rotateLinPolPhase( casa::Float phase )
     140void asap::STPolLinear::rotateLinPolPhase( casacore::Float phase )
    141141{
    142142//
  • trunk/src/STPolLinear.h

    r1353 r3106  
    3939  STPolLinear() {}
    4040
    41   explicit STPolLinear(const casa::Matrix<casa::Float>& specs)
     41  explicit STPolLinear(const casacore::Matrix<casacore::Float>& specs)
    4242    { setSpectra(specs); }
    4343
     
    4646  static Factory<STPol,STPolLinear> myFactory;
    4747
    48   virtual casa::Vector<casa::Float> getCircular( casa::uInt index );
     48  virtual casacore::Vector<casacore::Float> getCircular( casacore::uInt index );
    4949
    50   virtual casa::Vector<casa::Float> getStokes( casa::uInt index);
     50  virtual casacore::Vector<casacore::Float> getStokes( casacore::uInt index);
    5151
    52   virtual casa::Vector<casa::Float> getLinPol( casa::uInt index);
     52  virtual casacore::Vector<casacore::Float> getLinPol( casacore::uInt index);
    5353
    54   virtual casa::Vector<casa::Float> getLinear( casa::uInt index );
     54  virtual casacore::Vector<casacore::Float> getLinear( casacore::uInt index );
    5555
    56   virtual void rotatePhase( casa::Float phase );
    57   virtual void rotateLinPolPhase( casa::Float phase );
     56  virtual void rotatePhase( casacore::Float phase );
     57  virtual void rotateLinPolPhase( casacore::Float phase );
    5858
    59   virtual void invertPhase( casa::Float phase );
     59  virtual void invertPhase( casacore::Float phase );
    6060
    6161};
  • trunk/src/STPolStokes.cpp

    r3080 r3106  
    1717#include "STPolStokes.h"
    1818
    19 using namespace casa;
     19using namespace casacore;
    2020
    2121namespace asap {
  • trunk/src/STPolStokes.h

    r1353 r3106  
    2828  STPolStokes() {}
    2929
    30   explicit STPolStokes(const casa::Matrix<casa::Float>& specs)
     30  explicit STPolStokes(const casacore::Matrix<casacore::Float>& specs)
    3131    { setSpectra(specs); }
    3232
     
    3535  static Factory<STPol,STPolStokes> myFactory;
    3636
    37   virtual casa::Vector<casa::Float> getCircular( casa::uInt index );
     37  virtual casacore::Vector<casacore::Float> getCircular( casacore::uInt index );
    3838
    39   virtual casa::Vector<casa::Float> getStokes( casa::uInt index);
     39  virtual casacore::Vector<casacore::Float> getStokes( casacore::uInt index);
    4040
    41   virtual casa::Vector<casa::Float> getLinPol( casa::uInt index);
     41  virtual casacore::Vector<casacore::Float> getLinPol( casacore::uInt index);
    4242
    43   virtual casa::Vector<casa::Float> getLinear( casa::uInt index );
     43  virtual casacore::Vector<casacore::Float> getLinear( casacore::uInt index );
    4444
    45   //virtual void rotatePhase( casa::Float phase );
    46   //virtual void rotateLinPolPhase( casa::Float phase );
    47   //virtual void invertPhase( casa::Float phase );
     45  //virtual void rotatePhase( casacore::Float phase );
     46  //virtual void rotateLinPolPhase( casacore::Float phase );
     47  //virtual void invertPhase( casacore::Float phase );
    4848
    4949};
  • trunk/src/STSelector.cpp

    r3084 r3106  
    2222
    2323using namespace asap;
    24 using namespace casa;
     24using namespace casacore;
    2525
    2626STSelector::STSelector() :
     
    314314}
    315315
    316 casa::Table asap::STSelector::sort( const casa::Table & tab )
     316casacore::Table asap::STSelector::sort( const casacore::Table & tab )
    317317{
    318318  if (order_.nelements() > 0) {
  • trunk/src/STSelector.h

    r1930 r3106  
    6262  std::vector<std::string> getSortOrder() const;
    6363
    64   casa::Table apply(const casa::Table& tab);
    65   casa::Table operator()(const casa::Table& tab) { return apply(tab); };
     64  casacore::Table apply(const casacore::Table& tab);
     65  casacore::Table operator()(const casacore::Table& tab) { return apply(tab); };
    6666
    6767  void reset() { intselections_.clear();stringselections_.clear(); taql_ = "";};
     
    8080private:
    8181
    82   casa::Table sort(const casa::Table& tab);
     82  casacore::Table sort(const casacore::Table& tab);
    8383
    8484  typedef std::map<std::string, std::vector<int> > intidmap;
     
    8888  mutable stringidmap stringselections_;
    8989  std::vector<std::string> poltypes_;
    90   casa::Block<casa::String> order_;
     90  casacore::Block<casacore::String> order_;
    9191  std::string taql_;
    9292  std::vector<int> rowselection_;
  • trunk/src/STSideBandSep.cpp

    r3092 r3106  
    3232
    3333using namespace std ;
    34 using namespace casa ;
     34using namespace casacore ;
    3535using namespace asap ;
    3636
  • trunk/src/STSideBandSep.h

    r2976 r3106  
    2828#include "Scantable.h"
    2929
    30 using namespace std;
    31 using namespace casa;
    32 
    3330namespace asap {
    3431
     
    3835   * constructors and a destructor
    3936   **/
    40   STSideBandSep() { throw( AipsError("No data set to process") ); };
    41   explicit STSideBandSep(const vector<string> &names);
    42   explicit STSideBandSep(const vector<ScantableWrapper> &tables);
     37  STSideBandSep() { throw( casacore::AipsError("No data set to process") ); };
     38  explicit STSideBandSep(const std::vector<std::string> &names);
     39  explicit STSideBandSep(const std::vector<ScantableWrapper> &tables);
    4340  virtual ~STSideBandSep();
    4441
     
    4744   * Separate side bands
    4845   **/
    49   void separate(string outname);
     46  void separate(std::string outname);
    5047
    5148  /**
    5249   * Set IFNO and frequency tolerance to select data to process
    5350   **/
    54   void setFrequency(const int ifno, const string freqtol,
    55                     const string frame="");
     51  void setFrequency(const int ifno, const std::string freqtol,
     52                    const std::string frame="");
    5653
    5754  /**
     
    5956   * The spectra within this range will be averaged before procesing.
    6057   **/
    61   void setDirTolerance(const vector<string> dirtol);
     58  void setDirTolerance(const std::vector<std::string> dirtol);
    6259
    6360  /**
     
    6562   * of each of scantable.
    6663   **/
    67   void setShift(const vector<double> &shift);
     64  void setShift(const std::vector<double> &shift);
    6865
    6966  /**
     
    9188   * Set additional information to fill frequencies of image sideband
    9289   **/
    93   void setLO1(const string lo1, const string frame="TOPO",
    94               const double reftime=-1, string refdir="");
    95   void setLO1Root(const string name);
     90  void setLO1(const std::string lo1, const std::string frame="TOPO",
     91              const double reftime=-1, std::string refdir="");
     92  void setLO1Root(const std::string name);
    9693
    9794private:
     
    10198
    10299  /** Return if the path exists (optionally, check file type) **/
    103   Bool checkFile(const string name, string type="");
     100  casacore::Bool checkFile(const std::string name, std::string type="");
    104101
    105102  /** **/
    106103  unsigned int setupShift();
    107   bool getFreqInfo(const CountedPtr<Scantable> &stab, const unsigned int &ifno,
     104  bool getFreqInfo(const casacore::CountedPtr<Scantable> &stab, const unsigned int &ifno,
    108105                   double &freq0, double &incr, unsigned int &nchan);
    109106
    110107  /** Grid scantable **/
    111108  ScantableWrapper gridTable();
    112   void mapExtent(vector< CountedPtr<Scantable> > &tablist,
    113                  Double &xmin, Double &xmax,
    114                  Double &ymin, Double &ymax);
     109  void mapExtent(std::vector< casacore::CountedPtr<Scantable> > &tablist,
     110                 casacore::Double &xmin, casacore::Double &xmax,
     111                 casacore::Double &ymin, casacore::Double &ymax);
    115112
    116113  /**
     
    134131   * TIME by INTERVAL in each row.
    135132   **/
    136   void shiftTimeInGriddedST(const CountedPtr<Scantable> &stab);
     133  void shiftTimeInGriddedST(const casacore::CountedPtr<Scantable> &stab);
    137134  /**
    138135   * Actual calculation of frequencies of image sideband
     
    143140   * Get LO1 frequency to solve the frequencies of image side band
    144141   **/
    145   bool getLo1FromAsdm(const string asdmname,
     142  bool getLo1FromAsdm(const std::string asdmname,
    146143                      const double refval, const double refpix,
    147144                      const double increment, const int nChan);
    148   bool getLo1FromAsisTab(const string msname,
     145  bool getLo1FromAsisTab(const std::string msname,
    149146                         const double refval, const double refpix,
    150147                         const double increment, const int nChan);
    151   bool getLo1FromScanTab(casa::CountedPtr< Scantable > &scantab,
     148  bool getLo1FromScanTab(casacore::CountedPtr< Scantable > &scantab,
    152149                         const double refval, const double refpix,
    153150                         const double increment, const int nChan);
    154151  //  bool getSpectraToSolve(const int polId, const int beamId,
    155152  //                     const double dirX, const double dirY,
    156   //                     Matrix<float> &specmat, vector<uInt> &tabIdvec);
     153  //                     Matrix<float> &specmat, std::vector<casacore::uInt> &tabIdvec);
    157154  bool getSpectraToSolve(const int polId, const int beamId,
    158155                         const double dirX, const double dirY,
    159                          Matrix<float> &specMat, Matrix<bool> &flagMat,
    160                          vector<uInt> &tabIdvec);
    161 
    162   vector<float> solve(const Matrix<float> &specMat,
    163                       const vector<uInt> &tabIdvec,
     156                         casacore::Matrix<float> &specMat, casacore::Matrix<bool> &flagMat,
     157                         std::vector<casacore::uInt> &tabIdvec);
     158
     159  std::vector<float> solve(const casacore::Matrix<float> &specMat,
     160                      const std::vector<casacore::uInt> &tabIdvec,
    164161                      const bool signal = true);
    165162
    166   Vector<bool> collapseFlag(const Matrix<bool> &flagMat,
    167                             const vector<uInt> &tabIdvec,
     163  casacore::Vector<bool> collapseFlag(const casacore::Matrix<bool> &flagMat,
     164                            const std::vector<casacore::uInt> &tabIdvec,
    168165                            const bool signal = true);
    169166
    170   void shiftSpectrum(const Vector<float> &invec, double shift,
    171                      Vector<float> &outvec);
    172 
    173   void shiftFlag(const Vector<bool> &invec, double shift,
    174                      Vector<bool> &outvec);
    175 
    176   void deconvolve(Matrix<float> &specmat, const vector<double> shiftvec,
    177                   const double threshold, Matrix<float> &outmat);
    178 
    179   void aggregateMat(Matrix<float> &inmat, vector<float> &outvec);
    180 
    181   void subtractFromOther(const Matrix<float> &shiftmat,
    182                          const vector<float> &invec,
    183                          const vector<double> &shift,
    184                          vector<float> &outvec);
     167  void shiftSpectrum(const casacore::Vector<float> &invec, double shift,
     168                     casacore::Vector<float> &outvec);
     169
     170  void shiftFlag(const casacore::Vector<bool> &invec, double shift,
     171                     casacore::Vector<bool> &outvec);
     172
     173  void deconvolve(casacore::Matrix<float> &specmat, const std::vector<double> shiftvec,
     174                  const double threshold, casacore::Matrix<float> &outmat);
     175
     176  void aggregateMat(casacore::Matrix<float> &inmat, std::vector<float> &outvec);
     177
     178  void subtractFromOther(const casacore::Matrix<float> &shiftmat,
     179                         const std::vector<float> &invec,
     180                         const std::vector<double> &shift,
     181                         std::vector<float> &outvec);
    185182
    186183
     
    188185  /** Member variables **/
    189186  // input tables
    190   vector<string> infileList_;
    191   vector< CountedPtr<Scantable> > intabList_;
     187  std::vector<std::string> infileList_;
     188  std::vector< casacore::CountedPtr<Scantable> > intabList_;
    192189  unsigned int ntable_;
    193190  // frequency and direction setup to select data.
    194191  int sigIfno_;
    195   Quantum<Double> ftol_;
    196   MFrequency::Types solFrame_;
    197   vector<double> sigShift_, imgShift_;
     192  casacore::Quantum<casacore::Double> ftol_;
     193  casacore::MFrequency::Types solFrame_;
     194  std::vector<double> sigShift_, imgShift_;
    198195  unsigned int nshift_, nchan_;
    199   vector< CountedPtr<Scantable> > tableList_;
    200   Double xtol_, ytol_;
     196  std::vector< casacore::CountedPtr<Scantable> > tableList_;
     197  casacore::Double xtol_, ytol_;
    201198  // solution parameters
    202199  bool otherside_, doboth_;
     
    204201  // LO1
    205202  double lo1Freq_; // in Hz
    206   MFrequency::Types loFrame_;
     203  casacore::MFrequency::Types loFrame_;
    207204  double loTime_;
    208   string loDir_;
    209   string asdmName_, asisName_;
     205  std::string loDir_;
     206  std::string asdmName_, asisName_;
    210207
    211208  //CountedPtr<Scantable> imgTab_p, sigTab_p;
    212   CountedPtr<Scantable> imgTab_p, sigTab_p;
    213   Table::TableType tp_;
    214   FFTServer<Float, Complex> fftsf, fftsi;
     209  casacore::CountedPtr<Scantable> imgTab_p, sigTab_p;
     210  casacore::Table::TableType tp_;
     211  casacore::FFTServer<casacore::Float, casacore::Complex> fftsf, fftsi;
    215212
    216213}; // class
  • trunk/src/STSubTable.cpp

    r857 r3106  
    2020
    2121
    22 using namespace casa;
     22using namespace casacore;
    2323
    2424namespace asap {
    2525
    26 STSubTable::STSubTable( const Scantable& parent, const casa::String& name )
     26STSubTable::STSubTable( const Scantable& parent, const casacore::String& name )
    2727{
    2828  TableDesc td("", "1", TableDesc::Scratch);
  • trunk/src/STSubTable.h

    r2658 r3106  
    3131public:
    3232  STSubTable() {;}
    33   STSubTable( casa::Table tab, const casa::String& name);
    34   STSubTable( const Scantable& parent, const casa::String& name );
     33  STSubTable( casacore::Table tab, const casacore::String& name);
     34  STSubTable( const Scantable& parent, const casacore::String& name );
    3535
    3636  virtual ~STSubTable();
     
    4646  // -> virtual bool conformant(const STSubTable& other) = 0;
    4747
    48   virtual const casa::String& name() const = 0;
     48  virtual const casacore::String& name() const = 0;
    4949
    5050  /**
     
    5353   * @return the 'old' IDs
    5454   */
    55   casa::Vector<casa::uInt> repopulate();
     55  casacore::Vector<casacore::uInt> repopulate();
    5656
    57   const casa::Table& table() const { return table_; }
    58   casa::Table table() { return table_; }
     57  const casacore::Table& table() const { return table_; }
     58  casacore::Table table() { return table_; }
    5959
    6060protected:
    61   casa::Table table_;
    62   casa::ScalarColumn<casa::uInt> idCol_;
     61  casacore::Table table_;
     62  casacore::ScalarColumn<casacore::uInt> idCol_;
    6363
    6464private:
  • trunk/src/STTcal.cpp

    r3084 r3106  
    2424
    2525
    26 using namespace casa;
     26using namespace casacore;
    2727
    2828namespace asap {
    2929
    30 const casa::String STTcal::name_ = "TCAL";
     30const casacore::String STTcal::name_ = "TCAL";
    3131
    3232STTcal::STTcal(const Scantable& parent) :
     
    4646}
    4747
    48 asap::STTcal::STTcal( casa::Table tab ) : STSubTable(tab, name_)
     48asap::STTcal::STTcal( casacore::Table tab ) : STSubTable(tab, name_)
    4949{
    5050  timeCol_.attach(table_,"TIME");
  • trunk/src/STTcal.h

    r1353 r3106  
    3131public:
    3232  STTcal() {;}
    33   explicit STTcal(casa::Table tab);
     33  explicit STTcal(casacore::Table tab);
    3434  explicit STTcal( const Scantable& parent);
    3535
     
    3838  STTcal& operator=(const STTcal& other);
    3939
    40   casa::uInt addEntry( const casa::String& time,
    41                        const casa::Vector<casa::Float>& tcal);
    42   void getEntry( casa::String& time, casa::Vector<casa::Float>& tcal,
    43                  casa::uInt id );
     40  casacore::uInt addEntry( const casacore::String& time,
     41                       const casacore::Vector<casacore::Float>& tcal);
     42  void getEntry( casacore::String& time, casacore::Vector<casacore::Float>& tcal,
     43                 casacore::uInt id );
    4444
    45   const casa::String& name() const { return name_; }
     45  const casacore::String& name() const { return name_; }
    4646
    4747private:
    4848  void setup();
    49   static const casa::String name_;
    50   //casa::Table table_;
    51   casa::ArrayColumn<casa::Float> tcalCol_;
    52   casa::ScalarColumn<casa::String> timeCol_;
     49  static const casacore::String name_;
     50  //casacore::Table table_;
     51  casacore::ArrayColumn<casacore::Float> tcalCol_;
     52  casacore::ScalarColumn<casacore::String> timeCol_;
    5353};
    5454
  • trunk/src/STUpgrade.cpp

    r2332 r3106  
    77
    88
    9 using namespace casa;
     9using namespace casacore;
    1010
    1111namespace asap {
  • trunk/src/STUpgrade.h

    r2321 r3106  
    2727class STUpgrade {
    2828public:
    29   explicit STUpgrade(casa::uInt version) { version_ = version ;}
     29  explicit STUpgrade(casacore::uInt version) { version_ = version ;}
    3030  virtual ~STUpgrade() {;}
    3131
     
    3636 
    3737private:
    38   casa::uInt version_;
     38  casacore::uInt version_;
    3939};
    4040
  • trunk/src/STWeather.cpp

    r3084 r3106  
    2222
    2323
    24 using namespace casa;
     24using namespace casacore;
    2525
    2626namespace asap {
    2727
    28 const casa::String STWeather::name_ = "WEATHER";
     28const casacore::String STWeather::name_ = "WEATHER";
    2929
    3030STWeather::STWeather(const Scantable& parent) :
     
    3535
    3636
    37 asap::STWeather::STWeather( casa::Table tab ) : STSubTable(tab, name_)
     37asap::STWeather::STWeather( casacore::Table tab ) : STSubTable(tab, name_)
    3838{
    3939  temperatureCol_.attach(table_,"TEMPERATURE");
  • trunk/src/STWeather.h

    r1481 r3106  
    3030public:
    3131  STWeather() {;}
    32   explicit STWeather(casa::Table tab);
     32  explicit STWeather(casacore::Table tab);
    3333  explicit STWeather(const Scantable& parent);
    3434
     
    3737  STWeather& operator=(const STWeather& other);
    3838
    39   casa::uInt addEntry( casa::Float temperature, casa::Float pressure,
    40                        casa::Float humidity,
    41                        casa::Float windspeed, casa::Float windaz);
     39  casacore::uInt addEntry( casacore::Float temperature, casacore::Float pressure,
     40                       casacore::Float humidity,
     41                       casacore::Float windspeed, casacore::Float windaz);
    4242
    43   void getEntry( casa::Float& temperature, casa::Float& pressure,
    44                        casa::Float& humidity,
    45                        casa::Float& windspeed, casa::Float& windaz,
    46                        casa::uInt id) const;
     43  void getEntry( casacore::Float& temperature, casacore::Float& pressure,
     44                       casacore::Float& humidity,
     45                       casacore::Float& windspeed, casacore::Float& windaz,
     46                       casacore::uInt id) const;
    4747
    48   const casa::String& name() const { return name_; }
     48  const casacore::String& name() const { return name_; }
    4949
    5050private:
    5151  void setup();
    52   static const casa::String name_;
    53   //casa::Table table_;
    54   //casa::ScalarColumn<casa::uInt> freqidCol_;
    55   casa::ScalarColumn<casa::Float> pressureCol_, temperatureCol_,
     52  static const casacore::String name_;
     53  //casacore::Table table_;
     54  //casacore::ScalarColumn<casacore::uInt> freqidCol_;
     55  casacore::ScalarColumn<casacore::Float> pressureCol_, temperatureCol_,
    5656                                  humidityCol_,
    5757                                  windspeedCol_, windazCol_;
  • trunk/src/STWriter.cpp

    r3081 r3106  
    5959#include "STWriter.h"
    6060
    61 using namespace casa;
     61using namespace casacore;
     62
    6263namespace asap {
    6364
     
    322323    ++scanit;
    323324  }
    324   LogIO os( casa::LogOrigin("STWriter"));
     325  LogIO os( casacore::LogOrigin("STWriter"));
    325326  os << "STWriter: wrote " << count << " rows to " << filename
    326      << casa::LogIO::POST;
     327     << casacore::LogIO::POST;
    327328
    328329  writer_->close();
  • trunk/src/STWriter.h

    r2658 r3106  
    6262   * @return ststus code from PKSwriter
    6363   */
    64   casa::Int setFormat(const string& format = "SDFITS");
     64  casacore::Int setFormat(const string& format = "SDFITS");
    6565
    6666  /**
     
    7070   * @return
    7171   */
    72   casa::Int write(const casa::CountedPtr<Scantable> table,
     72  casacore::Int write(const casacore::CountedPtr<Scantable> table,
    7373            const string& filename);
    7474
    7575private:
    76   casa::Vector<casa::Float> tsysFromTable(const casa::Table& tab);
     76  casacore::Vector<casacore::Float> tsysFromTable(const casacore::Table& tab);
    7777
    78   void polConversion( casa::Matrix<casa::Float>& spec,
    79                       casa::Matrix<casa::uChar>& flag,
    80                       casa::Vector<casa::Complex>& xpol,
    81                       const casa::Table& tab);
     78  void polConversion( casacore::Matrix<casacore::Float>& spec,
     79                      casacore::Matrix<casacore::uChar>& flag,
     80                      casacore::Vector<casacore::Complex>& xpol,
     81                      const casacore::Table& tab);
    8282
    83   casa::String getObsTypes( casa::Int srctype ) ;
     83  casacore::String getObsTypes( casacore::Int srctype ) ;
    8484
    8585  std::string     format_;
  • trunk/src/STWriterWrapper.h

    r1353 r3106  
    4747  explicit STWriterWrapper(const string& format = "SDFITS") : STWriter(format) {;}
    4848
    49   casa::Int write(const ScantableWrapper& table, const string &filename) {
     49  casacore::Int write(const ScantableWrapper& table, const string &filename) {
    5050    return STWriter::write(table.getCP(), filename);
    5151  }
  • trunk/src/Scantable.cpp

    r3085 r3106  
    8282#define debug 1
    8383
    84 using namespace casa;
     84using namespace casacore;
    8585
    8686namespace asap {
     
    540540  if ( Scantable::factories_.find(feedtype) ==  Scantable::factories_.end() ) {
    541541    std::string msg = "Illegal feed type "+ feedtype;
    542     throw(casa::AipsError(msg));
     542    throw(casacore::AipsError(msg));
    543543  }
    544544  table_.rwKeywordSet().define(String("POLTYPE"), feedtype);
     
    863863{
    864864  if (whichrow >= table_.nrow() ) {
    865     throw( casa::indexError<int>( whichrow, "asap::Scantable::applyChanFlag: Invalid row number" ) );
     865    throw( casacore::indexError<int>( whichrow, "asap::Scantable::applyChanFlag: Invalid row number" ) );
    866866  }
    867867  Vector<uChar> flgs = flagsCol_(whichrow);
     
    963963}
    964964
    965 const casa::Table& Scantable::table( ) const
     965const casacore::Table& Scantable::table( ) const
    966966{
    967967  return table_;
    968968}
    969969
    970 casa::Table& Scantable::table( )
     970casacore::Table& Scantable::table( )
    971971{
    972972  return table_;
     
    18811881
    18821882void asap::Scantable::reshapeSpectrum( int nmin, int nmax )
    1883   throw( casa::AipsError )
     1883  throw( casacore::AipsError )
    18841884{
    18851885  // assumed that all rows have same nChan
     
    18891889  // if nmin < 0 or nmax < 0, nothing to do
    18901890  if (  nmin < 0 ) {
    1891     throw( casa::indexError<int>( nmin, "asap::Scantable::reshapeSpectrum: Invalid range. Negative index is specified." ) ) ;
     1891    throw( casacore::indexError<int>( nmin, "asap::Scantable::reshapeSpectrum: Invalid range. Negative index is specified." ) ) ;
    18921892    }
    18931893  if (  nmax < 0  ) {
    1894     throw( casa::indexError<int>( nmax, "asap::Scantable::reshapeSpectrum: Invalid range. Negative index is specified." ) ) ;
     1894    throw( casacore::indexError<int>( nmax, "asap::Scantable::reshapeSpectrum: Invalid range. Negative index is specified." ) ) ;
    18951895  }
    18961896
     
    19071907  // if nmin exceeds nChan, nothing to do
    19081908  if ( nmin >= nChan ) {
    1909     throw( casa::indexError<int>( nmin, "asap::Scantable::reshapeSpectrum: Invalid range. Specified minimum exceeds nChan." ) ) ;
     1909    throw( casacore::indexError<int>( nmin, "asap::Scantable::reshapeSpectrum: Invalid range. Specified minimum exceeds nChan." ) ) ;
    19101910  }
    19111911
     
    51555155                                    const std::vector<bool>& chanMask,
    51565156                                    int whichrow,
    5157                                     const casa::String& coordInfo,
     5157                                    const casacore::String& coordInfo,
    51585158                                    bool hasSameNchan,
    51595159                                    ofstream& ofs,
    5160                                     const casa::String& funcName,
     5160                                    const casacore::String& funcName,
    51615161                                    const std::vector<int>& edge,
    51625162                                    const std::vector<float>& params,
     
    51875187                                    const std::vector<bool>& chanMask,
    51885188                                    int whichrow,
    5189                                     const casa::String& coordInfo,
     5189                                    const casacore::String& coordInfo,
    51905190                                    bool hasSameNchan,
    51915191                                    ofstream& ofs,
    5192                                     const casa::String& funcName,
     5192                                    const casacore::String& funcName,
    51935193                                    const std::vector<float>& params,
    51945194                                    const int nClipped)
     
    55035503}
    55045504
    5505 std::string Scantable::getMaskRangeList(const std::vector<bool>& mask, int whichrow, const casa::String& coordInfo, bool hasSameNchan, bool verbose)
     5505std::string Scantable::getMaskRangeList(const std::vector<bool>& mask, int whichrow, const casacore::String& coordInfo, bool hasSameNchan, bool verbose)
    55065506{
    55075507  if (mask.size() <= 0) {
  • trunk/src/Scantable.h

    r3090 r3106  
    5757
    5858/**
    59   * This class contains and wraps a casa::Table, which is used to store
     59  * This class contains and wraps a casacore::Table, which is used to store
    6060  * all the information. This can be either a MemoryTable or a
    6161  * disk based Table.
     
    8383   * Default constructor
    8484   */
    85   explicit Scantable(casa::Table::TableType ttype = casa::Table::Memory);
     85  explicit Scantable(casacore::Table::TableType ttype = casacore::Table::Memory);
    8686
    8787  /**
     
    9090   */
    9191  explicit Scantable(const std::string& name,
    92                      casa::Table::TableType ttype = casa::Table::Memory);
     92                     casacore::Table::TableType ttype = casacore::Table::Memory);
    9393
    9494  /// @fixme this is only sensible for MemoryTables....
     
    101101
    102102  /**
    103    * get a const reference to the underlying casa::Table
    104    * @return const \ref casa::Table reference
    105    */
    106   const casa::Table& table() const;
    107 
    108   /**
    109    * get a reference to the underlying casa::Table with the Selection
     103   * get a const reference to the underlying casacore::Table
     104   * @return const \ref casacore::Table reference
     105   */
     106  const casacore::Table& table() const;
     107
     108  /**
     109   * get a reference to the underlying casacore::Table with the Selection
    110110   * object applied if set
    111    * @return casa::Table reference
    112    */
    113   casa::Table& table();
     111   * @return casacore::Table reference
     112   */
     113  casacore::Table& table();
    114114
    115115
     
    169169  int nscan() const;
    170170
    171   casa::MEpoch::Types getTimeReference() const;
    172 
    173 
    174   casa::MEpoch getEpoch(int whichrow) const;
     171  casacore::MEpoch::Types getTimeReference() const;
     172
     173
     174  casacore::MEpoch getEpoch(int whichrow) const;
    175175
    176176  /**
    177177   * Get global antenna position
    178    * @return casa::MPosition
    179    */
    180   casa::MPosition getAntennaPosition() const;
    181 
    182   /**
    183    * the @ref casa::MDirection for a specific row
     178   * @return casacore::MPosition
     179   */
     180  casacore::MPosition getAntennaPosition() const;
     181
     182  /**
     183   * the @ref casacore::MDirection for a specific row
    184184   * @param[in] whichrow the row number
    185    * return casa::MDirection
    186    */
    187   casa::MDirection getDirection( int whichrow ) const;
     185   * return casacore::MDirection
     186   */
     187  casacore::MDirection getDirection( int whichrow ) const;
    188188
    189189  /**
     
    249249   * param[in] rows    list of row numbers to be flagged
    250250   */
    251   void flagRow( const std::vector<casa::uInt>& rows = std::vector<casa::uInt>(), bool unflag=false);
     251  void flagRow( const std::vector<casacore::uInt>& rows = std::vector<casacore::uInt>(), bool unflag=false);
    252252
    253253  /**
     
    262262   * (CAS-1807 Wataru Kawasaki)
    263263   */
    264   void clip(const casa::Float uthres, const casa::Float dthres, bool clipoutside, bool unflag);
     264  void clip(const casacore::Float uthres, const casacore::Float dthres, bool clipoutside, bool unflag);
    265265
    266266  /**
     
    268268   * about which channel is clipped.
    269269   */
    270   std::vector<bool> getClipMask(int whichrow, const casa::Float uthres, const casa::Float dthres, bool clipoutside, bool unflag);
    271   void srchChannelsToClip(casa::uInt whichrow, const casa::Float uthres, const casa::Float dthres, bool clipoutside, bool unflag,
    272                           casa::Vector<casa::uChar> flgs);
     270  std::vector<bool> getClipMask(int whichrow, const casacore::Float uthres, const casacore::Float dthres, bool clipoutside, bool unflag);
     271  void srchChannelsToClip(casacore::uInt whichrow, const casacore::Float uthres, const casacore::Float dthres, bool clipoutside, bool unflag,
     272                          casacore::Vector<casacore::uChar> flgs);
    273273
    274274  /**
     
    347347
    348348  float getTsys(int whichrow) const
    349     { return casa::Vector<casa::Float>(tsysCol_(whichrow))(0); }
     349    { return casacore::Vector<casacore::Float>(tsysCol_(whichrow))(0); }
    350350  std::vector<float> getTsysSpectrum(int whichrow) const ;
    351351 
     
    400400  //std::string getTime(int whichrow=-1, bool showdate=true) const;
    401401  std::string getTime(int whichrow=-1, bool showdate=true,
    402                       casa::uInt prec=0) const;
     402                      casacore::uInt prec=0) const;
    403403  double getIntTime(int whichrow) const { return integrCol_(whichrow); }
    404404
     
    445445  void shift(int npix);
    446446
    447   casa::SpectralCoordinate getSpectralCoordinate(int whichrow) const;
     447  casacore::SpectralCoordinate getSpectralCoordinate(int whichrow) const;
    448448
    449449  void convertDirection(const std::string& newframe);
     
    475475   * @return antenna name string
    476476   */
    477   casa::String getAntennaName() const;
     477  casacore::String getAntennaName() const;
    478478
    479479  /**
     
    507507   * 30/07/2008 Takeshi Nakazato
    508508   **/
    509   void reshapeSpectrum( int nmin, int nmax ) throw( casa::AipsError );
     509  void reshapeSpectrum( int nmin, int nmax ) throw( casacore::AipsError );
    510510  void reshapeSpectrum( int nmin, int nmax, int irow ) ;
    511511
     
    522522  void regridSpecChannel( double dnu, int nchan=-1 ) ;
    523523
    524   bool isAllChannelsFlagged(casa::uInt whichrow);
     524  bool isAllChannelsFlagged(casacore::uInt whichrow);
    525525
    526526  std::vector<std::string> applyBaselineTable(const std::string& bltable,
     
    666666  static std::vector<bool> getMaskFromMaskList(const int nchan,
    667667                                          const std::vector<int>& masklist);
    668   static casa::Vector<casa::uInt> getMaskListFromMask(
     668  static casacore::Vector<casacore::uInt> getMaskListFromMask(
    669669                                           const std::vector<bool>& mask);
    670670  static std::vector<int> splitToIntList(const std::string& str,
     
    677677private:
    678678
    679   casa::Matrix<casa::Float> getPolMatrix( casa::uInt whichrow ) const;
     679  casacore::Matrix<casacore::Float> getPolMatrix( casacore::uInt whichrow ) const;
    680680
    681681  /**
     
    684684   * @return
    685685   */
    686   std::string formatSec(casa::Double x) const;
    687 
    688   std::string formatTime(const casa::MEpoch& me, bool showdate)const;
    689   std::string formatTime(const casa::MEpoch& me, bool showdate,
    690                          casa::uInt prec)const;
    691 
    692   /**
    693    *  Turns a casa::MDirection into a nicely formatted string
    694    * @param md an casa::MDirection
     686  std::string formatSec(casacore::Double x) const;
     687
     688  std::string formatTime(const casacore::MEpoch& me, bool showdate)const;
     689  std::string formatTime(const casacore::MEpoch& me, bool showdate,
     690                         casacore::uInt prec)const;
     691
     692  /**
     693   *  Turns a casacore::MDirection into a nicely formatted string
     694   * @param md an casacore::MDirection
    695695   * @param prec output precision of direction
    696696   * @return
    697697   */
    698   std::string formatDirection(const casa::MDirection& md, casa::Int prec=7) const;
     698  std::string formatDirection(const casacore::MDirection& md, casacore::Int prec=7) const;
    699699
    700700  /**
     
    702702   * @return just the name
    703703   */
    704   static casa::String generateName();
     704  static casacore::String generateName();
    705705
    706706  /**
     
    710710
    711711  /**
    712    * Set up the main casa::Table
     712   * Set up the main casacore::Table
    713713   */
    714714  void setupMainTable();
     
    724724  int rowToScanIndex(int therow);
    725725
    726   std::vector<uint> getNumbers(const casa::ScalarColumn<casa::uInt>& col) const;
     726  std::vector<uint> getNumbers(const casacore::ScalarColumn<casacore::uInt>& col) const;
    727727
    728728  /**
     
    733733  std::size_t nValidMask(const std::vector<bool>& mask);
    734734
    735   static const casa::uInt version_ = 4;
     735  static const casacore::uInt version_ = 4;
    736736
    737737  STSelector selector_;
    738738
    739   casa::Table::TableType type_;
     739  casacore::Table::TableType type_;
    740740
    741741  // the actual data
    742   casa::Table table_;
    743   casa::Table originalTable_;
     742  casacore::Table table_;
     743  casacore::Table originalTable_;
    744744
    745745  STTcal tcalTable_;
     
    752752
    753753  // Cached Columns to avoid reconstructing them for each row get/put
    754   casa::ScalarColumn<casa::Double> integrCol_;
    755   casa::MDirection::ScalarColumn dirCol_;
    756   casa::MEpoch::ScalarColumn timeCol_;
    757   casa::ScalarColumn<casa::Float> azCol_;
    758   casa::ScalarColumn<casa::Float> elCol_;
    759   casa::ScalarColumn<casa::String> srcnCol_, fldnCol_;
    760   casa::ScalarColumn<casa::uInt> scanCol_, beamCol_, ifCol_, polCol_, cycleCol_, flagrowCol_;
    761   casa::ScalarColumn<casa::Int> rbeamCol_, srctCol_;
    762   casa::ArrayColumn<casa::Float> specCol_, tsysCol_;
    763   casa::ArrayColumn<casa::uChar> flagsCol_;
     754  casacore::ScalarColumn<casacore::Double> integrCol_;
     755  casacore::MDirection::ScalarColumn dirCol_;
     756  casacore::MEpoch::ScalarColumn timeCol_;
     757  casacore::ScalarColumn<casacore::Float> azCol_;
     758  casacore::ScalarColumn<casacore::Float> elCol_;
     759  casacore::ScalarColumn<casacore::String> srcnCol_, fldnCol_;
     760  casacore::ScalarColumn<casacore::uInt> scanCol_, beamCol_, ifCol_, polCol_, cycleCol_, flagrowCol_;
     761  casacore::ScalarColumn<casacore::Int> rbeamCol_, srctCol_;
     762  casacore::ArrayColumn<casacore::Float> specCol_, tsysCol_;
     763  casacore::ArrayColumn<casacore::uChar> flagsCol_;
    764764
    765765  // id in frequencies table
    766   casa::ScalarColumn<casa::uInt> mfreqidCol_;
     766  casacore::ScalarColumn<casacore::uInt> mfreqidCol_;
    767767  // id in tcal table
    768   casa::ScalarColumn<casa::uInt> mtcalidCol_;
    769 
    770   casa::ArrayColumn<casa::String> histitemCol_;
    771   casa::ScalarColumn<casa::Int> mfitidCol_;
    772   casa::ScalarColumn<casa::uInt> mweatheridCol_;
    773 
    774   casa::ScalarColumn<casa::uInt> mfocusidCol_;
    775 
    776   casa::ScalarColumn<casa::uInt> mmolidCol_;
     768  casacore::ScalarColumn<casacore::uInt> mtcalidCol_;
     769
     770  casacore::ArrayColumn<casacore::String> histitemCol_;
     771  casacore::ScalarColumn<casacore::Int> mfitidCol_;
     772  casacore::ScalarColumn<casacore::uInt> mweatheridCol_;
     773
     774  casacore::ScalarColumn<casacore::uInt> mfocusidCol_;
     775
     776  casacore::ScalarColumn<casacore::uInt> mmolidCol_;
    777777
    778778  static std::map<std::string, STPol::STPolFactory *> factories_;
     
    789789   * 25/10/2009 Wataru Kawasaki
    790790   */
    791   template<class T, class T2> void attachAuxColumnDef(casa::ScalarColumn<T>&,
    792                                                        const casa::String&,
     791  template<class T, class T2> void attachAuxColumnDef(casacore::ScalarColumn<T>&,
     792                                                       const casacore::String&,
    793793                                                       const T2&);
    794   template<class T, class T2> void attachAuxColumnDef(casa::ArrayColumn<T>&,
    795                                                       const casa::String&,
    796                                                       const casa::Array<T2>&);
     794  template<class T, class T2> void attachAuxColumnDef(casacore::ArrayColumn<T>&,
     795                                                      const casacore::String&,
     796                                                      const casacore::Array<T2>&);
    797797
    798798  double getNormalPolynomial(int n, double x);
     
    950950                            bool& outTextFile,
    951951                            bool& csvFormat,
    952                             casa::String& coordInfo,
     952                            casacore::String& coordInfo,
    953953                            bool& hasSameNchan,
    954954                            const std::string& progressInfo,
    955955                            bool& showProgress,
    956956                            int& minNRow,
    957                             casa::Vector<casa::Double>& timeSecCol);
     957                            casacore::Vector<casacore::Double>& timeSecCol);
    958958  void finaliseBaselining(const bool outBaselineTable,
    959959                          STBaselineTable* pbt,
     
    968968  std::string getMaskRangeList(const std::vector<bool>& mask,
    969969                                int whichrow,
    970                                 const casa::String& coordInfo,
     970                                const casacore::String& coordInfo,
    971971                                bool hasSameNchan,
    972972                                bool verbose=false);
     
    976976  std::vector<bool> getCompositeChanMask(int whichrow, const std::vector<bool>& inMask);
    977977  std::vector<bool> getCompositeChanMask(int whichrow, const std::vector<bool>& inMask, const std::vector<int>& edge, std::vector<int>& currEdge, STLineFinder& lineFinder);
    978   void outputFittingResult(bool outLogger, bool outTextFile, bool csvFormat, const std::vector<bool>& chanMask, int whichrow, const casa::String& coordInfo, bool hasSameNchan, std::ofstream& ofs, const casa::String& funcName, const std::vector<int>& edge, const std::vector<float>& params, const int nClipped);
    979   void outputFittingResult(bool outLogger, bool outTextFile, bool csvFormat, const std::vector<bool>& chanMask, int whichrow, const casa::String& coordInfo, bool hasSameNchan, std::ofstream& ofs, const casa::String& funcName, const std::vector<float>& params, const int nClipped);
     978  void outputFittingResult(bool outLogger, bool outTextFile, bool csvFormat, const std::vector<bool>& chanMask, int whichrow, const casacore::String& coordInfo, bool hasSameNchan, std::ofstream& ofs, const casacore::String& funcName, const std::vector<int>& edge, const std::vector<float>& params, const int nClipped);
     979  void outputFittingResult(bool outLogger, bool outTextFile, bool csvFormat, const std::vector<bool>& chanMask, int whichrow, const casacore::String& coordInfo, bool hasSameNchan, std::ofstream& ofs, const casacore::String& funcName, const std::vector<float>& params, const int nClipped);
    980980  void parseProgressInfo(const std::string& progressInfo, bool& showProgress, int& minNRow);
    981981  void showProgressOnTerminal(const int nProcessed, const int nTotal, const bool showProgress=true, const int nTotalThreshold=1000);
    982982
    983   void applyChanFlag( casa::uInt whichrow, const std::vector<bool>& msk, casa::uChar flagval);
     983  void applyChanFlag( casacore::uInt whichrow, const std::vector<bool>& msk, casacore::uChar flagval);
    984984
    985985  double doCalculateModelSelectionCriteria(const std::string& valname,
     
    988988                                           const std::string& blfunc,
    989989                                           int order);
    990   double doGetRms(const std::vector<bool>& mask, const casa::Vector<casa::Float>& spec);
     990  double doGetRms(const std::vector<bool>& mask, const casacore::Vector<casacore::Float>& spec);
    991991  std::string packFittingResults(const int irow, const std::vector<float>& params, const float rms);
    992992  void parseBlInfo(const std::string& blInfo, int& whichrow, STBaselineFunc::FuncName& ftype, std::vector<int>& fpar, std::vector<bool>& mask, float& thresClip, int& nIterClip, bool& useLineFinder, float& thresLF, std::vector<int>& edgeLF, int& avgLF);
  • trunk/src/ScantableWrapper.h

    r3085 r3106  
    4545  {
    4646    GILHandler scopedRelease;
    47     casa::Table::TableType tp = casa::Table::Memory;
    48     if ( type == 1 ) tp = casa::Table::Plain;
     47    casacore::Table::TableType tp = casacore::Table::Memory;
     48    if ( type == 1 ) tp = casacore::Table::Plain;
    4949    table_ = new Scantable(name, tp);
    5050  }
     
    5353  {
    5454    GILHandler scopedRelease;
    55     casa::Table::TableType tp = casa::Table::Memory;
    56     if ( type == 1) tp = casa::Table::Plain;
     55    casacore::Table::TableType tp = casacore::Table::Memory;
     56    if ( type == 1) tp = casacore::Table::Plain;
    5757    table_= new Scantable(tp);
    5858  }
    5959
    60   explicit ScantableWrapper(casa::CountedPtr<Scantable> cp) : table_(cp) {;}
     60  explicit ScantableWrapper(casacore::CountedPtr<Scantable> cp) : table_(cp) {;}
    6161
    6262  ScantableWrapper(const ScantableWrapper& mt) :
     
    105105  //  { return table_->getTime(whichrow); }
    106106  std::string getTime(int whichrow=0, int prec = 0) const
    107     { return table_->getTime(whichrow, true, casa::uInt(prec)); }
     107    { return table_->getTime(whichrow, true, casacore::uInt(prec)); }
    108108
    109109  double getIntTime(int whichrow=0) const
     
    134134    { table_->flag(whichrow, msk, unflag); }
    135135
    136   void flagRow(const std::vector<casa::uInt>& rows=std::vector<casa::uInt>(), bool unflag=false)
     136  void flagRow(const std::vector<casacore::uInt>& rows=std::vector<casacore::uInt>(), bool unflag=false)
    137137    { table_->flagRow(rows, unflag); }
    138138
     
    140140    { return table_->getFlagRow(whichrow); }
    141141
    142   void clip(const casa::Float uthres, const casa::Float dthres, bool clipoutside=true, bool unflag=false)
     142  void clip(const casacore::Float uthres, const casacore::Float dthres, bool clipoutside=true, bool unflag=false)
    143143    { table_->clip(uthres, dthres, clipoutside, unflag); }
    144144
    145   std::vector<bool> getClipMask(int whichrow, const casa::Float uthres, const casa::Float dthres, bool clipoutside, bool unflag) const
     145  std::vector<bool> getClipMask(int whichrow, const casacore::Float uthres, const casacore::Float dthres, bool clipoutside, bool unflag) const
    146146    { return table_->getClipMask(whichrow, uthres, dthres, clipoutside, unflag); }
    147147
     
    236236    { table_->setDirectionRefString(refstr); }
    237237
    238   casa::CountedPtr<Scantable> getCP() const {return table_;}
     238  casacore::CountedPtr<Scantable> getCP() const {return table_;}
    239239  Scantable* getPtr() {return &(*table_);}
    240240
     
    343343
    344344  bool isAllChannelsFlagged(int whichrow=0) const
    345   { return table_->isAllChannelsFlagged(casa::uInt(whichrow)); }
     345  { return table_->isAllChannelsFlagged(casacore::uInt(whichrow)); }
    346346
    347347  std::vector<float> execFFT(int whichrow, const std::vector<bool>& mask, bool getRealImag=false, bool getAmplitudeOnly=false)
     
    362362
    363363private:
    364   casa::CountedPtr<Scantable> table_;
     364  casacore::CountedPtr<Scantable> table_;
    365365};
    366366
  • trunk/src/TableTraverse.cpp

    r3091 r3106  
    2323//static const char version[] = "$Id$";
    2424
    25 using namespace casa;
     25using namespace casacore;
    2626
    2727namespace asap {
  • trunk/src/TableTraverse.h

    r2343 r3106  
    4343    // <p>If <src>visit()</src> throws an exception, the iteration stops and
    4444    // <src>finish()</src> will not be called.</p>
    45     virtual casa::Bool visit(casa::Bool isFirst, casa::uInt recordNo,
    46                              casa::uInt nCols,
     45    virtual casacore::Bool visit(casacore::Bool isFirst, casacore::uInt recordNo,
     46                             casacore::uInt nCols,
    4747                             void const *const colValues[]) = 0;
    4848
     
    5555  public:
    5656    virtual ~TypeManager() {}
    57     virtual casa::BaseCompare *getComparator() const = 0;
     57    virtual casacore::BaseCompare *getComparator() const = 0;
    5858    virtual size_t sizeOf() const = 0;
    5959    virtual void *allocArray(size_t size) const = 0;
     
    6262
    6363  // This template is applicable to the type which can be applied to
    64   // <src>casa::ObjCompare&lt;T&gt;</src>.
     64  // <src>casacore::ObjCompare&lt;T&gt;</src>.
    6565  template<class T> class TypeManagerImpl: public TypeManager {
    6666  public:
    6767    TypeManagerImpl(){}
    68     virtual casa::BaseCompare *getComparator() const {
    69       static casa::ObjCompare<T> comparator;
     68    virtual casacore::BaseCompare *getComparator() const {
     69      static casacore::ObjCompare<T> comparator;
    7070      return &comparator;
    7171    }
     
    100100  // for each column. <src>columnNames[0]</src> is a primary sort key and
    101101  // <src>columnNames[1]</src> is a secondary sort key, ...</p>
    102   void traverseTable(const casa::Table &table,
     102  void traverseTable(const casacore::Table &table,
    103103                     const char *const columnNames[],
    104104                     const TypeManager *const typeManagers[],
    105105                     TableVisitor *visitor,
    106                      casa::Bool doSort = casa::True);
     106                     casacore::Bool doSort = casacore::True);
    107107
    108108}
  • trunk/src/python_asap.cpp

    r3035 r3106  
    5151  namespace python {
    5252
    53 void translate_ex(const casa::AipsError& e)
     53void translate_ex(const casacore::AipsError& e)
    5454{
    5555  // Use the Python 'C' API to set up an exception object
  • trunk/src/python_asap.h

    r2921 r3106  
    3434namespace asap {
    3535  namespace python {
    36     void translate_ex(const casa::AipsError& e);
     36    void translate_ex(const casacore::AipsError& e);
    3737#ifdef ENABLE_PLOTTER2
    3838    void python_Plotter2();
Note: See TracChangeset for help on using the changeset viewer.