Changeset 3106
- Timestamp:
- 10/04/16 18:20:50 (8 years ago)
- Location:
- trunk
- Files:
-
- 148 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CMakeLists.txt
r3102 r3106 5 5 # minimum requirement for cmake version 6 6 cmake_minimum_required( VERSION 2.8 ) 7 8 add_definitions ("-DUseCasacoreNamespace") 7 9 8 10 # options -
trunk/apps/asap2to3.cpp
r2157 r3106 6 6 7 7 //#include <casa/namesapce.h> 8 using namespace casa; 8 9 using namespace casacore; 9 10 10 11 int main(int argc, const char* argv[]) { -
trunk/external-alma/asdm2ASAP/ASDMFiller.cc
r2869 r3106 90 90 //logsink_->postLocally( LogMessage("sFreqFrame = "+sFreqFrame,LogOrigin(className_,funcName,WHERE)) ) ; 91 91 92 Vector<casa ::Double> antpos = table_->getHeader().antennaposition ;92 Vector<casacore::Double> antpos = table_->getHeader().antennaposition ; 93 93 94 94 // data selection … … 194 194 195 195 // fill MOLECULE_ID and add MOLECULES row if necessary 196 Vector<casa ::Double> restFreqs( rf.size() ) ;196 Vector<casacore::Double> restFreqs( rf.size() ) ; 197 197 for ( uInt i = 0 ; i < rf.size() ; i++ ) 198 restFreqs[i] = (casa ::Double)(rf[i]) ;198 restFreqs[i] = (casacore::Double)(rf[i]) ; 199 199 setMolecule( restFreqs ) ; 200 200 201 201 // 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()) ; 204 204 //logsink_->postLocally( LogMessage("mjd = "+String::toString(mjd),LogOrigin(className_,funcName,WHERE)) ) ; 205 205 … … 208 208 209 209 // 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 ) ; 217 217 218 218 // fill FLAGROW … … 231 231 windspeed, 232 232 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 ) ; 238 238 //logsink_->postLocally( LogMessage("temperature = "+String::toString(temperature),LogOrigin(className_,funcName,WHERE)) ) ; 239 239 // fill AZIMUTH, ELEVATION, DIRECTION and SCANRATE … … 246 246 el, 247 247 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 ) ; 250 250 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]) ; 253 253 } 254 254 setScanRate( scanRate ) ; 255 255 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]) ; 258 258 } 259 259 else { … … 261 261 } 262 262 //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 ) ; 264 264 265 265 // REFPIX, REFVAL, INCREMENT … … 270 270 else { 271 271 reader_->getFrequency( refpix, refval, incr, freqref ) ; 272 refval = (double)toLSRK( casa ::Double(refval),272 refval = (double)toLSRK( casacore::Double(refval), 273 273 String(freqref), 274 274 hdr.utc, … … 281 281 282 282 // 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 ) ; 284 284 285 285 // loop on polarization … … 303 303 // OPACITY 304 304 vector<float> tau = reader_->getOpacity() ; 305 Vector<casa ::Float> opacity = toVector( tau, numPol ) ;305 Vector<casacore::Float> opacity = toVector( tau, numPol ) ; 306 306 307 307 // SPECTRA, FLAGTRA, TSYS, TCAL … … 311 311 vector< vector<float> > tc ; 312 312 reader_->getTcalAndTsys( tc, ts ) ; 313 Matrix<casa ::Float> spectra = toMatrix( sp, numPol, numChan ) ;313 Matrix<casacore::Float> spectra = toMatrix( sp, numPol, numChan ) ; 314 314 //logsink_->postLocally( LogMessage("spectra(0,0) = "+String::toString(spectra(0,0)),LogOrigin(className_,funcName,WHERE)) ) ; 315 315 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 ) ; 318 318 //logsink_->postLocally( LogMessage("tsys(0,0) = "+String::toString(tsys(0,0)),LogOrigin(className_,funcName,WHERE)) ) ; 319 319 // String caltime = "" ; 320 // if ( anyNE( tcal, (casa ::Float)1.0 ) )320 // if ( anyNE( tcal, (casacore::Float)1.0 ) ) 321 321 // caltime = toTcalTime( mjd ) ; 322 322 String caltime = toTcalTime( mjd ) ; … … 401 401 string ref ; 402 402 reader_->getSourceDirection( sdir, ref ) ; 403 Vector<casa ::Double> sourceDir( sdir ) ;403 Vector<casacore::Double> sourceDir( sdir ) ; 404 404 hdr.reffreq = toLSRK( hdr.reffreq, hdr.freqref, hdr.utc, hdr.antennaposition, sdir, String(ref) ) ; 405 405 hdr.freqref = "LSRK" ; … … 437 437 } 438 438 439 Matrix<casa ::Float> ASDMFiller::toMatrix( float *sp,439 Matrix<casacore::Float> ASDMFiller::toMatrix( float *sp, 440 440 unsigned int npol, 441 441 unsigned int nchan ) 442 442 { 443 Matrix<casa ::Float> mSp( npol, nchan ) ;443 Matrix<casacore::Float> mSp( npol, nchan ) ; 444 444 if ( npol <= 2 ) { 445 445 // 1 or 2 polarization case 446 446 for ( unsigned int ich = 0 ; ich < nchan ; ich++ ) { 447 447 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]) ; 449 449 } 450 450 } … … 453 453 // 4 polarization case 454 454 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) 459 459 } 460 460 } … … 462 462 } 463 463 464 Matrix<casa ::Float> ASDMFiller::toMatrix( vector< vector<float> > &tsys,464 Matrix<casacore::Float> ASDMFiller::toMatrix( vector< vector<float> > &tsys, 465 465 unsigned int npol, 466 466 unsigned int nchan ) … … 468 468 unsigned int numRec = tsys.size() ; 469 469 unsigned int numChan = tsys[0].size() ; 470 Matrix<casa ::Float> ret ;470 Matrix<casacore::Float> ret ; 471 471 if ( npol == numRec && nchan == numChan ) { 472 472 ret.resize( npol, nchan ) ; 473 473 for ( unsigned int ip = 0 ; ip < npol ; ip++ ) 474 474 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]) ; 476 476 } 477 477 else if ( npol == numRec && numChan == 1 ) { 478 478 ret.resize( npol, 1 ) ; 479 479 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]) ; 481 481 } 482 482 else if ( numRec == 1 && nchan == numChan ) { … … 484 484 for ( unsigned int ip = 0 ; ip < npol ; ip++ ) 485 485 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]) ; 487 487 } 488 488 else if ( numRec == 1 && numChan == 1 ) { 489 489 ret.resize( npol, 1 ) ; 490 490 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]) ; 492 492 } 493 493 else if ( numRec == 2 && npol == 4 && numChan == nchan ) { … … 496 496 ret.resize( npol, nchan ) ; 497 497 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]) ; 501 501 ret( 2, ic ) = tsysxy ; 502 502 ret( 3, ic ) = tsysxy ; … … 507 507 // at the moment Tsys[XY] = 0.5*(Tsys[X]+Tsys[Y]) 508 508 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]) ; 512 512 ret( 2, 0 ) = tsysxy ; 513 513 ret( 3, 0 ) = tsysxy ; … … 517 517 for ( unsigned int ip = 0 ; ip < npol ; ip++ ) 518 518 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]) ; 520 520 } 521 521 return ret ; 522 522 } 523 523 524 Vector<casa ::Float> ASDMFiller::toVector( vector<float> &tau,524 Vector<casacore::Float> ASDMFiller::toVector( vector<float> &tau, 525 525 unsigned int npol ) 526 526 { 527 527 String funcName = "toVector" ; 528 528 529 Vector<casa ::Float> ret( npol ) ;529 Vector<casacore::Float> ret( npol ) ; 530 530 //logsink_->postLocally( LogMessage("tau0="+String::toString(tau[0]),LogOrigin(className_,funcName,WHERE)) ) ; 531 531 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] ; 534 534 ret[2] = 0.5 * ( ret[0] + ret[1] ) ; 535 535 ret[3] = ret[2] ; … … 537 537 else if ( npol == tau.size() ) { 538 538 for ( unsigned int ipol = 0 ; ipol < npol ; ipol++ ) 539 ret[ipol] = (casa ::Float)tau[ipol] ;539 ret[ipol] = (casacore::Float)tau[ipol] ; 540 540 } 541 541 else { 542 542 // I don't know how to handle... 543 543 for ( unsigned int ipol = 0 ; ipol < npol ; ipol++ ) 544 ret[ipol] = (casa ::Float)tau[0] ;544 ret[ipol] = (casacore::Float)tau[0] ; 545 545 } 546 546 //logsink_->postLocally( LogMessage("tau="+String::toString(ret),LogOrigin(className_,funcName,WHERE)) ) ; … … 548 548 } 549 549 550 String ASDMFiller::toTcalTime( casa ::Double mjd )550 String ASDMFiller::toTcalTime( casacore::Double mjd ) 551 551 { 552 552 return MVTime( mjd ).string( MVTime::YMD ) ; 553 553 } 554 554 555 void ASDMFiller::toJ2000( Vector<casa ::Double> &dir,555 void ASDMFiller::toJ2000( Vector<casacore::Double> &dir, 556 556 double az, 557 557 double el, 558 casa ::Double mjd,559 Vector<casa ::Double> antpos )558 casacore::Double mjd, 559 Vector<casacore::Double> antpos ) 560 560 { 561 561 String funcName = "toJ2000" ; 562 562 563 Vector<casa ::Double> azel( 2 ) ;563 Vector<casacore::Double> azel( 2 ) ; 564 564 azel[0] = az ; 565 565 azel[1] = el ; … … 580 580 } 581 581 582 Vector<casa ::Double> ASDMFiller::toJ2000( Vector<casa::Double> dir,582 Vector<casacore::Double> ASDMFiller::toJ2000( Vector<casacore::Double> dir, 583 583 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 ) ; 588 588 if ( dirref != "J2000" ) { 589 589 MEpoch me( Quantity( mjd, "d" ), MEpoch::UTC ) ; … … 620 620 } 621 621 622 casa ::Double ASDMFiller::toLSRK( casa::Double freq,622 casacore::Double ASDMFiller::toLSRK( casacore::Double freq, 623 623 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, 627 627 String dirref ) 628 628 { … … 630 630 631 631 //logsink_->postLocally( LogMessage("freqref = "+freqref,LogOrigin(className_,funcName,WHERE)) ) ; 632 casa ::Double newf = freq ;632 casacore::Double newf = freq ; 633 633 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 ) ; 636 636 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") ) ; 638 638 MPosition mp( antposQ, MPosition::ITRF ) ; 639 639 MDirection::Types dirtype ; … … 641 641 if ( !b ) 642 642 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") ), 645 645 dirtype ) ; 646 646 MeasFrame mf( me, mp, md ) ; … … 651 651 MFrequency::Convert tolsr( freqtype, 652 652 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() ; 654 654 //logsink_->postLocally( LogMessage("freq = "+String::toString(freq)+", newf = "+String::toString(newf),LogOrigin(className_,funcName,WHERE)) ) ; 655 655 } -
trunk/external-alma/asdm2ASAP/ASDMFiller.h
r2754 r3106 13 13 public: 14 14 // constructor and destructor 15 ASDMFiller( casa ::CountedPtr<asap::Scantable> stable ) ;15 ASDMFiller( casacore::CountedPtr<asap::Scantable> stable ) ; 16 16 ~ASDMFiller() ; 17 17 18 18 // open data 19 bool open( const std::string &filename, const casa ::Record &rec ) ;19 bool open( const std::string &filename, const casacore::Record &rec ) ; 20 20 21 21 // fill data … … 26 26 27 27 // get reader object 28 casa ::CountedPtr<ASDMReader> getReader() { return reader_ ; } ;28 casacore::CountedPtr<ASDMReader> getReader() { return reader_ ; } ; 29 29 30 30 // set logger 31 void setLogger( casa ::CountedPtr<casa::LogSinkInterface> &logsink ) ;31 void setLogger( casacore::CountedPtr<casacore::LogSinkInterface> &logsink ) ; 32 32 33 33 private: … … 36 36 37 37 // get IF key 38 casa ::String getIFKey( casa::uInt ifno ) ;38 casacore::String getIFKey( casacore::uInt ifno ) ; 39 39 40 40 // get FREQUENCIES attributes from ifrec_ 41 void getFrequencyRec( casa ::String key,41 void getFrequencyRec( casacore::String key, 42 42 double &refpix, 43 43 double &refval, … … 45 45 46 46 // set FREQUENCIES attributes to ifrec_ 47 void setFrequencyRec( casa ::String key,47 void setFrequencyRec( casacore::String key, 48 48 double refpix, 49 49 double refval, … … 51 51 52 52 // reshape float array spectra to Matrix<Float> 53 casa ::Matrix<casa::Float> toMatrix( float *sp,53 casacore::Matrix<casacore::Float> toMatrix( float *sp, 54 54 unsigned int npol, 55 55 unsigned int nchan ) ; 56 56 57 57 // 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, 59 59 unsigned int npol, 60 60 unsigned int nchan ) ; 61 61 62 62 // 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, 64 64 unsigned int npol ) ; 65 65 66 66 // create TCAL time string from MJD 67 casa ::String toTcalTime( casa::Double mjd ) ;67 casacore::String toTcalTime( casacore::Double mjd ) ; 68 68 69 69 // AZEL to J2000 70 void toJ2000( casa ::Vector<casa::Double> &dir,70 void toJ2000( casacore::Vector<casacore::Double> &dir, 71 71 double az, 72 72 double el, 73 casa ::Double mjd,74 casa ::Vector<casa::Double> antpos ) ;73 casacore::Double mjd, 74 casacore::Vector<casacore::Double> antpos ) ; 75 75 76 76 // 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 ) ; 81 81 82 82 // get frequency frame enum value from string 83 casa ::MFrequency::Types toFrameType( std::string &s ) ;83 casacore::MFrequency::Types toFrameType( std::string &s ) ; 84 84 85 85 // to LSRK 86 86 // utc must be UTC time in "d" (day) 87 87 // 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 ) ; 94 94 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_ ; 98 98 99 casa ::Record ifrec_ ;99 casacore::Record ifrec_ ; 100 100 101 casa ::CountedPtr<casa::LogSinkInterface> logsink_ ;101 casacore::CountedPtr<casacore::LogSinkInterface> logsink_ ; 102 102 103 casa ::String className_ ;104 casa ::Bool freqToLsr_ ;103 casacore::String className_ ; 104 casacore::Bool freqToLsr_ ; 105 105 106 106 } ; -
trunk/external-alma/asdm2ASAP/ASDMReader.cc
r2755 r3106 57 57 } 58 58 59 bool ASDMReader::open( const string &filename, const casa ::Record &rec )60 { 61 casa ::String funcName = "open" ;59 bool ASDMReader::open( const string &filename, const casacore::Record &rec ) 60 { 61 casacore::String funcName = "open" ; 62 62 63 63 // return value … … 72 72 // parsing ASDM options 73 73 if ( rec.isDefined( "asdm" ) ) { 74 casa ::Record asdmrec = rec.asRecord( "asdm" ) ;74 casacore::Record asdmrec = rec.asRecord( "asdm" ) ; 75 75 76 76 // antenna 77 77 if ( asdmrec.isDefined( "antenna" ) ) { 78 if ( asdmrec.type( asdmrec.fieldNumber( "antenna" ) ) == casa ::TpInt ) {78 if ( asdmrec.type( asdmrec.fieldNumber( "antenna" ) ) == casacore::TpInt ) { 79 79 antennaId_ = asdmrec.asInt( "antenna" ) ; 80 80 } … … 183 183 vector<AntennaRow *> rows = atab.get() ; 184 184 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_ ) { 187 187 idx = rows[irow]->getAntennaId().getTagValue() ; 188 188 break ; … … 191 191 if ( idx == -1 ) { 192 192 close() ; 193 throw (casa ::AipsError( antennaName_ + " not found." )) ;193 throw (casacore::AipsError( antennaName_ + " not found." )) ; 194 194 } 195 195 else { … … 204 204 if ( antennaRow == 0 ) { 205 205 close() ; 206 throw (casa ::AipsError( "AntennaId " + casa::String::toString(antennaId_) + " is invalid." ) ) ;206 throw (casacore::AipsError( "AntennaId " + casacore::String::toString(antennaId_) + " is invalid." ) ) ; 207 207 } 208 208 } … … 211 211 // set antenna name 212 212 if ( antennaName_.size() == 0 ) { 213 antennaName_ = casa ::String( antennaRow->getName() ) ;213 antennaName_ = casacore::String( antennaRow->getName() ) ; 214 214 } 215 215 … … 218 218 219 219 // station name 220 stationName_ = casa ::String( stationRow->getName() ) ;220 stationName_ = casacore::String( stationRow->getName() ) ; 221 221 222 222 // antenna position 223 223 antennaPosition_.resize( 3 ) ; 224 224 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 ) ; 229 229 mf_.set( mp_ ) ; 230 230 … … 233 233 234 234 // get Main rows 235 //mainRow_ = casa ::Vector<MainRow *>(asdm_->getMain().get()) ;235 //mainRow_ = casacore::Vector<MainRow *>(asdm_->getMain().get()) ; 236 236 237 237 // set up IFNO … … 266 266 } 267 267 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" ;268 void 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" ; 287 287 288 288 ExecBlockTable &ebtab = asdm_->getExecBlock() ; 289 289 // at the moment take first row of ExecBlock table 290 290 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() ) ; 293 293 294 294 // antennaname … … 299 299 // antennaposition 300 300 antennaposition.resize( 3 ) ; 301 for ( casa ::uInt i = 0 ; i < 3 ; i++ )301 for ( casacore::uInt i = 0 ; i < 3 ; i++ ) 302 302 antennaposition[i] = antennaPosition_[i].getValue( Unit("m") ) ; 303 303 … … 311 311 // utc 312 312 // start time of the project 313 utc = casa ::Double( ebrow->getStartTime().getMJD() ) ;313 utc = casacore::Double( ebrow->getStartTime().getMJD() ) ; 314 314 315 315 … … 330 330 refidx = irow ; 331 331 } 332 nchan = casa ::Int( *max_element( nchans.begin(), nchans.end() ) ) ;332 nchan = casacore::Int( *max_element( nchans.begin(), nchans.end() ) ) ; 333 333 334 334 //logsink_->postLocally( LogMessage("refidx = "+String::toString(refidx),LogOrigin(className_,funcName,WHERE)) ) ; … … 341 341 } 342 342 } 343 bandwidth = casa ::Double( *max_element( bws.begin(), bws.end() ) ) ;343 bandwidth = casacore::Double( *max_element( bws.begin(), bws.end() ) ) ; 344 344 345 345 // reffreq 346 reffreq = casa ::Double( spwrows[refidx]->getRefFreq().get() ) ;346 reffreq = casacore::Double( spwrows[refidx]->getRefFreq().get() ) ; 347 347 348 348 // freqref … … 386 386 387 387 // npol 388 npol = casa ::Int( *max_element( npols.begin(), npols.end() ) ) ;388 npol = casacore::Int( *max_element( npols.begin(), npols.end() ) ) ; 389 389 390 390 // poltype … … 425 425 426 426 // nbeam 427 nbeam = casa ::Int( *max_element( nbeams.begin(), nbeams.end() ) ) ;427 nbeam = casacore::Int( *max_element( nbeams.begin(), nbeams.end() ) ) ; 428 428 429 429 // fluxunit … … 445 445 obstype = "" ; 446 446 for ( unsigned int imode = 0 ; imode < obsmode.size() ; imode++ ) { 447 obstype += casa ::String(obsmode[imode]) ;447 obstype += casacore::String(obsmode[imode]) ; 448 448 if ( imode != obsmode.size()-1 ) 449 449 obstype += "#" ; … … 453 453 void ASDMReader::selectConfigDescription() 454 454 { 455 casa ::String funcName = "selectConfigDescription" ;455 casacore::String funcName = "selectConfigDescription" ; 456 456 457 457 vector<ConfigDescriptionRow *> cdrows = asdm_->getConfigDescription().get() ; … … 466 466 configDescIdList_.resize( cdidTags.size() ) ; 467 467 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() ) ; 469 469 } 470 470 } … … 476 476 Tag atag( antennaId_, TagType::Antenna ) ; 477 477 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 ) ) 480 480 continue ; 481 481 if ( frows[irow]->getAntennaId() == atag ) { … … 487 487 } 488 488 489 casa ::Vector<casa::uInt> ASDMReader::getFieldIdList()490 { 491 casa ::String funcName = "getFieldIdList" ;489 casacore::Vector<casacore::uInt> ASDMReader::getFieldIdList() 490 { 491 casacore::String funcName = "getFieldIdList" ; 492 492 493 493 vector<FieldRow *> frows = asdm_->getField().get() ; … … 501 501 } 502 502 503 casa ::uInt ASDMReader::getNumMainRow()504 { 505 casa ::uInt nrow = casa::uInt( mainRow_.size() ) ;503 casacore::uInt ASDMReader::getNumMainRow() 504 { 505 casacore::uInt nrow = casacore::uInt( mainRow_.size() ) ; 506 506 507 507 return nrow ; … … 534 534 } 535 535 536 casa ::Bool ASDMReader::setMainRow( casa::uInt irow )537 { 538 casa ::Bool status = true ;536 casacore::Bool ASDMReader::setMainRow( casacore::uInt irow ) 537 { 538 casacore::Bool status = true ; 539 539 row_ = irow ; 540 540 execBlockTag_ = mainRow_[row_]->getExecBlockId() ; … … 544 544 status = false ; 545 545 else { 546 status = (casa ::Bool)(sdmBin_->acceptMainRow( mainRow_[row_] )) ;546 status = (casacore::Bool)(sdmBin_->acceptMainRow( mainRow_[row_] )) ; 547 547 } 548 548 return status ; 549 549 } 550 550 551 casa ::Bool ASDMReader::setMainRow( casa::uInt configDescId, casa::uInt fieldId )551 casacore::Bool ASDMReader::setMainRow( casacore::uInt configDescId, casacore::uInt fieldId ) 552 552 { 553 553 clearMainRow() ; … … 558 558 if (rows == 0) 559 559 return false; 560 mainRow_ = casa ::Vector<MainRow *>( *rows ) ;560 mainRow_ = casacore::Vector<MainRow *>( *rows ) ; 561 561 562 562 return true ; … … 570 570 void ASDMReader::setupIFNO() 571 571 { 572 casa ::String funcName = "setupIFNO" ;572 casacore::String funcName = "setupIFNO" ; 573 573 574 574 vector<SpectralWindowRow *> spwrows = asdm_->getSpectralWindow().get() ; 575 575 unsigned int nrow = spwrows.size() ; 576 576 ifno_.clear() ; 577 casa ::uInt idx = 0 ;578 casa ::uInt wvridx = 0 ;577 casacore::uInt idx = 0 ; 578 casacore::uInt wvridx = 0 ; 579 579 for ( unsigned int irow = 0 ; irow < nrow ; irow++ ) { 580 casa ::uInt index ;580 casacore::uInt index ; 581 581 if ( isWVR( spwrows[irow] ) ) { 582 582 //logsink_->postLocally( LogMessage(spwrows[irow]->getSpectralWindowId().toString()+" is WVR",LogOrigin(className_,funcName,WHERE)) ) ; … … 586 586 index = ++idx ; 587 587 } 588 ifno_.insert( pair<Tag,casa ::uInt>(spwrows[irow]->getSpectralWindowId(),index) ) ;588 ifno_.insert( pair<Tag,casacore::uInt>(spwrows[irow]->getSpectralWindowId(),index) ) ; 589 589 //logsink_->postLocally( LogMessage(spwrows[irow]->getSpectralWindowId().toString()+": IFNO="+String::toString(index),LogOrigin(className_,funcName,WHERE)) ) ; 590 590 } … … 601 601 } 602 602 603 casa ::Bool ASDMReader::setData()604 { 605 casa ::String funcName = "setData" ;603 casacore::Bool ASDMReader::setData() 604 { 605 casacore::String funcName = "setData" ; 606 606 607 607 //logsink_->postLocally( LogMessage("try to retrieve binary data",LogOrigin(className_,funcName,WHERE)) ) ; … … 678 678 } 679 679 680 casa ::uInt ASDMReader::getIFNo( unsigned int idx )680 casacore::uInt ASDMReader::getIFNo( unsigned int idx ) 681 681 { 682 682 prepareData( idx ) ; … … 684 684 } 685 685 686 casa ::uInt ASDMReader::getIFNo()687 { 688 map<Tag,casa ::uInt>::iterator iter = ifno_.find( specWinTag_ ) ;686 casacore::uInt ASDMReader::getIFNo() 687 { 688 map<Tag,casacore::uInt>::iterator iter = ifno_.find( specWinTag_ ) ; 689 689 if ( iter != ifno_.end() ) 690 690 return iter->second ; … … 720 720 string &freqref ) 721 721 { 722 casa ::String funcName = "getFrequency" ;722 casacore::String funcName = "getFrequency" ; 723 723 724 724 int nchan = specWinRow_p->getNumChan() ; … … 737 737 } 738 738 else { 739 throw (casa ::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;739 throw (casacore::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ; 740 740 } 741 741 } … … 752 752 } 753 753 else { 754 throw (casa ::AipsError( "Either chanWidthArray or chanWidth must exist." )) ;754 throw (casacore::AipsError( "Either chanWidthArray or chanWidth must exist." )) ; 755 755 } 756 756 if ( specWinRow_p->isChanFreqStepExists() ) { … … 764 764 } 765 765 else { 766 throw (casa ::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ;766 throw (casacore::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ; 767 767 } 768 768 if ( specWinRow_p->isChanFreqStartExists() ) { … … 773 773 } 774 774 else { 775 throw (casa ::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;775 throw (casacore::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ; 776 776 } 777 777 } … … 788 788 } 789 789 else { 790 throw (casa ::AipsError( "Either chanWidthArray or chanWidth must exist." )) ;790 throw (casacore::AipsError( "Either chanWidthArray or chanWidth must exist." )) ; 791 791 } 792 792 if ( specWinRow_p->isChanFreqStepExists() ) { … … 800 800 } 801 801 else { 802 throw (casa ::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ;802 throw (casacore::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ; 803 803 } 804 804 if ( specWinRow_p->isChanFreqStartExists() ) { … … 810 810 } 811 811 else { 812 throw (casa ::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;812 throw (casacore::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ; 813 813 } 814 814 } … … 1264 1264 for ( unsigned int irow = 0 ; irow < nrow ; irow++ ) { 1265 1265 CalAtmosphereRow *atmrow = atmrows[irow] ; 1266 if ( casa ::String(atmrow->getAntennaName()) != antennaName_1266 if ( casacore::String(atmrow->getAntennaName()) != antennaName_ 1267 1267 //|| atmrow->getReceiverBand() != rb 1268 1268 //|| atmrow->getBasebandName() != bbname … … 1310 1310 float &windaz ) 1311 1311 { 1312 casa ::String funcName = "getWeatherInfo" ;1312 casacore::String funcName = "getWeatherInfo" ; 1313 1313 1314 1314 temperature = 0.0 ; … … 1710 1710 1711 1711 vector<double> ASDMReader::toJ2000( vector<double> &dir, 1712 casa ::String &dirref,1712 casacore::String &dirref, 1713 1713 double &mjd ) 1714 1714 { 1715 casa ::String funcName = "toJ2000" ;1715 casacore::String funcName = "toJ2000" ; 1716 1716 1717 1717 vector<double> newd( dir ) ; 1718 1718 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 ) ; 1720 1720 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 ) ; 1723 1723 if ( b ) { 1724 casa ::Vector<casa::Double> cdir = toj2000_( dir ).getAngle( "rad" ).getValue() ;1724 casacore::Vector<casacore::Double> cdir = toj2000_( dir ).getAngle( "rad" ).getValue() ; 1725 1725 //logsink_->postLocally( LogMessage("cdir = "+String::toString(cdir),LogOrigin(className_,funcName,WHERE)) ) ; 1726 1726 newd[0] = (double)(cdir[0]) ; … … 1738 1738 string ASDMReader::getFrame() 1739 1739 { 1740 casa ::String funcName = "getFrame" ;1740 casacore::String funcName = "getFrame" ; 1741 1741 1742 1742 // default is TOPO … … 1767 1767 int ASDMReader::getNumIFs() 1768 1768 { 1769 casa ::String funcName = "getNumIFs" ;1769 casacore::String funcName = "getNumIFs" ; 1770 1770 1771 1771 int nif = 0 ; -
trunk/external-alma/asdm2ASAP/ASDMReader.h
r2979 r3106 38 38 * @return boolean status (true or false) 39 39 **/ 40 bool open( const std::string &filename, const casa ::Record &rec ) ;40 bool open( const std::string &filename, const casacore::Record &rec ) ; 41 41 42 42 /** … … 53 53 * get antenna id 54 54 **/ 55 casa ::Int getAntennaId() { return antennaId_ ; } ;55 casacore::Int getAntennaId() { return antennaId_ ; } ; 56 56 57 57 /** 58 58 * get antenna name 59 59 **/ 60 casa ::String getAntennaName() { return antennaName_ ; } ;60 casacore::String getAntennaName() { return antennaName_ ; } ; 61 61 62 62 /** … … 81 81 * @param poltype polarization type 82 82 **/ 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 ) ; 100 100 101 101 /** … … 107 107 * @return list of valid configDescriptionId 108 108 **/ 109 casa ::Vector<casa::uInt> getConfigDescriptionIdList() { return configDescIdList_ ; } ;109 casacore::Vector<casacore::uInt> getConfigDescriptionIdList() { return configDescIdList_ ; } ; 110 110 111 111 /** 112 112 * get list of fieldId 113 113 * 114 * @return list of fieldId as casa ::uInt115 **/ 116 casa ::Vector<casa::uInt> getFieldIdList() ;114 * @return list of fieldId as casacore::uInt 115 **/ 116 casacore::Vector<casacore::uInt> getFieldIdList() ; 117 117 118 118 /** … … 121 121 * @return number of rows in Main table 122 122 **/ 123 casa ::uInt getNumMainRow() ;123 casacore::uInt getNumMainRow() ; 124 124 125 125 /** … … 135 135 * @param fieldId 136 136 **/ 137 casa ::Bool setMainRow( casa::uInt configDescId, casa::uInt fieldId ) ;137 casacore::Bool setMainRow( casacore::uInt configDescId, casacore::uInt fieldId ) ; 138 138 139 139 /** … … 143 143 * @return boolean indicating the row is valid or not 144 144 **/ 145 casa ::Bool setMainRow( casa::uInt irow ) ;145 casacore::Bool setMainRow( casacore::uInt irow ) ; 146 146 147 147 /** … … 181 181 * @return IF number 182 182 **/ 183 casa ::uInt getIFNo( unsigned int idx ) ;184 casa ::uInt getIFNo() ;183 casacore::uInt getIFNo( unsigned int idx ) ; 184 casacore::uInt getIFNo() ; 185 185 186 186 /** … … 387 387 * @return boolean status 388 388 **/ 389 casa ::Bool setData() ;389 casacore::Bool setData() ; 390 390 391 391 /** … … 408 408 * @param logger (LogSinkInterface) 409 409 **/ 410 void setLogger( casa ::CountedPtr<casa::LogSinkInterface> &logsink ) ;410 void setLogger( casacore::CountedPtr<casacore::LogSinkInterface> &logsink ) ; 411 411 412 412 … … 507 507 **/ 508 508 std::vector<double> toJ2000( std::vector<double> &dir, 509 casa ::String &dirref,509 casacore::String &dirref, 510 510 double &mjd ) ; 511 511 … … 579 579 const sdmbin::VMSData *vmsData_ ; 580 580 581 casa ::Int antennaId_ ; // antenna id582 casa ::String antennaName_ ; // antenna name583 casa ::String stationName_ ; // station name584 casa ::Vector<casa::Quantity> antennaPosition_ ; // antenna position585 casa ::Vector<casa::uInt> configDescIdList_ ; // list of valid configDescriptionId586 casa ::Vector<casa::uInt> feedIdList_ ; // list of valid feedId587 casa ::Vector<casa::uInt> fieldIdList_ ; // list of fieldId588 casa ::Int row_ ; // current row index589 map<asdm::Tag,casa ::uInt> ifno_ ; // list of IFNO for each SpectralWindow rows581 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 590 590 unsigned int numData_ ; // number of valid data in vmsData_ where v_antennaId equals antennaId_ 591 591 vector<unsigned int> dataIdList_ ; // list of valid data indexes in vmsData_ … … 597 597 EnumSet<TimeSamplingMod::TimeSampling> timeSampling_ ; // time sampling 598 598 EnumSet<SpectralResolutionTypeMod::SpectralResolutionType> resolutionType_ ; // spectral resolution type 599 casa ::CountedPtr<casa::LogSinkInterface> logsink_ ; // Logger600 casa ::String className_ ;599 casacore::CountedPtr<casacore::LogSinkInterface> logsink_ ; // Logger 600 casacore::String className_ ; 601 601 unsigned int dataIndex_ ; 602 602 603 603 // Tables/Rows for ASDM 604 casa ::Vector<asdm::MainRow *> mainRow_ ; // list of pointers to all Main rows604 casacore::Vector<asdm::MainRow *> mainRow_ ; // list of pointers to all Main rows 605 605 //asdm::AntennaRow *antennaRow_p ; // pointer to target Antenna row 606 606 //asdm::StationRow *stationRow_p ; // pointer to target Station row that target antenna is located … … 617 617 asdm::ArrayTimeInterval timeInterval_ ; 618 618 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_ ; 623 623 } ; 624 624 #endif // ASAP_ASDM_READER_H -
trunk/external-alma/atnf/PKSIO/GBTFITSreader.h
r1868 r3106 50 50 51 51 using namespace std; 52 using namespace casa ;52 using namespace casacore; 53 53 54 54 // <summary> -
trunk/external-alma/atnf/PKSIO/NRODataRecord.h
r2765 r3106 192 192 // 193 193 // 2009/02/26 Takeshi Nakazato Moved to NROReader 194 casa ::CountedPtr<char> LDATA ;194 casacore::CountedPtr<char> LDATA ; 195 195 // Spectral data for FITS data 196 196 //vector<int> JDATA ; -
trunk/external-alma/atnf/PKSIO/NROReader.cc
r3105 r3106 73 73 } 74 74 75 // T must be std::string or casa ::String75 // T must be std::string or casacore::String 76 76 template<class T> 77 77 inline String trim_nro_string(T const &s) { -
trunk/external-alma/atnf/PKSIO/SDFITSreader.h
r1757 r3106 48 48 49 49 using namespace std; 50 using namespace casa ;50 using namespace casacore; 51 51 52 52 // <summary> -
trunk/external-alma/atnf/PKSIO/SDFITSwriter.h
r1757 r3106 43 43 44 44 using namespace std; 45 using namespace casa ;45 using namespace casacore; 46 46 47 47 // <summary> -
trunk/external-alma/components/SpectralComponents/CompiledSpectralElement.h
r2980 r3106 69 69 // Construct a compiled string 70 70 explicit CompiledSpectralElement( 71 const String& function, const Vector<Double>& param71 const casacore::String& function, const casacore::Vector<casacore::Double>& param 72 72 ); 73 73 … … 97 97 98 98 // Save to a record. 99 virtual Bool toRecord(RecordInterface& out) const;99 virtual casacore::Bool toRecord(RecordInterface& out) const; 100 100 101 101 protected: … … 105 105 // For subclasses. Parameters and function must be set after construction. 106 106 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) 108 108 ); 109 109 110 110 CompiledSpectralElement( 111 SpectralElement::Types type, uInt nParam111 SpectralElement::Types type, casacore::uInt nParam 112 112 ); 113 113 114 virtual void _setFunction(const String& function);114 virtual void _setFunction(const casacore::String& function); 115 115 116 116 /* -
trunk/external-alma/components/SpectralComponents/GaussianSpectralElement.h
r2980 r3106 76 76 //# Constants 77 77 // Sigma to FWHM conversion factor 78 static const Double SigmaToFWHM;78 static const casacore::Double SigmaToFWHM; 79 79 80 80 //# Constructors … … 86 86 // </thrown> 87 87 GaussianSpectralElement( 88 const Double ampl, constDouble center,89 const Double sigma88 const casacore::Double ampl, const casacore::Double center, 89 const casacore::Double sigma 90 90 ); 91 91 … … 95 95 // <li> AipsError if sigma == 0.0 96 96 // </thrown> 97 GaussianSpectralElement(const Vector<Double> ¶m);97 GaussianSpectralElement(const casacore::Vector<casacore::Double> ¶m); 98 98 // Copy constructor (deep copy) 99 99 // <thrown> … … 114 114 // GaussianSpectralElement& operator=(const GaussianSpectralElement &other); 115 115 // Evaluate the value of the element at x 116 // Double operator()(constDouble x) const;116 //casacore::Double operator()(const casacore::Double x) const; 117 117 118 Double getSigma() const;119 Double getFWHM() const;118 casacore::Double getSigma() const; 119 casacore::Double getFWHM() const; 120 120 121 Double getSigmaErr() const;122 Double getFWHMErr() const;121 casacore::Double getSigmaErr() const; 122 casacore::Double getFWHMErr() const; 123 123 124 124 125 void setSigma( Double sigma);126 void setFWHM( Double fwhm);125 void setSigma(casacore::Double sigma); 126 void setFWHM(casacore::Double fwhm); 127 127 128 void fixSigma(const Bool fix=True);128 void fixSigma(const casacore::Bool fix=True); 129 129 130 Bool fixedSigma() const;130 casacore::Bool fixedSigma() const; 131 131 132 Double getIntegral() const;132 casacore::Double getIntegral() const; 133 133 134 134 // Save to a record. For Gaussian elements, 135 135 // the width is defined as a FWHM in the record interface. 136 Bool toRecord(RecordInterface &out) const;136 casacore::Bool toRecord(RecordInterface &out) const; 137 137 138 138 // Sigma to FWHM 139 139 // Convert from sigma to FWHM and vice versa 140 140 // <group> 141 static Double sigmaFromFWHM (constDouble fwhm);141 static casacore::Double sigmaFromFWHM (const casacore::Double fwhm); 142 142 143 static Double sigmaToFWHM (constDouble sigma);143 static casacore::Double sigmaToFWHM (const casacore::Double sigma); 144 144 // </group> 145 145 146 void set(const Vector<Double>& v);146 void set(const casacore::Vector<casacore::Double>& v); 147 147 148 148 private: … … 150 150 // but the second param of the corresponding Gaussian1D function is the 151 151 // FWHM :( 152 void _set(const Vector<Double>& v);152 void _set(const casacore::Vector<casacore::Double>& v); 153 153 154 154 }; -
trunk/external-alma/components/SpectralComponents/Spectral2Estimate.tcc
r2980 r3106 18 18 //# 19 19 //# Correspondence concerning AIPS++ should be addressed as follows: 20 //# Internet email: aips2-request@nrao.edu.20 //# casacore::Internet email: aips2-request@nrao.edu. 21 21 //# Postal address: AIPS++ Project Office 22 22 //# National Radio Astronomy Observatory … … 40 40 //# Member templates 41 41 template <class MT> 42 const SpectralList &SpectralEstimate::estimate(const Vector<MT> &prof,43 Vector<MT> *der) {42 const SpectralList &SpectralEstimate::estimate(const casacore::Vector<MT> &prof, 43 casacore::Vector<MT> *der) { 44 44 if (prof.nelements() != lprof_p) { 45 45 delete [] deriv_p; deriv_p = 0; lprof_p = 0; 46 46 lprof_p = prof.nelements(); 47 deriv_p = new Double[lprof_p];47 deriv_p = new casacore::Double[lprof_p]; 48 48 }; 49 49 // Check if signal in window 50 50 if (!window(prof)) return slist_p; 51 51 // 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)); 53 53 windowLow_p = max(windowLow_p-q_p , 0 ); 54 54 // Get the second derivatives … … 56 56 // Next for debugging 57 57 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]; 59 59 }; 60 60 // Find the estimates (sorted) … … 65 65 66 66 template <class MT> 67 const SpectralList& SpectralEstimate::estimate(const Vector<MT>& x,68 const Vector<MT>& y)67 const SpectralList& SpectralEstimate::estimate(const casacore::Vector<MT>& x, 68 const casacore::Vector<MT>& y) 69 69 { 70 70 if (x.nelements() != y.nelements()) { … … 77 77 estimate(y); 78 78 // Convert 79 for ( uInt i=0; i<slist_p.nelements(); i++) {79 for (casacore::uInt i=0; i<slist_p.nelements(); i++) { 80 80 if (slist_p[i]->getType() != SpectralElement::GAUSSIAN) { 81 81 throw AipsError("Non-gaussian spectral types cannot be estimated"); … … 90 90 91 91 template <class MT> 92 uInt SpectralEstimate::window(constVector<MT> &prof) {92 casacore::uInt SpectralEstimate::window(const casacore::Vector<MT> &prof) { 93 93 windowLow_p =0; 94 94 windowEnd_p = 0; 95 95 if (!useWindow_p || rms_p <= 0.0 || lprof_p == 0) { 96 96 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)); 99 99 } else windowEnd_p = lprof_p; 100 100 return windowEnd_p-windowLow_p; 101 101 }; 102 102 // 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++) { 107 107 if (prof(i)>pmax) { 108 108 pmax = prof(i); … … 114 114 if (pmax < cutoff_p) return 0; 115 115 // 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; 120 120 do { 121 121 width++; 122 122 cold = cnew; 123 123 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)); 126 126 // 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++) { 130 130 s += prof(i); 131 131 c += i*prof(i); … … 142 142 143 143 template <class MT> 144 void SpectralEstimate::findc2(const Vector<MT> &prof) {145 for ( Int i=windowLow_p; i<windowEnd_p; i++) {144 void SpectralEstimate::findc2(const casacore::Vector<MT> &prof) { 145 for (casacore::Int i=windowLow_p; i<windowEnd_p; i++) { 146 146 // 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)) { 152 152 // add to moments 153 153 m0 += prof(k); … … 161 161 162 162 template <class MT> 163 void SpectralEstimate::findga(const Vector<MT> &prof) {164 Int i(windowLow_p-1);163 void SpectralEstimate::findga(const casacore::Vector<MT> &prof) { 164 casacore::Int i(windowLow_p-1); 165 165 // 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); 168 168 // Peak counter 169 Int nmax = 0;169 casacore::Int nmax = 0; 170 170 GaussianSpectralElement tspel; 171 171 while (++i < windowEnd_p) { … … 187 187 case 2: { 188 188 // 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); 193 193 ichi = i; 194 194 // 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++) { 198 198 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; 200 200 m0 += wi; 201 201 m1 += wi*ic; … … 203 203 }; 204 204 // determinant 205 Double det = m2*m0 - m1*m1;205 casacore::Double det = m2*m0 - m1*m1; 206 206 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); 209 209 // Width above critical? 210 210 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); 214 214 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); 218 218 // modified by dmehringer 2012apr03 to deal with 0 denominator 219 219 // 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)); 221 221 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)); 223 223 if (denom == 0) { 224 224 throw AipsError("Bailing because division by zero is undefined"); … … 252 252 253 253 template <class MT> 254 GaussianSpectralElement SpectralEstimate::convertElement (const Vector<MT>& x,254 GaussianSpectralElement SpectralEstimate::convertElement (const casacore::Vector<MT>& x, 255 255 const GaussianSpectralElement& el) const 256 256 { 257 257 GaussianSpectralElement elOut = el; 258 const Int& idxMax = x.nelements()-1;258 const casacore::Int& idxMax = x.nelements()-1; 259 259 260 260 // Get current (pars are amp, center, width as the SpectralElement 261 261 // will always be a Gaussian) 262 262 263 Vector<Double> par, err;263 casacore::Vector<casacore::Double> par, err; 264 264 el.get(par); 265 265 el.getError(err); … … 267 267 // Center 268 268 269 Int cenIdx =Int(par[1]);269 casacore::Int cenIdx = casacore::Int(par[1]); 270 270 271 271 // Get the x-increment, local to the center, as best we can from … … 273 273 // vector is monotonic 274 274 275 Double incX;275 casacore::Double incX; 276 276 if (cenIdx-1<0) { 277 277 incX = x[1] - x[0]; … … 287 287 par[1] = incX*(par[1]-idxMax) + x[idxMax]; // Extrapolate from x[idxMax] 288 288 } else { 289 Double dIdx = par[1] - cenIdx;290 par[1] = x[cenIdx] + dIdx*incX; // Interpolate289 casacore::Double dIdx = par[1] - cenIdx; 290 par[1] = x[cenIdx] + dIdx*incX; // casacore::Interpolate 291 291 } 292 292 err[1] = abs(err[1] * incX); -
trunk/external-alma/components/SpectralComponents/SpectralElement.cc
r3029 r3106 42 42 #include <casa/iostream.h> 43 43 44 using namespace casacore; 44 45 namespace casa { //# NAMESPACE CASA - BEGIN 45 46 -
trunk/external-alma/components/SpectralComponents/SpectralElement.h
r3029 r3106 34 34 #include <casa/Arrays/Vector.h> 35 35 #include <casa/Containers/RecordInterface.h> 36 37 using namespace casacore; 36 38 37 39 namespace casa { //# NAMESPACE CASA - BEGIN … … 105 107 106 108 // Evaluate the value of the element at x 107 virtual Double operator()(constDouble 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; 110 112 111 113 // Get parameter n … … 113 115 // <li> AipsError if illegal n 114 116 // </thrown> 115 virtual Double operator[](const uInt n) const;116 117 // Get all the types available as String and codes, and number available118 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, 119 121 const SpectralElement::Types *&typ); 120 122 // 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) String123 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); 125 127 126 128 // Get type of this element … … 128 130 129 131 // 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; 133 135 134 136 // 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; 137 139 138 140 // Get the order (i.e. the number of parameters) … … 140 142 141 143 // Set the error fields 142 virtual void setError(const Vector<Double> &err);144 virtual void setError(const casacore::Vector<casacore::Double> &err); 143 145 144 146 // Set fixed parameters (True) or unset them (False) … … 148 150 149 151 // Fix/unfix all in one go 150 virtual void fix(const Vector<Bool>& fix);152 virtual void fix(const casacore::Vector<casacore::Bool>& fix); 151 153 152 154 // Get the fix state[s] 153 const Vector<Bool> &fixed() const;155 const casacore::Vector<casacore::Bool> &fixed() const; 154 156 155 157 // Save to a record. 156 virtual Bool toRecord(RecordInterface& out) const;158 virtual casacore::Bool toRecord(RecordInterface& out) const; 157 159 158 160 // set parameters 159 virtual void set(const Vector<Double>& params);161 virtual void set(const casacore::Vector<casacore::Double>& params); 160 162 161 163 protected: … … 163 165 SpectralElement() {} 164 166 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)); 166 168 167 169 SpectralElement(const SpectralElement& other); … … 169 171 SpectralElement &operator=(const SpectralElement& other); 170 172 171 void _set(const Vector<Double>& params);173 void _set(const casacore::Vector<casacore::Double>& params); 172 174 173 175 void _setType(const Types type); 174 176 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 { 178 180 return _function; 179 181 } … … 186 188 // The parameters of the function. I.e. the polynomial coefficients; 187 189 // amplitude, center and sigma of a Gaussian. 188 Vector<Double> _params;190 casacore::Vector<casacore::Double> _params; 189 191 // The errors of the parameters 190 Vector<Double> _errors;192 casacore::Vector<casacore::Double> _errors; 191 193 // The indication if the parameter has to be fixed (True) or solved (False). 192 194 // 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; 196 198 197 199 }; … … 199 201 ostream &operator<<(ostream& os, const SpectralElement& elem); 200 202 201 Bool near(const SpectralElement& s1, const SpectralElement& s2, constDouble tol);202 203 Bool nearAbs(const SpectralElement& s1, const SpectralElement& s2, constDouble tol);203 casacore::Bool near(const SpectralElement& s1, const SpectralElement& s2, const casacore::Double tol); 204 205 casacore::Bool nearAbs(const SpectralElement& s1, const SpectralElement& s2, const casacore::Double tol); 204 206 205 207 -
trunk/external-alma/components/SpectralComponents/SpectralEstimate.h
r2980 r3106 18 18 //# 19 19 //# Correspondence concerning AIPS++ should be addressed as follows: 20 //# Internet email: aips2-request@nrao.edu.20 //# casacore::Internet email: aips2-request@nrao.edu. 21 21 //# Postal address: AIPS++ Project Office 22 22 //# National Radio Astronomy Observatory … … 34 34 #include <components/SpectralComponents/SpectralList.h> 35 35 36 namespace casacore { 37 template <class T> class Vector; 38 } 39 36 40 namespace casa { //# NAMESPACE CASA - BEGIN 37 41 38 42 //# Forward Declarations 39 43 class GaussianSpectralElement; 40 template <class T> class Vector;41 44 42 45 // <summary> … … 97 100 //# Constants 98 101 // Default maximum number of components to be found 99 static const uInt MAXPAR = 200;102 static const casacore::uInt MAXPAR = 200; 100 103 //# Enumerations 101 104 //# Friends … … 106 109 // of components that will be found. A value of zero will indicate 107 110 // an unlimited number. 108 explicit SpectralEstimate(const uInt maxpar=MAXPAR);111 explicit SpectralEstimate(const casacore::uInt maxpar=MAXPAR); 109 112 // Create an estimator with the given maximum number of possible 110 113 // elements. A value of zero will indicate an unlimited number. … … 112 115 // found, and a minimum width. Cutoff and minsigma default to 0.0, maximum 113 116 // size of list produced to 200. 114 explicit SpectralEstimate(const Double rms,115 const Double cutoff=0.0, constDouble 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); 117 120 // Copy constructor (deep copy) 118 121 SpectralEstimate(const SpectralEstimate &other); … … 138 141 // <group> 139 142 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); 145 148 // </group> 146 149 … … 151 154 // <group> 152 155 // 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); 154 157 // 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); 156 159 // 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); 158 161 // Set the number of points consider at each side of test point (i.e. a 159 162 // 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); 161 164 // Set a region [lo,hi] over which to estimate. Lo and hi are given as 162 165 // zero-based vector indices. 163 void setRegion(const Int lo, constInt hi);166 void setRegion(const casacore::Int lo, const casacore::Int hi); 164 167 // Do you want to look in an automatically determined window with signal? 165 168 // Default is False, meaning the full (possibly regioned) profile. 166 169 void setWindowing(const Bool win=False); 167 170 // 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); 169 172 // </group> 170 173 … … 174 177 Bool useWindow_p; 175 178 // rms estimate in profile 176 Double rms_p;179 casacore::Double rms_p; 177 180 // Source cutoff amplitude 178 Double cutoff_p;181 casacore::Double cutoff_p; 179 182 // Window low and end value 180 183 // <group> 181 Int windowLow_p;182 Int windowEnd_p;184 casacore::Int windowLow_p; 185 casacore::Int windowEnd_p; 183 186 // </group> 184 187 // Region low and high value 185 188 // <group> 186 Int regionLow_p;187 Int regionEnd_p;189 casacore::Int regionLow_p; 190 casacore::Int regionEnd_p; 188 191 // </group> 189 192 // Smoothing parameter. I.e. 2q+1 points are taken 190 Int q_p;191 // Internal cashing of calculated values based on q192 // <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; 195 198 // </group> 196 199 // The minimum Gaussian width 197 Double sigmin_p;200 casacore::Double sigmin_p; 198 201 // The second derivatives 199 Double *deriv_p;202 casacore::Double *deriv_p; 200 203 // The list of components 201 204 SpectralList slist_p; 202 205 // The length of the current profile being estimated 203 uInt lprof_p;206 casacore::uInt lprof_p; 204 207 205 208 //# Member functions 206 209 // Get the window or the total spectrum 207 210 template <class MT> 208 uInt window(constVector<MT> &prof);211 casacore::uInt window(const casacore::Vector<MT> &prof); 209 212 // Get the second derivatives 210 213 template <class MT> 211 void findc2(const Vector<MT> &prof);214 void findc2(const casacore::Vector<MT> &prof); 212 215 // Find the Gaussians 213 216 template <class MT> 214 void findga(const Vector<MT> &prof);217 void findga(const casacore::Vector<MT> &prof); 215 218 // Convert the parameters of the components in the list from 216 219 // 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, 218 221 const GaussianSpectralElement& el) const; 219 222 }; -
trunk/external-alma/components/SpectralComponents/SpectralList.h
r2980 r3106 18 18 //# 19 19 //# Correspondence concerning AIPS++ should be addressed as follows: 20 //# Internet email: aips2-request@nrao.edu.20 //# casacore::Internet email: aips2-request@nrao.edu. 21 21 //# Postal address: AIPS++ Project Office 22 22 //# National Radio Astronomy Observatory … … 34 34 #include <casa/Containers/Block.h> 35 35 36 namespace casacore { 37 38 class RecordInterface; 39 class String; 40 template <class T> class Vector; 41 } 42 36 43 namespace casa { //# NAMESPACE CASA - BEGIN 37 44 38 45 //# Forward Declarations 39 46 class SpectralElement; 40 class RecordInterface;41 class String;42 template <class T> class Vector;43 47 44 48 // <summary> … … 86 90 SpectralList(); 87 91 // Construct a list with a maximum length of n (0: unlimited length) 88 explicit SpectralList( uInt nmax);92 explicit SpectralList(casacore::uInt nmax); 89 93 // Construct with an initial element 90 94 explicit SpectralList(const SpectralElement &in); … … 100 104 SpectralList &operator=(const SpectralList &other); 101 105 // Evaluate the value of the sum of the elements at x 102 Double operator()(constDouble x) const;106 casacore::Double operator()(const casacore::Double x) const; 103 107 // Get element n 104 108 // <thrown> … … 106 110 // </thrown> 107 111 // <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); 110 114 // </group> 111 115 112 116 //# Member functions 113 117 // Get the number of elements in list 114 uInt nelements() const { return list_p.nelements(); };118 casacore::uInt nelements() const { return list_p.nelements(); }; 115 119 116 120 // Get the profile values for all elements in list. The evaluation … … 138 142 // Add elements to list (False if list has max length and full) 139 143 // <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); 142 146 // </group> 143 147 // Insert in sort order in the list … … 148 152 // Set an element in the list. Return False if more than one place beyond 149 153 // end of list; or if beyond max size. 150 Bool set(const SpectralElement &in, constuInt which);154 casacore::Bool set(const SpectralElement &in, const casacore::uInt which); 151 155 152 156 // Clear the list … … 154 158 155 159 // Set a maximum size of the list 156 void set(const uInt nmax);160 void set(const casacore::uInt nmax); 157 161 158 162 // Sort the list on the first parameter (i.e. peak value for Gaussian) … … 161 165 // Convert to and from a Record (see details in SpectralElement) 162 166 // <group> 163 Bool fromRecord (String& errMsg, constRecordInterface& 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; 165 169 //</group> 166 170 … … 168 172 //#Data 169 173 // Max length allowed of list 170 uInt nmax_p;174 casacore::uInt nmax_p; 171 175 // List of elements 172 PtrBlock<SpectralElement *> list_p;176 casacore::PtrBlock<SpectralElement *> list_p; 173 177 174 178 //# Member functions 175 179 // Compare two elements 176 Int compar(const SpectralElement &p1, const SpectralElement &p2) const;180 casacore::Int compar(const SpectralElement &p1, const SpectralElement &p2) const; 177 181 178 182 }; -
trunk/external-alma/oldasdm2ASAP/OldASDMFiller.cc
r2407 r3106 74 74 //logsink_->postLocally( LogMessage("sFreqFrame = "+sFreqFrame,LogOrigin(className_,funcName,WHERE)) ) ; 75 75 76 Vector<casa ::Double> antpos = table_->getHeader().antennaposition ;76 Vector<casacore::Double> antpos = table_->getHeader().antennaposition ; 77 77 78 78 // data selection … … 172 172 173 173 // fill MOLECULE_ID and add MOLECULES row if necessary 174 Vector<casa ::Double> restFreqs( rf.size() ) ;174 Vector<casacore::Double> restFreqs( rf.size() ) ; 175 175 for ( uInt i = 0 ; i < rf.size() ; i++ ) 176 restFreqs[i] = (casa ::Double)(rf[i]) ;176 restFreqs[i] = (casacore::Double)(rf[i]) ; 177 177 setMolecule( restFreqs ) ; 178 178 179 179 // 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()) ; 182 182 183 183 // fill TIME and INTERVAL … … 185 185 186 186 // 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 ) ; 194 194 195 195 // fill FLAGROW … … 208 208 windspeed, 209 209 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 ) ; 215 215 216 216 // fill AZIMUTH, ELEVATION, DIRECTION and SCANRATE … … 223 223 el, 224 224 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 ) ; 227 227 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]) ; 230 230 } 231 231 setScanRate( scanRate ) ; 232 232 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]) ; 235 235 } 236 236 else { … … 238 238 } 239 239 //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 ) ; 241 241 242 242 // REFPIX, REFVAL, INCREMENT … … 247 247 else { 248 248 reader_->getFrequency( refpix, refval, incr, freqref ) ; 249 refval = (double)toLSRK( casa ::Double(refval),249 refval = (double)toLSRK( casacore::Double(refval), 250 250 String(freqref), 251 251 mjd, … … 258 258 259 259 // 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 ) ; 261 261 262 262 // loop on polarization … … 280 280 // OPACITY 281 281 vector<float> tau = reader_->getOpacity() ; 282 Vector<casa ::Float> opacity = toVector( tau, numPol ) ;282 Vector<casacore::Float> opacity = toVector( tau, numPol ) ; 283 283 284 284 // SPECTRA, FLAGTRA, TSYS, TCAL … … 287 287 vector< vector<float> > tc ; 288 288 reader_->getTcalAndTsys( tc, ts ) ; 289 Matrix<casa ::Float> spectra = toMatrix( sp, numPol, numChan ) ;289 Matrix<casacore::Float> spectra = toMatrix( sp, numPol, numChan ) ; 290 290 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 ) ; 293 293 // String caltime = "" ; 294 // if ( anyNE( tcal, (casa ::Float)1.0 ) )294 // if ( anyNE( tcal, (casacore::Float)1.0 ) ) 295 295 // caltime = toTcalTime( mjd ) ; 296 296 String caltime = toTcalTime( mjd ) ; … … 374 374 string ref ; 375 375 reader_->getSourceDirection( sdir, ref ) ; 376 Vector<casa ::Double> sourceDir( sdir ) ;376 Vector<casacore::Double> sourceDir( sdir ) ; 377 377 hdr.reffreq = toLSRK( hdr.reffreq, hdr.freqref, hdr.utc, hdr.antennaposition, sdir, String(ref) ) ; 378 378 hdr.freqref = "LSRK" ; … … 410 410 } 411 411 412 Matrix<casa ::Float> OldASDMFiller::toMatrix( float *sp,412 Matrix<casacore::Float> OldASDMFiller::toMatrix( float *sp, 413 413 unsigned int npol, 414 414 unsigned int nchan ) 415 415 { 416 Matrix<casa ::Float> mSp( npol, nchan ) ;416 Matrix<casacore::Float> mSp( npol, nchan ) ; 417 417 if ( npol <= 2 ) { 418 418 // 1 or 2 polarization case 419 419 for ( unsigned int ich = 0 ; ich < nchan ; ich++ ) { 420 420 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]) ; 422 422 } 423 423 } … … 426 426 // 4 polarization case 427 427 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) 432 432 } 433 433 } … … 435 435 } 436 436 437 Matrix<casa ::Float> OldASDMFiller::toMatrix( vector< vector<float> > &tsys,437 Matrix<casacore::Float> OldASDMFiller::toMatrix( vector< vector<float> > &tsys, 438 438 unsigned int npol, 439 439 unsigned int nchan ) … … 441 441 unsigned int numRec = tsys.size() ; 442 442 unsigned int numChan = tsys[0].size() ; 443 Matrix<casa ::Float> ret ;443 Matrix<casacore::Float> ret ; 444 444 if ( npol == numRec && nchan == numChan ) { 445 445 ret.resize( npol, nchan ) ; 446 446 for ( unsigned int ip = 0 ; ip < npol ; ip++ ) 447 447 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]) ; 449 449 } 450 450 else if ( npol == numRec && numChan == 1 ) { 451 451 ret.resize( npol, 1 ) ; 452 452 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]) ; 454 454 } 455 455 else if ( numRec == 1 && nchan == numChan ) { … … 457 457 for ( unsigned int ip = 0 ; ip < npol ; ip++ ) 458 458 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]) ; 460 460 } 461 461 else if ( numRec == 1 && numChan == 1 ) { 462 462 ret.resize( npol, 1 ) ; 463 463 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]) ; 465 465 } 466 466 else if ( numRec == 2 && npol == 4 && numChan == nchan ) { … … 469 469 ret.resize( npol, nchan ) ; 470 470 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]) ; 474 474 ret( 2, ic ) = tsysxy ; 475 475 ret( 3, ic ) = tsysxy ; … … 480 480 // at the moment Tsys[XY] = 0.5*(Tsys[X]+Tsys[Y]) 481 481 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]) ; 485 485 ret( 2, 0 ) = tsysxy ; 486 486 ret( 3, 0 ) = tsysxy ; … … 490 490 for ( unsigned int ip = 0 ; ip < npol ; ip++ ) 491 491 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]) ; 493 493 } 494 494 return ret ; 495 495 } 496 496 497 Vector<casa ::Float> OldASDMFiller::toVector( vector<float> &tau,497 Vector<casacore::Float> OldASDMFiller::toVector( vector<float> &tau, 498 498 unsigned int npol ) 499 499 { 500 500 String funcName = "toVector" ; 501 501 502 Vector<casa ::Float> ret( npol ) ;502 Vector<casacore::Float> ret( npol ) ; 503 503 //logsink_->postLocally( LogMessage("tau0="+String::toString(tau[0]),LogOrigin(className_,funcName,WHERE)) ) ; 504 504 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] ; 507 507 ret[2] = 0.5 * ( ret[0] + ret[1] ) ; 508 508 ret[3] = ret[2] ; … … 510 510 else if ( npol == tau.size() ) { 511 511 for ( unsigned int ipol = 0 ; ipol < npol ; ipol++ ) 512 ret[ipol] = (casa ::Float)tau[ipol] ;512 ret[ipol] = (casacore::Float)tau[ipol] ; 513 513 } 514 514 else { 515 515 // I don't know how to handle... 516 516 for ( unsigned int ipol = 0 ; ipol < npol ; ipol++ ) 517 ret[ipol] = (casa ::Float)tau[0] ;517 ret[ipol] = (casacore::Float)tau[0] ; 518 518 } 519 519 //logsink_->postLocally( LogMessage("tau="+String::toString(ret),LogOrigin(className_,funcName,WHERE)) ) ; … … 521 521 } 522 522 523 String OldASDMFiller::toTcalTime( casa ::Double mjd )523 String OldASDMFiller::toTcalTime( casacore::Double mjd ) 524 524 { 525 525 return MVTime( mjd ).string( MVTime::YMD ) ; 526 526 } 527 527 528 void OldASDMFiller::toJ2000( Vector<casa ::Double> &dir,528 void OldASDMFiller::toJ2000( Vector<casacore::Double> &dir, 529 529 double az, 530 530 double el, 531 casa ::Double mjd,532 Vector<casa ::Double> antpos )531 casacore::Double mjd, 532 Vector<casacore::Double> antpos ) 533 533 { 534 534 String funcName = "toJ2000" ; 535 535 536 Vector<casa ::Double> azel( 2 ) ;536 Vector<casacore::Double> azel( 2 ) ; 537 537 azel[0] = az ; 538 538 azel[1] = el ; … … 553 553 } 554 554 555 Vector<casa ::Double> OldASDMFiller::toJ2000( Vector<casa::Double> dir,555 Vector<casacore::Double> OldASDMFiller::toJ2000( Vector<casacore::Double> dir, 556 556 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 ) ; 561 561 if ( dirref != "J2000" ) { 562 562 MEpoch me( Quantity( mjd, "d" ), MEpoch::UTC ) ; … … 593 593 } 594 594 595 casa ::Double OldASDMFiller::toLSRK( casa::Double freq,595 casacore::Double OldASDMFiller::toLSRK( casacore::Double freq, 596 596 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, 600 600 String dirref ) 601 601 { … … 603 603 604 604 //logsink_->postLocally( LogMessage("freqref = "+freqref,LogOrigin(className_,funcName,WHERE)) ) ; 605 casa ::Double newf = freq ;605 casacore::Double newf = freq ; 606 606 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 ) ; 609 609 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") ) ; 611 611 MPosition mp( antposQ, MPosition::ITRF ) ; 612 612 MDirection::Types dirtype ; … … 614 614 if ( !b ) 615 615 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") ), 618 618 dirtype ) ; 619 619 MeasFrame mf( me, mp, md ) ; … … 624 624 MFrequency::Convert tolsr( freqtype, 625 625 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() ; 627 627 //logsink_->postLocally( LogMessage("freq = "+String::toString(freq)+", newf = "+String::toString(newf),LogOrigin(className_,funcName,WHERE)) ) ; 628 628 } -
trunk/external-alma/oldasdm2ASAP/OldASDMFiller.h
r2273 r3106 13 13 public: 14 14 // constructor and destructor 15 OldASDMFiller( casa ::CountedPtr<asap::Scantable> stable ) ;15 OldASDMFiller( casacore::CountedPtr<asap::Scantable> stable ) ; 16 16 ~OldASDMFiller() ; 17 17 18 18 // open data 19 bool open( const std::string &filename, const casa ::Record &rec ) ;19 bool open( const std::string &filename, const casacore::Record &rec ) ; 20 20 21 21 // fill data … … 26 26 27 27 // get reader object 28 casa ::CountedPtr<OldASDMReader> getReader() { return reader_ ; } ;28 casacore::CountedPtr<OldASDMReader> getReader() { return reader_ ; } ; 29 29 30 30 // set logger 31 void setLogger( casa ::CountedPtr<casa::LogSinkInterface> &logsink ) ;31 void setLogger( casacore::CountedPtr<casacore::LogSinkInterface> &logsink ) ; 32 32 33 33 private: … … 36 36 37 37 // get IF key 38 casa ::String getIFKey( casa::uInt ifno ) ;38 casacore::String getIFKey( casacore::uInt ifno ) ; 39 39 40 40 // get FREQUENCIES attributes from ifrec_ 41 void getFrequencyRec( casa ::String key,41 void getFrequencyRec( casacore::String key, 42 42 double &refpix, 43 43 double &refval, … … 45 45 46 46 // set FREQUENCIES attributes to ifrec_ 47 void setFrequencyRec( casa ::String key,47 void setFrequencyRec( casacore::String key, 48 48 double refpix, 49 49 double refval, … … 51 51 52 52 // reshape float array spectra to Matrix<Float> 53 casa ::Matrix<casa::Float> toMatrix( float *sp,53 casacore::Matrix<casacore::Float> toMatrix( float *sp, 54 54 unsigned int npol, 55 55 unsigned int nchan ) ; 56 56 57 57 // 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, 59 59 unsigned int npol, 60 60 unsigned int nchan ) ; 61 61 62 62 // 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, 64 64 unsigned int npol ) ; 65 65 66 66 // create TCAL time string from MJD 67 casa ::String toTcalTime( casa::Double mjd ) ;67 casacore::String toTcalTime( casacore::Double mjd ) ; 68 68 69 69 // AZEL to J2000 70 void toJ2000( casa ::Vector<casa::Double> &dir,70 void toJ2000( casacore::Vector<casacore::Double> &dir, 71 71 double az, 72 72 double el, 73 casa ::Double mjd,74 casa ::Vector<casa::Double> antpos ) ;73 casacore::Double mjd, 74 casacore::Vector<casacore::Double> antpos ) ; 75 75 76 76 // 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 ) ; 81 81 82 82 // get frequency frame enum value from string 83 casa ::MFrequency::Types toFrameType( std::string &s ) ;83 casacore::MFrequency::Types toFrameType( std::string &s ) ; 84 84 85 85 // to LSRK 86 86 // utc must be UTC time in "d" (day) 87 87 // 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 ) ; 94 94 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_ ; 98 98 99 casa ::Record ifrec_ ;99 casacore::Record ifrec_ ; 100 100 101 casa ::CountedPtr<casa::LogSinkInterface> logsink_ ;101 casacore::CountedPtr<casacore::LogSinkInterface> logsink_ ; 102 102 103 casa ::String className_ ;103 casacore::String className_ ; 104 104 105 105 } ; -
trunk/external-alma/oldasdm2ASAP/OldASDMReader.cc
r2355 r3106 56 56 } 57 57 58 bool OldASDMReader::open( const string &filename, const casa ::Record &rec )59 { 60 casa ::String funcName = "open" ;58 bool OldASDMReader::open( const string &filename, const casacore::Record &rec ) 59 { 60 casacore::String funcName = "open" ; 61 61 62 62 // return value … … 71 71 // parsing ASDM options 72 72 if ( rec.isDefined( "asdm" ) ) { 73 casa ::Record asdmrec = rec.asRecord( "asdm" ) ;73 casacore::Record asdmrec = rec.asRecord( "asdm" ) ; 74 74 75 75 // antenna 76 76 if ( asdmrec.isDefined( "antenna" ) ) { 77 if ( asdmrec.type( asdmrec.fieldNumber( "antenna" ) ) == casa ::TpInt ) {77 if ( asdmrec.type( asdmrec.fieldNumber( "antenna" ) ) == casacore::TpInt ) { 78 78 antennaId_ = asdmrec.asInt( "antenna" ) ; 79 79 } … … 182 182 vector<AntennaRow *> rows = atab.get() ; 183 183 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_ ) { 186 186 idx = rows[irow]->getAntennaId().getTagValue() ; 187 187 break ; … … 190 190 if ( idx == -1 ) { 191 191 close() ; 192 throw (casa ::AipsError( antennaName_ + " not found." )) ;192 throw (casacore::AipsError( antennaName_ + " not found." )) ; 193 193 } 194 194 else { … … 203 203 if ( antennaRow == 0 ) { 204 204 close() ; 205 throw (casa ::AipsError( "AntennaId " + casa::String::toString(antennaId_) + " is invalid." ) ) ;205 throw (casacore::AipsError( "AntennaId " + casacore::String::toString(antennaId_) + " is invalid." ) ) ; 206 206 } 207 207 } … … 210 210 // set antenna name 211 211 if ( antennaName_.size() == 0 ) { 212 antennaName_ = casa ::String( antennaRow->getName() ) ;212 antennaName_ = casacore::String( antennaRow->getName() ) ; 213 213 } 214 214 … … 217 217 218 218 // station name 219 stationName_ = casa ::String( stationRow->getName() ) ;219 stationName_ = casacore::String( stationRow->getName() ) ; 220 220 221 221 // antenna position 222 222 antennaPosition_.resize( 3 ) ; 223 223 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" ) ) ; 226 226 227 227 // create SDMBinData object … … 229 229 230 230 // get Main rows 231 //mainRow_ = casa ::Vector<MainRow *>(asdm_->getMain().get()) ;231 //mainRow_ = casacore::Vector<MainRow *>(asdm_->getMain().get()) ; 232 232 233 233 // set up IFNO … … 262 262 } 263 263 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" ;264 void 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" ; 283 283 284 284 ExecBlockTable &ebtab = asdm_->getExecBlock() ; 285 285 // at the moment take first row of ExecBlock table 286 286 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() ) ; 289 289 290 290 // antennaname … … 295 295 // antennaposition 296 296 antennaposition.resize( 3 ) ; 297 for ( casa ::uInt i = 0 ; i < 3 ; i++ )297 for ( casacore::uInt i = 0 ; i < 3 ; i++ ) 298 298 antennaposition[i] = antennaPosition_[i].getValue( Unit("m") ) ; 299 299 … … 307 307 // utc 308 308 // start time of the project 309 utc = casa ::Double( ebrow->getStartTime().getMJD() ) ;309 utc = casacore::Double( ebrow->getStartTime().getMJD() ) ; 310 310 311 311 … … 326 326 refidx = irow ; 327 327 } 328 nchan = casa ::Int( *max_element( nchans.begin(), nchans.end() ) ) ;328 nchan = casacore::Int( *max_element( nchans.begin(), nchans.end() ) ) ; 329 329 330 330 //logsink_->postLocally( LogMessage("refidx = "+String::toString(refidx),LogOrigin(className_,funcName,WHERE)) ) ; … … 337 337 } 338 338 } 339 bandwidth = casa ::Double( *max_element( bws.begin(), bws.end() ) ) ;339 bandwidth = casacore::Double( *max_element( bws.begin(), bws.end() ) ) ; 340 340 341 341 // reffreq 342 reffreq = casa ::Double( spwrows[refidx]->getRefFreq().get() ) ;342 reffreq = casacore::Double( spwrows[refidx]->getRefFreq().get() ) ; 343 343 344 344 // freqref … … 382 382 383 383 // npol 384 npol = casa ::Int( *max_element( npols.begin(), npols.end() ) ) ;384 npol = casacore::Int( *max_element( npols.begin(), npols.end() ) ) ; 385 385 386 386 // poltype … … 421 421 422 422 // nbeam 423 nbeam = casa ::Int( *max_element( nbeams.begin(), nbeams.end() ) ) ;423 nbeam = casacore::Int( *max_element( nbeams.begin(), nbeams.end() ) ) ; 424 424 425 425 // fluxunit … … 441 441 obstype = "" ; 442 442 for ( unsigned int imode = 0 ; imode < obsmode.size() ; imode++ ) { 443 obstype += casa ::String(obsmode[imode]) ;443 obstype += casacore::String(obsmode[imode]) ; 444 444 if ( imode != obsmode.size()-1 ) 445 445 obstype += "#" ; … … 449 449 void OldASDMReader::selectConfigDescription() 450 450 { 451 casa ::String funcName = "selectConfigDescription" ;451 casacore::String funcName = "selectConfigDescription" ; 452 452 453 453 vector<ConfigDescriptionRow *> cdrows = asdm_->getConfigDescription().get() ; … … 462 462 configDescIdList_.resize( cdidTags.size() ) ; 463 463 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() ) ; 465 465 } 466 466 } … … 472 472 Tag atag( antennaId_, TagType::Antenna ) ; 473 473 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 ) ) 476 476 continue ; 477 477 if ( frows[irow]->getAntennaId() == atag ) { … … 483 483 } 484 484 485 casa ::Vector<casa::uInt> OldASDMReader::getFieldIdList()486 { 487 casa ::String funcName = "getFieldIdList" ;485 casacore::Vector<casacore::uInt> OldASDMReader::getFieldIdList() 486 { 487 casacore::String funcName = "getFieldIdList" ; 488 488 489 489 vector<FieldRow *> frows = asdm_->getField().get() ; … … 497 497 } 498 498 499 casa ::uInt OldASDMReader::getNumMainRow()500 { 501 casa ::uInt nrow = casa::uInt( mainRow_.size() ) ;499 casacore::uInt OldASDMReader::getNumMainRow() 500 { 501 casacore::uInt nrow = casacore::uInt( mainRow_.size() ) ; 502 502 503 503 return nrow ; … … 530 530 } 531 531 532 casa ::Bool OldASDMReader::setMainRow( casa::uInt irow )533 { 534 casa ::Bool status = true ;532 casacore::Bool OldASDMReader::setMainRow( casacore::uInt irow ) 533 { 534 casacore::Bool status = true ; 535 535 row_ = irow ; 536 536 execBlockTag_ = mainRow_[row_]->getExecBlockId() ; … … 540 540 status = false ; 541 541 else { 542 status = (casa ::Bool)(sdmBin_->acceptMainRow( mainRow_[row_] )) ;542 status = (casacore::Bool)(sdmBin_->acceptMainRow( mainRow_[row_] )) ; 543 543 } 544 544 return status ; 545 545 } 546 546 547 casa ::Bool OldASDMReader::setMainRow( casa::uInt configDescId, casa::uInt fieldId )547 casacore::Bool OldASDMReader::setMainRow( casacore::uInt configDescId, casacore::uInt fieldId ) 548 548 { 549 549 clearMainRow() ; … … 551 551 Tag configDescTag( (unsigned int)configDescId, TagType::ConfigDescription ) ; 552 552 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 ) ) ) ; 554 554 555 555 return true ; … … 563 563 void OldASDMReader::setupIFNO() 564 564 { 565 casa ::String funcName = "setupIFNO" ;565 casacore::String funcName = "setupIFNO" ; 566 566 567 567 vector<SpectralWindowRow *> spwrows = asdm_->getSpectralWindow().get() ; 568 568 unsigned int nrow = spwrows.size() ; 569 569 ifno_.clear() ; 570 casa ::uInt idx = 0 ;571 casa ::uInt wvridx = 0 ;570 casacore::uInt idx = 0 ; 571 casacore::uInt wvridx = 0 ; 572 572 for ( unsigned int irow = 0 ; irow < nrow ; irow++ ) { 573 casa ::uInt index ;573 casacore::uInt index ; 574 574 if ( isWVR( spwrows[irow] ) ) { 575 575 //logsink_->postLocally( LogMessage(spwrows[irow]->getSpectralWindowId().toString()+" is WVR",LogOrigin(className_,funcName,WHERE)) ) ; … … 579 579 index = ++idx ; 580 580 } 581 ifno_.insert( pair<Tag,casa ::uInt>(spwrows[irow]->getSpectralWindowId(),index) ) ;581 ifno_.insert( pair<Tag,casacore::uInt>(spwrows[irow]->getSpectralWindowId(),index) ) ; 582 582 //logsink_->postLocally( LogMessage(spwrows[irow]->getSpectralWindowId().toString()+": IFNO="+String::toString(index),LogOrigin(className_,funcName,WHERE)) ) ; 583 583 } … … 594 594 } 595 595 596 casa ::Bool OldASDMReader::setData()597 { 598 casa ::String funcName = "setData" ;596 casacore::Bool OldASDMReader::setData() 597 { 598 casacore::String funcName = "setData" ; 599 599 600 600 //logsink_->postLocally( LogMessage("try to retrieve binary data",LogOrigin(className_,funcName,WHERE)) ) ; … … 671 671 } 672 672 673 casa ::uInt OldASDMReader::getIFNo( unsigned int idx )673 casacore::uInt OldASDMReader::getIFNo( unsigned int idx ) 674 674 { 675 675 prepareData( idx ) ; … … 677 677 } 678 678 679 casa ::uInt OldASDMReader::getIFNo()680 { 681 map<Tag,casa ::uInt>::iterator iter = ifno_.find( specWinTag_ ) ;679 casacore::uInt OldASDMReader::getIFNo() 680 { 681 map<Tag,casacore::uInt>::iterator iter = ifno_.find( specWinTag_ ) ; 682 682 if ( iter != ifno_.end() ) 683 683 return iter->second ; … … 713 713 string &freqref ) 714 714 { 715 casa ::String funcName = "getFrequency" ;715 casacore::String funcName = "getFrequency" ; 716 716 717 717 int nchan = specWinRow_p->getNumChan() ; … … 730 730 } 731 731 else { 732 throw (casa ::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;732 throw (casacore::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ; 733 733 } 734 734 } … … 745 745 } 746 746 else { 747 throw (casa ::AipsError( "Either chanWidthArray or chanWidth must exist." )) ;747 throw (casacore::AipsError( "Either chanWidthArray or chanWidth must exist." )) ; 748 748 } 749 749 if ( specWinRow_p->isChanFreqStepExists() ) { … … 757 757 } 758 758 else { 759 throw (casa ::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ;759 throw (casacore::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ; 760 760 } 761 761 if ( specWinRow_p->isChanFreqStartExists() ) { … … 766 766 } 767 767 else { 768 throw (casa ::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;768 throw (casacore::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ; 769 769 } 770 770 } … … 781 781 } 782 782 else { 783 throw (casa ::AipsError( "Either chanWidthArray or chanWidth must exist." )) ;783 throw (casacore::AipsError( "Either chanWidthArray or chanWidth must exist." )) ; 784 784 } 785 785 if ( specWinRow_p->isChanFreqStepExists() ) { … … 793 793 } 794 794 else { 795 throw (casa ::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ;795 throw (casacore::AipsError( "Either chanFreqArray or chanFreqStep must exist." )) ; 796 796 } 797 797 if ( specWinRow_p->isChanFreqStartExists() ) { … … 803 803 } 804 804 else { 805 throw (casa ::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ;805 throw (casacore::AipsError( "Either chanFreqArray or chanFreqStart must exist." )) ; 806 806 } 807 807 } … … 1237 1237 for ( unsigned int irow = 0 ; irow < nrow ; irow++ ) { 1238 1238 CalAtmosphereRow *atmrow = atmrows[irow] ; 1239 if ( casa ::String(atmrow->getAntennaName()) != antennaName_1239 if ( casacore::String(atmrow->getAntennaName()) != antennaName_ 1240 1240 //|| atmrow->getReceiverBand() != rb 1241 1241 //|| atmrow->getBasebandName() != bbname … … 1279 1279 float &windaz ) 1280 1280 { 1281 casa ::String funcName = "getWeatherInfo" ;1281 casacore::String funcName = "getWeatherInfo" ; 1282 1282 1283 1283 temperature = 0.0 ; … … 1668 1668 double &el, 1669 1669 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 ) 1672 1672 { 1673 1673 String funcName = "toJ2000" ; … … 1681 1681 1682 1682 vector<double> OldASDMReader::toJ2000( vector<double> &dir, 1683 casa ::String &dirref,1683 casacore::String &dirref, 1684 1684 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" ; 1689 1689 1690 1690 vector<double> newd( dir ) ; 1691 1691 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 ) ; 1695 1695 //ostringstream oss ; 1696 1696 //mp.print( oss ) ; 1697 1697 //logsink_->postLocally( LogMessage(oss.str(),LogOrigin(className_,funcName,WHERE)) ) ; 1698 1698 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 ) ; 1702 1702 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() ; 1706 1706 //logsink_->postLocally( LogMessage("cdir = "+String::toString(cdir),LogOrigin(className_,funcName,WHERE)) ) ; 1707 1707 newd[0] = (double)(cdir[0]) ; … … 1719 1719 string OldASDMReader::getFrame() 1720 1720 { 1721 casa ::String funcName = "getFrame" ;1721 casacore::String funcName = "getFrame" ; 1722 1722 1723 1723 // default is TOPO … … 1748 1748 int OldASDMReader::getNumIFs() 1749 1749 { 1750 casa ::String funcName = "getNumIFs" ;1750 casacore::String funcName = "getNumIFs" ; 1751 1751 1752 1752 int nif = 0 ; -
trunk/external-alma/oldasdm2ASAP/OldASDMReader.h
r2301 r3106 31 31 * @return boolean status (true or false) 32 32 **/ 33 bool open( const std::string &filename, const casa ::Record &rec ) ;33 bool open( const std::string &filename, const casacore::Record &rec ) ; 34 34 35 35 /** … … 46 46 * get antenna id 47 47 **/ 48 casa ::Int getAntennaId() { return antennaId_ ; } ;48 casacore::Int getAntennaId() { return antennaId_ ; } ; 49 49 50 50 /** 51 51 * get antenna name 52 52 **/ 53 casa ::String getAntennaName() { return antennaName_ ; } ;53 casacore::String getAntennaName() { return antennaName_ ; } ; 54 54 55 55 /** … … 74 74 * @param poltype polarization type 75 75 **/ 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 ) ; 93 93 94 94 /** … … 100 100 * @return list of valid configDescriptionId 101 101 **/ 102 casa ::Vector<casa::uInt> getConfigDescriptionIdList() { return configDescIdList_ ; } ;102 casacore::Vector<casacore::uInt> getConfigDescriptionIdList() { return configDescIdList_ ; } ; 103 103 104 104 /** 105 105 * get list of fieldId 106 106 * 107 * @return list of fieldId as casa ::uInt108 **/ 109 casa ::Vector<casa::uInt> getFieldIdList() ;107 * @return list of fieldId as casacore::uInt 108 **/ 109 casacore::Vector<casacore::uInt> getFieldIdList() ; 110 110 111 111 /** … … 114 114 * @return number of rows in Main table 115 115 **/ 116 casa ::uInt getNumMainRow() ;116 casacore::uInt getNumMainRow() ; 117 117 118 118 /** … … 128 128 * @param fieldId 129 129 **/ 130 casa ::Bool setMainRow( casa::uInt configDescId, casa::uInt fieldId ) ;130 casacore::Bool setMainRow( casacore::uInt configDescId, casacore::uInt fieldId ) ; 131 131 132 132 /** … … 136 136 * @return boolean indicating the row is valid or not 137 137 **/ 138 casa ::Bool setMainRow( casa::uInt irow ) ;138 casacore::Bool setMainRow( casacore::uInt irow ) ; 139 139 140 140 /** … … 174 174 * @return IF number 175 175 **/ 176 casa ::uInt getIFNo( unsigned int idx ) ;177 casa ::uInt getIFNo() ;176 casacore::uInt getIFNo( unsigned int idx ) ; 177 casacore::uInt getIFNo() ; 178 178 179 179 /** … … 380 380 * @return boolean status 381 381 **/ 382 casa ::Bool setData() ;382 casacore::Bool setData() ; 383 383 384 384 /** … … 401 401 * @param logger (LogSinkInterface) 402 402 **/ 403 void setLogger( casa ::CountedPtr<casa::LogSinkInterface> &logsink ) ;403 void setLogger( casacore::CountedPtr<casacore::LogSinkInterface> &logsink ) ; 404 404 405 405 … … 490 490 double &el, 491 491 double &mjd, 492 casa ::Vector<casa::Quantity> &antpos ) ;492 casacore::Vector<casacore::Quantity> &antpos ) ; 493 493 494 494 /** … … 502 502 **/ 503 503 std::vector<double> toJ2000( std::vector<double> &dir, 504 casa ::String &dirref,504 casacore::String &dirref, 505 505 double &mjd, 506 casa ::Vector<casa::Quantity> &antpos ) ;506 casacore::Vector<casacore::Quantity> &antpos ) ; 507 507 /** 508 508 * get nIF … … 569 569 const sdmbin::VMSData *vmsData_ ; 570 570 571 casa ::Int antennaId_ ; // antenna id572 casa ::String antennaName_ ; // antenna name573 casa ::String stationName_ ; // station name574 casa ::Vector<casa::Quantity> antennaPosition_ ; // antenna position575 casa ::Vector<casa::uInt> configDescIdList_ ; // list of valid configDescriptionId576 casa ::Vector<casa::uInt> feedIdList_ ; // list of valid feedId577 casa ::Vector<casa::uInt> fieldIdList_ ; // list of fieldId578 casa ::Int row_ ; // current row index579 map<asdm::Tag,casa ::uInt> ifno_ ; // list of IFNO for each SpectralWindow rows571 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 580 580 unsigned int numData_ ; // number of valid data in vmsData_ where v_antennaId equals antennaId_ 581 581 vector<unsigned int> dataIdList_ ; // list of valid data indexes in vmsData_ … … 587 587 EnumSet<TimeSamplingMod::TimeSampling> timeSampling_ ; // time sampling 588 588 EnumSet<SpectralResolutionTypeMod::SpectralResolutionType> resolutionType_ ; // spectral resolution type 589 casa ::CountedPtr<casa::LogSinkInterface> logsink_ ; // Logger590 casa ::String className_ ;589 casacore::CountedPtr<casacore::LogSinkInterface> logsink_ ; // Logger 590 casacore::String className_ ; 591 591 unsigned int dataIndex_ ; 592 592 593 593 // Tables/Rows for ASDM 594 casa ::Vector<asdm::MainRow *> mainRow_ ; // list of pointers to all Main rows594 casacore::Vector<asdm::MainRow *> mainRow_ ; // list of pointers to all Main rows 595 595 //asdm::AntennaRow *antennaRow_p ; // pointer to target Antenna row 596 596 //asdm::StationRow *stationRow_p ; // pointer to target Station row that target antenna is located -
trunk/src/Accelerator.h
r3084 r3106 19 19 namespace asap { 20 20 21 using namespace casa ;21 using namespace casacore; 22 22 23 23 class TableExprPredicate { -
trunk/src/AsapLogSink.cpp
r3070 r3106 16 16 #include "AsapLogSink.h" 17 17 18 using namespace casa ;18 using namespace casacore; 19 19 20 20 namespace asap { -
trunk/src/AsapLogSink.h
r1859 r3106 18 18 namespace asap { 19 19 /** 20 * This class provides the a casa ::LogSink implementation for asap20 * This class provides the a casacore::LogSink implementation for asap 21 21 * It should be used to catch all casa logMessage and replace the globalSink. 22 22 * It provides an overloaded postLocally which accepts strings so it can also … … 27 27 * @version 28 28 */ 29 class AsapLogSink : public casa ::MemoryLogSink {29 class AsapLogSink : public casacore::MemoryLogSink { 30 30 public: 31 31 /** -
trunk/src/BufferedLinearInterpolator1D.tcc
r2756 r3106 47 47 { 48 48 //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."); 50 50 if (this->n_ == 1) 51 51 return this->y_[0]; -
trunk/src/CalibrationHelper.h
r3072 r3106 11 11 #include "STSelector.h" 12 12 13 using namespace casa ;13 using namespace casacore; 14 14 using namespace asap; 15 15 -
trunk/src/CalibrationManager.cpp
r3085 r3106 30 30 31 31 32 using namespace casa ;32 using namespace casacore; 33 33 using namespace std; 34 34 -
trunk/src/CalibrationManager.h
r3085 r3106 53 53 void setFrequencyInterpolation(const std::string &interp, int order=-1); 54 54 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); 56 56 void setTsysTransfer(unsigned int from, 57 57 const std::vector<unsigned int> &to); 58 void setCalibrationOptions(const casa ::Record &options) {options_ = options;}58 void setCalibrationOptions(const casacore::Record &options) {options_ = options;} 59 59 void resetCalSetup(); 60 60 void reset(); … … 67 67 STCalEnum::InterpolationType stringToInterpolationEnum(const std::string &s); 68 68 69 casa ::Bool isAlmaAntenna();69 casacore::Bool isAlmaAntenna(); 70 70 71 casa ::CountedPtr<STApplyCal> applicator_;71 casacore::CountedPtr<STApplyCal> applicator_; 72 72 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_; 75 75 76 casa ::CountedPtr<Scantable> target_;76 casacore::CountedPtr<Scantable> target_; 77 77 78 casa ::String calmode_;78 casacore::String calmode_; 79 79 std::vector<int> spwlist_; 80 casa ::Record spwlist_withrange_;80 casacore::Record spwlist_withrange_; 81 81 bool do_average_; 82 82 83 casa ::LogIO os_;83 casacore::LogIO os_; 84 84 85 casa ::Record options_;85 casacore::Record options_; 86 86 }; 87 87 -
trunk/src/CalibrationManagerWrapper.h
r3046 r3106 78 78 calibrationManagerImpl_.setTsysSpw(spwlist); 79 79 } 80 void setTsysSpwWithRange(const casa ::Record &spwlist, bool average=false)80 void setTsysSpwWithRange(const casacore::Record &spwlist, bool average=false) 81 81 { 82 82 calibrationManagerImpl_.setTsysSpwWithRange(spwlist, average); … … 87 87 calibrationManagerImpl_.setTsysTransfer(from, to); 88 88 } 89 void setCalibrationOptions(const casa ::Record &options)89 void setCalibrationOptions(const casacore::Record &options) 90 90 { 91 91 calibrationManagerImpl_.setCalibrationOptions(options); -
trunk/src/Calibrator.cpp
r2756 r3106 18 18 #include "Calibrator.h" 19 19 20 using namespace casa ;20 using namespace casacore; 21 21 22 22 namespace asap { -
trunk/src/Calibrator.h
r2720 r3106 33 33 virtual ~Calibrator(); 34 34 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); 39 39 40 const casa ::Vector<casa::Float> getCalibrated();40 const casacore::Vector<casacore::Float> getCalibrated(); 41 41 42 42 virtual void calibrate() = 0; … … 45 45 void initStorage(); 46 46 void freeStorage(); 47 void set(casa ::Float *p, casa::Vector<casa::Float> &v);47 void set(casacore::Float *p, casacore::Vector<casacore::Float> &v); 48 48 49 49 unsigned int nchan_; 50 50 unsigned int nchanS_; 51 51 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_; 57 57 }; 58 58 -
trunk/src/CubicSplineInterpolator1D.tcc
r2850 r3106 62 62 { 63 63 //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."); 65 65 if (this->n_ == 1) 66 66 return this->y_[0]; -
trunk/src/EdgeDetector.cpp
r2983 r3106 15 15 16 16 using namespace std ; 17 using namespace casa ;17 using namespace casacore ; 18 18 19 19 namespace asap { -
trunk/src/EdgeDetector.h
r2613 r3106 26 26 virtual ~EdgeDetector() ; 27 27 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 ; 32 32 33 33 protected: 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 ) ; 36 36 void initDetect() ; 37 37 38 38 // 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_ ; 41 41 42 42 // output data: list of indexes for OFF positions 43 casa ::Vector<casa::uInt> off_ ;43 casacore::Vector<casacore::uInt> off_ ; 44 44 45 45 // temporary memory storage 46 casa ::Block<casa::uInt> tempuInt_ ;47 casa ::IPosition tempIP_ ;46 casacore::Block<casacore::uInt> tempuInt_ ; 47 casacore::IPosition tempIP_ ; 48 48 49 49 // logging 50 casa ::LogIO os_ ;50 casacore::LogIO os_ ; 51 51 52 52 private: 53 void resizeTempArea( const casa ::uInt &n ) ;53 void resizeTempArea( const casacore::uInt &n ) ; 54 54 } ; 55 55 -
trunk/src/EdgeMarker.cpp
r2916 r3106 25 25 26 26 using namespace std ; 27 using namespace casa 27 using namespace casacore; 28 28 29 29 namespace asap { -
trunk/src/EdgeMarker.h
r2757 r3106 34 34 virtual ~EdgeMarker() ; 35 35 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 ) ; 38 38 void examine() ; 39 void setoption( const casa ::Record &option ) ;39 void setoption( const casacore::Record &option ) ; 40 40 void detect() ; 41 41 void mark() ; 42 casa ::Block<casa::uInt> getDetectedRows() ;43 casa ::CountedPtr<Scantable> get() ;42 casacore::Block<casacore::uInt> getDetectedRows() ; 43 casacore::CountedPtr<Scantable> get() ; 44 44 // void reset() ; 45 45 … … 48 48 49 49 // data 50 casa ::CountedPtr<Scantable> st_ ;50 casacore::CountedPtr<Scantable> st_ ; 51 51 52 52 // pointer to detector object 53 casa ::CountedPtr<EdgeDetector> detector_ ;53 casacore::CountedPtr<EdgeDetector> detector_ ; 54 54 55 55 // list of IFNO for WVR 56 casa ::Vector<casa::uInt> wvr_ ;56 casacore::Vector<casacore::uInt> wvr_ ; 57 57 58 58 // off position list 59 casa ::Block<casa::uInt> off_ ;60 casa ::uInt noff_ ;59 casacore::Block<casacore::uInt> off_ ; 60 casacore::uInt noff_ ; 61 61 62 62 // logger 63 casa ::LogIO os_ ;63 casacore::LogIO os_ ; 64 64 } ; 65 65 -
trunk/src/EdgeMarkerWrapper.h
r2613 r3106 37 37 const bool &insitu ) 38 38 { 39 EdgeMarker::setdata( s.getCP(), (casa ::Bool)insitu ) ;39 EdgeMarker::setdata( s.getCP(), (casacore::Bool)insitu ) ; 40 40 } 41 41 42 42 ScantableWrapper get() 43 43 { 44 casa ::CountedPtr<Scantable> s = EdgeMarker::get() ;44 casacore::CountedPtr<Scantable> s = EdgeMarker::get() ; 45 45 return ScantableWrapper( s ) ; 46 46 } -
trunk/src/FillerBase.cpp
r3084 r3106 16 16 #include "FillerBase.h" 17 17 18 using namespace casa ;18 using namespace casacore; 19 19 20 20 namespace asap { 21 21 22 FillerBase::FillerBase(casa ::CountedPtr<Scantable> stable) :22 FillerBase::FillerBase(casacore::CountedPtr<Scantable> stable) : 23 23 table_(stable) 24 24 { … … 281 281 TableRow row( tab ) ; 282 282 TableRecord &rec = row.record() ; 283 RecordFieldPtr<casa ::uInt> rfpi ;283 RecordFieldPtr<casacore::uInt> rfpi ; 284 284 rfpi.attachToRecord( rec, "ID" ) ; 285 285 *rfpi = (uInt)nrow ; 286 RecordFieldPtr<casa ::Float> rfp ;286 RecordFieldPtr<casacore::Float> rfp ; 287 287 rfp.attachToRecord( rec, "TEMPERATURE" ) ; 288 288 *rfp = temperature ; -
trunk/src/FillerBase.h
r2289 r3106 41 41 { 42 42 public: 43 explicit FillerBase(casa ::CountedPtr<Scantable> stable);43 explicit FillerBase(casacore::CountedPtr<Scantable> stable); 44 44 virtual ~FillerBase() {;} 45 45 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; 47 47 // virtual bool open(const std::string& filename) = 0; 48 48 virtual void fill() = 0; … … 56 56 void commitRow(); 57 57 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); 71 71 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, 92 92 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); 96 96 97 casa ::CountedPtr< Scantable > table_;97 casacore::CountedPtr< Scantable > table_; 98 98 99 99 private: … … 102 102 FillerBase(const FillerBase&); 103 103 FillerBase& operator=(const FillerBase&); 104 casa ::String referenceRx_;105 casa ::TableRow row_;104 casacore::String referenceRx_; 105 casacore::TableRow row_; 106 106 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_ ; 113 113 }; 114 114 -
trunk/src/FillerWrapper.h
r2998 r3106 39 39 40 40 41 void open(const std::string& filename, const casa ::Record& rec) {41 void open(const std::string& filename, const casacore::Record& rec) { 42 42 // void open(const std::string& filename) { 43 casa ::File file(filename);43 casacore::File file(filename); 44 44 if ( !file.exists() ) { 45 45 throw(AipsError("File does not exist")); … … 62 62 filler_ = 0; 63 63 attached_ = false; 64 throw casa ::AipsError("Unknown Data Format");64 throw casacore::AipsError("Unknown Data Format"); 65 65 } 66 66 void close() { … … 88 88 int pks = 0 ; 89 89 int nro = 1 ; 90 casa ::File file( filename ) ;90 casacore::File file( filename ) ; 91 91 if ( file.isDirectory() ) 92 92 ret = pks ; … … 103 103 // So, one can distinguish NRO and non-NRO data by examining 104 104 // first keyword name. 105 if ( casa ::String( buf ) == "SIMPLE" ) {105 if ( casacore::String( buf ) == "SIMPLE" ) { 106 106 ret = pks ; 107 107 } … … 117 117 FillerWrapper& operator=(const FillerWrapper&); 118 118 119 casa ::CountedPtr<FillerBase> filler_;119 casacore::CountedPtr<FillerBase> filler_; 120 120 bool attached_; 121 casa ::CountedPtr<Scantable> stable_;121 casacore::CountedPtr<Scantable> stable_; 122 122 }; 123 123 -
trunk/src/GenericEdgeDetector.cpp
r3041 r3106 25 25 26 26 using namespace std ; 27 using namespace casa ;27 using namespace casacore ; 28 28 29 29 namespace asap { -
trunk/src/GenericEdgeDetector.h
r2639 r3106 26 26 virtual ~GenericEdgeDetector() ; 27 27 28 casa ::Vector<casa::uInt> detect() ;28 casacore::Vector<casacore::uInt> detect() ; 29 29 30 30 private: 31 31 // parse options 32 void parseOption( const casa ::Record &option ) ;32 void parseOption( const casacore::Record &option ) ; 33 33 34 34 // steps for edge detection algorithm … … 43 43 // internal methods 44 44 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 ) ; 54 54 55 55 // 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_ ; 64 64 65 65 // 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_ ; 68 68 69 69 // 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_ ; 73 73 } ; 74 74 -
trunk/src/Interpolator1D.tcc
r2756 r3106 20 20 #include "BisectionLocator.h" 21 21 #include "HuntLocator.h" 22 23 using namespace casa;24 22 25 23 namespace asap { … … 54 52 { 55 53 //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."); 57 55 x_ = x; 58 56 n_ = n; … … 65 63 { 66 64 //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."); 68 66 y_ = y; 69 67 n_ = n; -
trunk/src/LineCatalog.cpp
r3084 r3106 28 28 #include "LineCatalog.h" 29 29 30 using namespace casa ;30 using namespace casacore; 31 31 32 32 namespace asap -
trunk/src/LineCatalog.h
r1534 r3106 107 107 * @param lmax the upper limit 108 108 * @param colname the columd to apply the limits to 109 * @return a new casa ::Table109 * @return a new casacore::Table 110 110 */ 111 casa ::Table setLimits(double lmin, double lmax, const std::string& colname);111 casacore::Table setLimits(double lmin, double lmax, const std::string& colname); 112 112 113 113 double getDouble(const std::string& colname, uint row) const; 114 114 115 115 // the table with seelection 116 casa ::Table table_;116 casacore::Table table_; 117 117 // the pristine table 118 casa ::Table baseTable_;118 casacore::Table baseTable_; 119 119 }; 120 120 -
trunk/src/MSFiller.cpp
r3100 r3106 56 56 #include "MathUtils.h" 57 57 58 using namespace casa 58 using namespace casacore; 59 59 using namespace std ; 60 60 … … 1582 1582 }; 1583 1583 1584 MSFiller::MSFiller( casa ::CountedPtr<Scantable> stable )1584 MSFiller::MSFiller( casacore::CountedPtr<Scantable> stable ) 1585 1585 : table_( stable ), 1586 1586 tablename_( "" ), … … 1609 1609 } 1610 1610 1611 bool MSFiller::open( const std::string &filename, const casa ::Record &rec )1611 bool MSFiller::open( const std::string &filename, const casacore::Record &rec ) 1612 1612 { 1613 1613 os_.origin( LogOrigin( "MSFiller", "open()", WHERE ) ) ; -
trunk/src/MSFiller.h
r2754 r3106 45 45 #include "MathUtils.h" 46 46 47 using namespace casa ;47 using namespace casacore; 48 48 49 49 namespace asap -
trunk/src/MSFillerWrapper.h
r3071 r3106 39 39 virtual ~MSFillerWrapper() { close() ; } 40 40 41 void open(const std::string& filename, const casa ::Record& rec)41 void open(const std::string& filename, const casacore::Record& rec) 42 42 { 43 casa ::File file( filename ) ;43 casacore::File file( filename ) ; 44 44 if ( !file.exists() ) { 45 throw casa ::AipsError( "File does not exist" ) ;45 throw casacore::AipsError( "File does not exist" ) ; 46 46 } 47 47 filler_ = new MSFiller( stable_ ) ; … … 51 51 } 52 52 else { 53 throw casa ::AipsError( "Failed to open file" ) ;53 throw casacore::AipsError( "Failed to open file" ) ; 54 54 } 55 55 } … … 82 82 MSFillerWrapper& operator=(const MSFillerWrapper&) ; 83 83 84 casa ::CountedPtr<MSFiller> filler_ ;84 casacore::CountedPtr<MSFiller> filler_ ; 85 85 bool attached_ ; 86 casa ::CountedPtr<Scantable> stable_ ;86 casacore::CountedPtr<Scantable> stable_ ; 87 87 }; 88 88 -
trunk/src/MSWriter.cpp
r3089 r3106 44 44 #include "TableTraverse.h" 45 45 46 using namespace casa 46 using namespace casacore; 47 47 using namespace std ; 48 48 -
trunk/src/MSWriter.h
r2309 r3106 62 62 { 63 63 public: 64 explicit MSWriter(casa ::CountedPtr<Scantable> stable) ;64 explicit MSWriter(casacore::CountedPtr<Scantable> stable) ; 65 65 virtual ~MSWriter() ; 66 66 67 virtual bool write(const std::string& filename, const casa ::Record& rec) ;67 virtual bool write(const std::string& filename, const casacore::Record& rec) ; 68 68 69 69 protected: … … 87 87 88 88 // 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 ) ; 92 92 93 casa ::CountedPtr<Scantable> table_ ;93 casacore::CountedPtr<Scantable> table_ ; 94 94 STHeader header_ ; 95 casa ::MeasurementSet *mstable_ ;95 casacore::MeasurementSet *mstable_ ; 96 96 97 casa ::Bool isWeather_ ;97 casacore::Bool isWeather_ ; 98 98 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_ ; 103 103 104 casa ::String ptTabName_ ;104 casacore::String ptTabName_ ; 105 105 106 casa ::String polType_ ;106 casacore::String polType_ ; 107 107 108 casa ::String filename_ ;108 casacore::String filename_ ; 109 109 110 casa ::LogIO os_ ;110 casacore::LogIO os_ ; 111 111 112 casa ::Record srcRec_ ;112 casacore::Record srcRec_ ; 113 113 114 114 MSWriter(); -
trunk/src/MSWriterWrapper.h
r3046 r3106 38 38 virtual ~MSWriterWrapper() {} 39 39 40 void write(const std::string& filename, const casa ::Record& rec)40 void write(const std::string& filename, const casacore::Record& rec) 41 41 { 42 42 GILHandler scopedRelease; 43 43 44 casa ::File file( filename ) ;44 casacore::File file( filename ) ; 45 45 writer_ = new MSWriter( stable_ ) ; 46 46 if ( writer_->write( filename, rec ) ) { … … 48 48 } 49 49 else { 50 throw casa ::AipsError( "Failed to write data" ) ;50 throw casacore::AipsError( "Failed to write data" ) ; 51 51 } 52 52 } … … 58 58 MSWriterWrapper& operator=(const MSWriterWrapper&) ; 59 59 60 casa ::CountedPtr<MSWriter> writer_ ;61 casa ::CountedPtr<Scantable> stable_ ;60 casacore::CountedPtr<MSWriter> writer_ ; 61 casacore::CountedPtr<Scantable> stable_ ; 62 62 }; 63 63 -
trunk/src/MathUtils.cpp
r2670 r3106 49 49 #include "MathUtils.h" 50 50 51 using namespace casa ;51 using namespace casacore; 52 52 53 53 float mathutil::statistics(const String& which, … … 251 251 } 252 252 253 void mathutil::doZeroOrderInterpolation(casa ::Vector<casa::Float>& data,253 void mathutil::doZeroOrderInterpolation(casacore::Vector<casacore::Float>& data, 254 254 std::vector<bool>& mask) { 255 255 int fstart = -1; -
trunk/src/MathUtils.h
r2619 r3106 51 51 * @param ignoreOther drop every second channel (NYI) 52 52 */ 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);53 void 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); 59 59 60 60 /** … … 68 68 * @param hwidth half-width of the smoothing window 69 69 */ 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,70 void 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, 74 74 float hwidth); 75 75 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,76 void 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, 80 80 float hwidth, int order); 81 81 82 82 // Generate specified statistic 83 float statistics(const casa ::String& which,84 const casa ::MaskedArray<casa::Float>& data);83 float statistics(const casacore::String& which, 84 const casacore::MaskedArray<casacore::Float>& data); 85 85 86 86 // Return a position of min or max value 87 casa ::IPosition minMaxPos(const casa::String& which,88 const casa ::MaskedArray<casa::Float>& data);87 casacore::IPosition minMaxPos(const casacore::String& which, 88 const casacore::MaskedArray<casacore::Float>& data); 89 89 90 90 // Replace masked value by zero 91 void replaceMaskByZero(casa ::Vector<casa::Float>& data,92 const casa ::Vector<casa::Bool>& mask);91 void replaceMaskByZero(casacore::Vector<casacore::Float>& data, 92 const casacore::Vector<casacore::Bool>& mask); 93 93 94 94 /** … … 97 97 * @return a std vector of std strings 98 98 */ 99 std::vector<std::string> tovectorstring(const casa ::Vector<casa::String>& in);99 std::vector<std::string> tovectorstring(const casacore::Vector<casacore::String>& in); 100 100 101 101 /** … … 104 104 * @return 105 105 */ 106 casa ::Vector<casa::String> toVectorString(const std::vector<std::string>& in);106 casacore::Vector<casacore::String> toVectorString(const std::vector<std::string>& in); 107 107 108 void doZeroOrderInterpolation(casa ::Vector<casa::Float>& data,108 void doZeroOrderInterpolation(casacore::Vector<casacore::Float>& data, 109 109 std::vector<bool>& mask); 110 110 … … 112 112 * RA nomalization: n*2pi rotation if necessary 113 113 **/ 114 void rotateRA( const casa ::Vector<casa::Double> &in,115 casa ::Vector<casa::Double> &out ) ;116 void rotateRA( casa ::Vector<casa::Double> &v ) ;114 void rotateRA( const casacore::Vector<casacore::Double> &in, 115 casacore::Vector<casacore::Double> &out ) ; 116 void rotateRA( casacore::Vector<casacore::Double> &v ) ; 117 117 118 118 /** -
trunk/src/NROFiller.cpp
r2776 r3106 25 25 #include <casa/Logging/LogIO.h> 26 26 27 using namespace casa ;27 using namespace casacore; 28 28 29 29 namespace asap -
trunk/src/NROFiller.h
r1904 r3106 42 42 { 43 43 public: 44 explicit NROFiller(casa ::CountedPtr<Scantable> stable);44 explicit NROFiller(casacore::CountedPtr<Scantable> stable); 45 45 virtual ~NROFiller(); 46 46 47 bool open(const std::string& filename, const casa ::Record& rec) ;47 bool open(const std::string& filename, const casacore::Record& rec) ; 48 48 void fill() ; 49 49 void close() ; … … 58 58 // pointer to the reader 59 59 //NROReader *reader_ ; 60 casa ::CountedPtr<NROReader> reader_ ;60 casacore::CountedPtr<NROReader> reader_ ; 61 61 }; 62 62 -
trunk/src/NearestInterpolator1D.tcc
r2756 r3106 17 17 #include "NearestInterpolator1D.h" 18 18 19 using namespace casa;20 21 19 namespace asap { 22 20 … … 33 31 { 34 32 //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."); 36 34 if (this->n_ == 1) 37 35 return this->y_[0]; -
trunk/src/PKSFiller.cpp
r3075 r3106 44 44 #include "STHeader.h" 45 45 46 using namespace casa ;46 using namespace casacore; 47 47 48 48 namespace asap { -
trunk/src/PKSFiller.h
r2163 r3106 32 32 { 33 33 public: 34 explicit PKSFiller(casa ::CountedPtr<Scantable> stable);34 explicit PKSFiller(casacore::CountedPtr<Scantable> stable); 35 35 virtual ~PKSFiller(); 36 36 37 bool open(const std::string& filename, const casa ::Record& rec);37 bool open(const std::string& filename, const casacore::Record& rec); 38 38 // bool open(const std::string& filename); 39 39 void fill(); … … 47 47 PKSFiller& operator=(const PKSFiller&); 48 48 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_; 53 53 }; 54 54 -
trunk/src/PSAlmaCalibrator.cpp
r2756 r3106 17 17 #include "PSAlmaCalibrator.h" 18 18 19 using namespace casa ;19 using namespace casacore; 20 20 21 21 namespace asap { -
trunk/src/PlotHelper.cpp
r3085 r3106 32 32 33 33 using namespace std ; 34 using namespace casa ;34 using namespace casacore ; 35 35 using namespace asap ; 36 36 -
trunk/src/PlotHelper.h
r3085 r3106 78 78 private: 79 79 /** 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); 82 82 83 83 /** 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); 89 89 90 casa ::DirectionCoordinate *dircoord_p;91 casa ::CountedPtr<Scantable> data_p;90 casacore::DirectionCoordinate *dircoord_p; 91 casacore::CountedPtr<Scantable> data_p; 92 92 93 93 }; -
trunk/src/PolynomialInterpolator1D.tcc
r2756 r3106 35 35 { 36 36 //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."); 38 38 if (this->n_ == 1) 39 39 return this->y_[0]; … … 97 97 delete[] c; 98 98 delete[] d; 99 throw casa ::AipsError("x_ has duplicate elements");99 throw casacore::AipsError("x_ has duplicate elements"); 100 100 } 101 101 c[i] = (xa[i] - x) * cd; -
trunk/src/RasterEdgeDetector.cpp
r2626 r3106 19 19 20 20 using namespace std ; 21 using namespace casa ;21 using namespace casacore ; 22 22 23 23 namespace asap { -
trunk/src/RasterEdgeDetector.h
r2613 r3106 26 26 virtual ~RasterEdgeDetector() ; 27 27 28 casa ::Vector<casa::uInt> detect() ;28 casacore::Vector<casacore::uInt> detect() ; 29 29 30 30 private: 31 31 // parse options 32 void parseOption( const casa ::Record &option ) ;32 void parseOption( const casacore::Record &option ) ; 33 33 34 34 // edge detection algorithm for raster 35 35 void detectGap() ; 36 36 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 ) ; 43 43 44 44 // gap list 45 casa ::Vector<casa::uInt> gaplist_ ;45 casacore::Vector<casacore::uInt> gaplist_ ; 46 46 47 47 // options 48 casa ::Float fraction_ ;49 casa ::Int npts_ ;48 casacore::Float fraction_ ; 49 casacore::Int npts_ ; 50 50 } ; 51 51 -
trunk/src/RowAccumulator.cpp
r3007 r3106 18 18 #include "RowAccumulator.h" 19 19 20 using namespace casa ;20 using namespace casacore; 21 21 using namespace asap; 22 22 -
trunk/src/RowAccumulator.h
r2580 r3106 46 46 * @param time the time of the observation 47 47 */ 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); 53 53 /** 54 54 * Also set a user mask which get combined with the individual masks … … 56 56 * @param m a boolean mask of teh same length as the spectrum 57 57 */ 58 void setUserMask(const casa ::Vector<casa::Bool>& m);58 void setUserMask(const casacore::Vector<casacore::Bool>& m); 59 59 /** 60 60 * Get the spectrum. Applies the normalisation (averaging) 61 61 * @return the spectrum vector 62 62 */ 63 casa ::Vector<casa::Float> getSpectrum() const;63 casacore::Vector<casacore::Float> getSpectrum() const; 64 64 /** 65 65 * Get the Tsys. Applies the normalisation (averaging) 66 66 * @return the Tsys vector 67 67 */ 68 casa ::Vector<casa::Float> getTsys() const;68 casacore::Vector<casacore::Float> getTsys() const; 69 69 /** 70 70 * Get the spectrum's mask. Applies the normalisation (averaging) 71 71 * @return the mask vector 72 72 */ 73 casa ::Vector<casa::Bool> getMask() const;73 casacore::Vector<casacore::Bool> getMask() const; 74 74 /** 75 75 * Get the total interval. 76 76 * @return the integration time 77 77 */ 78 casa ::Double getInterval() const;78 casacore::Double getInterval() const; 79 79 /** 80 80 * Get the time of the observation. Retrieves the "mean" time. 81 81 * @return the integration time 82 82 */ 83 casa ::Double getTime() const;83 casacore::Double getTime() const; 84 84 /** 85 85 * Reset the acummulator to the state at construction. 86 86 */ 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); 89 89 /** 90 90 * check the initialization state 91 91 */ 92 casa ::Bool state() const;92 casacore::Bool state() const; 93 93 /** 94 94 * replace NaN values with (normal) values at the same channels in the given spetrum. … … 98 98 99 99 private: 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); 124 124 125 125 WeightType weightType_; 126 casa ::Bool initialized_;126 casacore::Bool initialized_; 127 127 //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_; 131 131 132 132 //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_; 136 136 137 casa ::Vector<casa::Bool> userMask_;137 casacore::Vector<casacore::Bool> userMask_; 138 138 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_; 142 142 }; 143 143 -
trunk/src/STApplyCal.cpp
r3077 r3106 42 42 43 43 44 using namespace casa ;44 using namespace casacore; 45 45 using namespace std; 46 46 … … 683 683 uInt STApplyCal::getIFForTsys(uInt to) 684 684 { 685 for (map<casa ::uInt, Vector<uInt> >::iterator i = spwmap_.begin();685 for (map<casacore::uInt, Vector<uInt> >::iterator i = spwmap_.begin(); 686 686 i != spwmap_.end(); i++) { 687 687 Vector<uInt> tolist = i->second; -
trunk/src/STApplyCal.h
r2963 r3106 48 48 public: 49 49 STApplyCal(); 50 STApplyCal(casa ::CountedPtr<Scantable> target);50 STApplyCal(casacore::CountedPtr<Scantable> target); 51 51 52 52 ~STApplyCal(); 53 53 54 54 // 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); 57 57 58 58 // push new caltable … … 61 61 62 62 // 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); 66 66 67 67 // 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); 69 69 70 70 // apply tables 71 void apply(casa ::Bool insitu=false, casa::Bool filltsys=true);71 void apply(casacore::Bool insitu=false, casacore::Bool filltsys=true); 72 72 73 73 // split target data and store it to disk 74 void save(const casa ::String &name);74 void save(const casacore::String &name); 75 75 76 76 // reset all settings except target scantable … … 88 88 89 89 // 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); 94 94 95 95 // get frequency information from FREQUENCIES subtable 96 casa ::Vector<casa::Double> getBaseFrequency(casa::uInt whichrow);96 casacore::Vector<casacore::Double> getBaseFrequency(casacore::uInt whichrow); 97 97 98 98 // search spwmap_ to get IFNO for Tsys 99 casa ::uInt getIFForTsys(casa::uInt to);99 casacore::uInt getIFForTsys(casacore::uInt to); 100 100 101 101 // target data 102 casa ::CountedPtr<Scantable> target_;102 casacore::CountedPtr<Scantable> target_; 103 103 104 104 // working data 105 casa ::CountedPtr<Scantable> work_;105 casacore::CountedPtr<Scantable> work_; 106 106 107 107 // calibrator 108 casa ::CountedPtr<Calibrator> calibrator_;108 casacore::CountedPtr<Calibrator> calibrator_; 109 109 110 110 // interpolation method 111 111 STCalEnum::InterpolationType iTime_; 112 112 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_; 117 117 118 118 // IF (spw) mapping for Tsys transfer 119 map<casa ::uInt, casa::Vector<casa::uInt> > spwmap_;119 map<casacore::uInt, casacore::Vector<casacore::uInt> > spwmap_; 120 120 121 121 // list of apply tables … … 125 125 // calibration type 126 126 STCalEnum::CalType caltype_; 127 casa ::Bool doTsys_;127 casacore::Bool doTsys_; 128 128 129 129 // selector … … 131 131 132 132 // logger 133 casa ::LogIO os_;133 casacore::LogIO os_; 134 134 }; 135 135 -
trunk/src/STApplyTable.cpp
r3084 r3106 26 26 27 27 28 using namespace casa ;28 using namespace casacore; 29 29 30 30 namespace asap { 31 31 32 STApplyTable::STApplyTable( const Scantable& parent, const casa ::String& name )32 STApplyTable::STApplyTable( const Scantable& parent, const casacore::String& name ) 33 33 { 34 34 TableDesc td("", "1", TableDesc::Scratch); -
trunk/src/STApplyTable.h
r2964 r3106 36 36 public: 37 37 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); 40 40 41 41 virtual ~STApplyTable(); … … 49 49 * Name of the table 50 50 ***/ 51 virtual const casa ::String& name() const = 0;51 virtual const casacore::String& name() const = 0; 52 52 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_; } 55 55 void attach(); 56 56 void attachBaseColumns(); 57 57 virtual void attachOptionalColumns() = 0; 58 58 59 casa ::uInt nrow() {return table_.nrow();}59 casacore::uInt nrow() {return table_.nrow();} 60 60 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();} 67 67 68 68 void setSelection(STSelector &sel, bool sortByTime=false); 69 69 void unsetSelection(); 70 casa ::String caltype();70 casacore::String caltype(); 71 71 72 void save(const casa ::String &name);72 void save(const casacore::String &name); 73 73 74 virtual casa ::uInt nchan(casa::uInt ifno) = 0;74 virtual casacore::uInt nchan(casacore::uInt ifno) = 0; 75 75 76 76 // 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); 79 79 static STCalEnum::CalType getCalType(STApplyTable *tab); 80 80 81 81 protected: 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); 86 86 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_; 91 91 STSelector sel_; 92 casa ::LogIO os_;92 casacore::LogIO os_; 93 93 94 94 private: 95 static STCalEnum::CalType stringToType(const casa ::String &caltype);95 static STCalEnum::CalType stringToType(const casacore::String &caltype); 96 96 }; 97 97 -
trunk/src/STAsciiWriter.cpp
r2658 r3106 61 61 #include "STAsciiWriter.h" 62 62 63 using namespace casa ;63 using namespace casacore; 64 64 using namespace asap; 65 65 -
trunk/src/STAsciiWriter.h
r2658 r3106 39 39 40 40 41 namespace casa {41 namespace casacore { 42 42 template<class T> class Vector; 43 43 class MDirection; … … 57 57 58 58 // 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); 60 60 61 61 private: 62 casa ::String formatDirection(const casa::MDirection& md) const;62 casacore::String formatDirection(const casacore::MDirection& md) const; 63 63 template <class T> 64 void addLine(std::ostream& of, const casa ::String& lbl,64 void addLine(std::ostream& of, const casacore::String& lbl, 65 65 const T& value); 66 66 }; -
trunk/src/STAtmosphere.cpp
r1823 r3106 50 50 #include <cmath> 51 51 52 using namespace casa ;52 using namespace casacore; 53 53 using namespace asap; 54 54 … … 157 157 const double pressure = gndPressure * exp(-M*g/(QC::R.get().getValue()*itsGndTemperature)* 158 158 (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, 160 160 wvSaturationPressure(itsTemperatures[layer])); 161 161 itsDryPressures[layer] = pressure - itsVapourPressures[layer]; … … 404 404 itsVapourPressures[layer])+vapourRefractivity(freq,itsTemperatures[layer],itsDryPressures[layer], 405 405 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; 407 407 } 408 408 return tau; … … 457 457 // length increment 458 458 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; 460 460 } 461 461 return tau; -
trunk/src/STAttr.cpp
r2658 r3106 45 45 #include "STAttr.h" 46 46 47 using namespace casa ;47 using namespace casacore; 48 48 using namespace asap; 49 49 … … 123 123 const Vector<Float>& freqs) const 124 124 { 125 casa ::LogIO os( casa::LogOrigin( "STAttr", "beamEfficiency()" ) );125 casacore::LogIO os( casacore::LogOrigin( "STAttr", "beamEfficiency()" ) ); 126 126 // Look at date where appropriate 127 127 MVTime t(dateObs.getValue()); … … 134 134 if (year<2003) { 135 135 os << "There is no beam efficiency data from before 2003" 136 <<" - using 2003 data" << casa ::LogIO::POST;136 <<" - using 2003 data" << casacore::LogIO::POST; 137 137 facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2003Y_); 138 138 } 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; 140 140 facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2003Y_); 141 141 } else { 142 os << "Using beam efficiency data from 2004" << casa ::LogIO::POST;142 os << "Using beam efficiency data from 2004" << casacore::LogIO::POST; 143 143 facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2004Y_); 144 144 } … … 148 148 { 149 149 os << "No beam efficiency data for this instrument - assuming unity" 150 << casa ::LogIO::POST;150 << casacore::LogIO::POST; 151 151 } 152 152 } … … 158 158 const Vector<Float>& freqs) const 159 159 { 160 casa ::LogIO os( casa::LogOrigin( "STAttr", "apertureEfficiency()" ) );160 casacore::LogIO os( casacore::LogOrigin( "STAttr", "apertureEfficiency()" ) ); 161 161 // Look at date where appropriate 162 162 MVTime t(dateObs.getValue()); … … 169 169 if (year<2004) { 170 170 os << "There is no aperture efficiency data from before 2004" 171 << " - using 2004 data" << casa ::LogIO::POST;171 << " - using 2004 data" << casacore::LogIO::POST; 172 172 facs = interp(freqs/1.0e9f, MopEtaApX_, MopEtaAp2004Y_); 173 173 } else { 174 os << "Using aperture efficiency data from 2004" << casa ::LogIO::POST;174 os << "Using aperture efficiency data from 2004" << casacore::LogIO::POST; 175 175 facs = interp(freqs/1.0e9f, MopEtaApX_, MopEtaAp2004Y_); 176 176 } … … 185 185 { 186 186 os << "No aperture efficiency data for this instrument" 187 << " - assuming unity" << casa ::LogIO::POST;187 << " - assuming unity" << casacore::LogIO::POST; 188 188 } 189 189 } -
trunk/src/STAttr.h
r2658 r3106 40 40 #include "STDefs.h" 41 41 42 namespace casa {42 namespace casacore { 43 43 template<class T> class Vector; 44 44 } … … 63 63 64 64 // Telescope diameter(m). Throws exception if unknown. 65 casa ::Float diameter(Instrument inst) const;65 casacore::Float diameter(Instrument inst) const; 66 66 67 67 // 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; 71 71 72 72 // Aperture efficiency. Frequency in Hz. Returns 1 if unknown. 73 casa ::Vector<casa::Float>73 casacore::Vector<casacore::Float> 74 74 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; 77 77 78 78 // Find factor to convert Jy -> K for this telescope, date of 79 79 // 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) 83 83 const; 84 84 85 85 // Gain Elevation polynomial correction coefficients (elevation in 86 86 // 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; 88 88 89 89 // Find feed polarization type of feeds. In future this needs to come … … 92 92 93 93 // 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); 96 96 97 97 // Helper function. Finds factor to convert K -> Jy. Provide 98 98 // 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); 100 100 101 101 private: 102 102 103 103 // Static data 104 casa ::Vector<casa::Float> MopEtaBeamX_; // Beam efficiency105 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_; 107 107 108 casa ::Vector<casa::Float> MopEtaApX_; // Aperture efficiency109 casa ::Vector<casa::Float> MopEtaAp2004Y_;108 casacore::Vector<casacore::Float> MopEtaApX_; // Aperture efficiency 109 casacore::Vector<casacore::Float> MopEtaAp2004Y_; 110 110 111 casa ::Vector<casa::Float> TidEtaApX_; // Aperture efficiency112 casa ::Vector<casa::Float> TidEtaApY_;111 casacore::Vector<casacore::Float> TidEtaApX_; // Aperture efficiency 112 casacore::Vector<casacore::Float> TidEtaApY_; 113 113 114 casa ::Vector<casa::Float> TidGainElPoly_; // Gain-el correction poly coeffs115 casa ::Vector<casa::Float> ParkesGainElPoly_;// K-band Gain-el correction114 casacore::Vector<casacore::Float> TidGainElPoly_; // Gain-el correction poly coeffs 115 casacore::Vector<casacore::Float> ParkesGainElPoly_;// K-band Gain-el correction 116 116 //poly coeffs 117 117 … … 120 120 121 121 // 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; 125 125 126 126 -
trunk/src/STBaselineTable.cpp
r2883 r3106 27 27 28 28 29 using namespace casa ;29 using namespace casacore; 30 30 31 31 namespace asap { … … 231 231 } 232 232 233 void STBaselineTable::setresult(casa ::uInt irow,234 casa ::Vector<casa::Float> res,235 casa ::Float rms)233 void STBaselineTable::setresult(casacore::uInt irow, 234 casacore::Vector<casacore::Float> res, 235 casacore::Float rms) 236 236 { 237 237 resCol_.put(irow, res); -
trunk/src/STBaselineTable.h
r2773 r3106 34 34 STBaselineTable() {;} 35 35 STBaselineTable(const Scantable& parent); 36 STBaselineTable(const casa ::String &name);36 STBaselineTable(const casacore::String &name); 37 37 38 38 virtual ~STBaselineTable(); 39 39 40 40 void setup(); 41 const casa ::String& name() const {return name_;};41 const casacore::String& name() const {return name_;}; 42 42 43 43 void attachOptionalColumns(); 44 44 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, 49 49 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); 61 61 void appenddata(int scanno, int cycleno, 62 62 int beamno, int ifno, int polno, 63 int freqid, casa ::Double time,63 int freqid, casacore::Double time, 64 64 bool apply, 65 65 STBaselineFunc::FuncName ftype, 66 66 vector<int> fpar, 67 67 vector<float> ffpar, 68 casa ::Vector<casa::uInt> mask,68 casacore::Vector<casacore::uInt> mask, 69 69 vector<float> res, 70 70 float rms, … … 77 77 void appenddata(int scanno, int cycleno, 78 78 int beamno, int ifno, int polno, 79 int freqid, casa ::Double time,79 int freqid, casacore::Double time, 80 80 bool apply, 81 81 STBaselineFunc::FuncName ftype, 82 82 int fpar, 83 83 vector<float> ffpar, 84 casa ::Vector<casa::uInt> mask,84 casacore::Vector<casacore::uInt> mask, 85 85 vector<float> res, 86 86 float rms, … … 91 91 int lfavg, 92 92 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, 97 97 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); 109 109 void appendbasedata(int scanno, int cycleno, 110 110 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();} 117 117 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(); 120 120 STBaselineFunc::FuncName getFunctionName(int irow); 121 casa ::Matrix<casa::Int> getFuncParam() {return fparCol_.getColumn();}121 casacore::Matrix<casacore::Int> getFuncParam() {return fparCol_.getColumn();} 122 122 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();} 125 125 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();} 135 135 void setApply(int irow, bool apply); 136 136 137 137 private: 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_; 152 152 }; 153 153 -
trunk/src/STCalSkyOtfAlma.cpp
r2983 r3106 22 22 23 23 using namespace std; 24 using namespace casa ;24 using namespace casacore; 25 25 26 26 namespace asap { -
trunk/src/STCalSkyOtfAlma.h
r2823 r3106 36 36 class STCalSkyOtfAlma : public STCalSkyPSAlma { 37 37 public: 38 STCalSkyOtfAlma(casa ::CountedPtr<Scantable> &s, bool israster=false);38 STCalSkyOtfAlma(casacore::CountedPtr<Scantable> &s, bool israster=false); 39 39 40 40 virtual ~STCalSkyOtfAlma() {;} … … 47 47 bool israster_; 48 48 49 casa ::Vector<casa::uInt> rowNumbers_;49 casacore::Vector<casacore::uInt> rowNumbers_; 50 50 }; 51 51 -
trunk/src/STCalSkyPSAlma.cpp
r2955 r3106 21 21 22 22 using namespace std; 23 using namespace casa ;23 using namespace casacore; 24 24 25 25 namespace asap { -
trunk/src/STCalSkyPSAlma.h
r2955 r3106 37 37 class STCalSkyPSAlma : public STCalibration { 38 38 public: 39 STCalSkyPSAlma(casa ::CountedPtr<Scantable> &s);39 STCalSkyPSAlma(casacore::CountedPtr<Scantable> &s); 40 40 41 41 virtual ~STCalSkyPSAlma() {;} … … 43 43 protected: 44 44 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); 50 50 }; 51 51 -
trunk/src/STCalSkyTable.cpp
r2955 r3106 28 28 29 29 30 using namespace casa ;30 using namespace casacore; 31 31 32 32 namespace asap { -
trunk/src/STCalSkyTable.h
r2964 r3106 34 34 public: 35 35 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); 38 38 39 39 virtual ~STCalSkyTable(); … … 42 42 void attachOptionalColumns(); 43 43 44 const casa ::String& name() const {return name_;}44 const casacore::String& name() const {return name_;} 45 45 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); 56 56 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); 61 61 62 //casa ::Vector<casa::Double> getBaseFrequency(casa::uInt whichrow);62 //casacore::Vector<casacore::Double> getBaseFrequency(casacore::uInt whichrow); 63 63 64 64 private: 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_; 70 70 }; 71 71 -
trunk/src/STCalTsys.cpp
r3062 r3106 23 23 24 24 using namespace std; 25 using namespace casa ;25 using namespace casacore; 26 26 27 27 namespace asap { -
trunk/src/STCalTsys.h
r2955 r3106 39 39 class STCalTsys : public STCalibration { 40 40 public: 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); 43 43 44 44 ~STCalTsys() {;} … … 46 46 private: 47 47 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); 53 53 54 54 vector<int> iflist_; 55 casa ::Record tsysspw_;55 casacore::Record tsysspw_; 56 56 bool do_average_; 57 57 }; -
trunk/src/STCalTsysTable.cpp
r2955 r3106 28 28 29 29 30 using namespace casa ;30 using namespace casacore; 31 31 32 32 namespace asap { -
trunk/src/STCalTsysTable.h
r2964 r3106 33 33 STCalTsysTable() {;} 34 34 STCalTsysTable(const Scantable& parent); 35 STCalTsysTable(const casa ::String &name);35 STCalTsysTable(const casacore::String &name); 36 36 37 37 virtual ~STCalTsysTable(); 38 38 39 39 void setup(); 40 const casa ::String& name() const {return name_;};40 const casacore::String& name() const {return name_;}; 41 41 42 42 void attachOptionalColumns(); 43 43 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); 54 54 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); 59 59 60 casa ::Vector<casa::Double> getBaseFrequency(casa::uInt whichrow);60 casacore::Vector<casacore::Double> getBaseFrequency(casacore::uInt whichrow); 61 61 62 62 private: 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_; 67 67 }; 68 68 -
trunk/src/STCalibration.cpp
r3094 r3106 16 16 #include "STIdxIter.h" 17 17 18 using namespace casa ;18 using namespace casacore; 19 19 20 20 namespace asap { -
trunk/src/STCalibration.h
r2955 r3106 35 35 class STCalibration { 36 36 public: 37 STCalibration(casa ::CountedPtr<Scantable> &s, const casa::String target_column);37 STCalibration(casacore::CountedPtr<Scantable> &s, const casacore::String target_column); 38 38 39 39 void calibrate(); … … 41 41 virtual ~STCalibration() {;} 42 42 43 void save(casa ::String name) {applytable_->save(name);}43 void save(casacore::String name) {applytable_->save(name);} 44 44 //const STApplyTable &applytable() {return *applytable_;} 45 const casa ::CountedPtr<STApplyTable> applytable() {return applytable_;}45 const casacore::CountedPtr<STApplyTable> applytable() {return applytable_;} 46 46 47 void setOption(casa ::Record &rec) {options_ = rec;}47 void setOption(casacore::Record &rec) {options_ = rec;} 48 48 49 49 protected: 50 50 virtual void setupSelector(const STSelector &sel) = 0; 51 51 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; 57 57 58 58 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_; 64 64 }; 65 65 -
trunk/src/STCoordinate.h
r1823 r3106 28 28 STCoordinate(const STCoordinate& other) : spec_(other.spec_) {}; 29 29 30 STCoordinate(const casa ::SpectralCoordinate& spec) :30 STCoordinate(const casacore::SpectralCoordinate& spec) : 31 31 spec_(spec) {}; 32 32 … … 46 46 47 47 double toFrequency(double pix) { 48 casa ::Double world;48 casacore::Double world; 49 49 spec_.toWorld(world, pix); 50 50 return world; … … 52 52 53 53 double toVelocity(double pix) { 54 casa ::Double vel;54 casacore::Double vel; 55 55 spec_.pixelToVelocity(vel, pix); 56 56 return vel; … … 58 58 59 59 double toPixel(double world) { 60 casa ::Double pix;60 casacore::Double pix; 61 61 spec_.toPixel(pix, world); 62 62 return pix; … … 64 64 65 65 private: 66 casa ::SpectralCoordinate spec_;66 casacore::SpectralCoordinate spec_; 67 67 }; 68 68 -
trunk/src/STFITSImageWriter.cpp
r2658 r3106 67 67 #include "STFITSImageWriter.h" 68 68 69 using namespace casa ;69 using namespace casacore; 70 70 using namespace asap; 71 71 … … 274 274 fits_close_file(fptr, &status); 275 275 276 LogIO os( casa ::LogOrigin("STFITSImageWriter"));276 LogIO os( casacore::LogOrigin("STFITSImageWriter")); 277 277 os << "Wrote " << fileName << LogIO::POST; 278 278 ++iter; -
trunk/src/STFITSImageWriter.h
r2658 r3106 38 38 //#include "Scantable.h" 39 39 40 namespace casa {40 namespace casacore { 41 41 class String; 42 42 } … … 59 59 60 60 // 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); 62 62 63 void setClass(casa ::Bool flag) { isClass_ = flag; }63 void setClass(casacore::Bool flag) { isClass_ = flag; } 64 64 65 65 private: 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); 69 69 70 casa ::Bool isClass_;70 casacore::Bool isClass_; 71 71 }; 72 72 -
trunk/src/STFiller.cpp
r2658 r3106 47 47 #include "STHeader.h" 48 48 49 using namespace casa ;49 using namespace casacore; 50 50 51 51 namespace asap { … … 84 84 } 85 85 86 void STFiller::open( const std::string& filename, const std::string& antenna, int whichIF, int whichBeam, casa ::Bool getPt )86 void STFiller::open( const std::string& filename, const std::string& antenna, int whichIF, int whichBeam, casacore::Bool getPt ) 87 87 { 88 88 if (table_.null()) { … … 164 164 throw(AipsError("Failed to get header.")); 165 165 } 166 LogIO os( casa ::LogOrigin( "STFiller") );166 LogIO os( casacore::LogOrigin( "STFiller") ); 167 167 168 168 if ((header_->obstype).matches("*SW*")) { -
trunk/src/STFiller.h
r3089 r3106 52 52 * @param stbl 53 53 */ 54 explicit STFiller(casa ::CountedPtr< Scantable > stbl);54 explicit STFiller(casacore::CountedPtr< Scantable > stbl); 55 55 56 56 … … 76 76 * @exception AipsError Creation of PKSreader failed 77 77 */ 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 ); 79 79 80 80 /** … … 92 92 int read( ); 93 93 94 casa ::CountedPtr<Scantable> getTable() const { return table_;}94 casacore::CountedPtr<Scantable> getTable() const { return table_;} 95 95 96 96 /** … … 109 109 void openNRO( int whichIF=-1, int whichBeam=-1 ) ; 110 110 int readNRO() ; 111 casa ::Bool fileCheck() ;111 casacore::Bool fileCheck() ; 112 112 113 113 void setReferenceExpr(const std::string& rx) { refRx_ = rx; } … … 117 117 PKSreader* reader_; 118 118 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_; 125 125 NROReader *nreader_ ; 126 casa ::Bool isNRO_ ;126 casacore::Bool isNRO_ ; 127 127 }; 128 128 -
trunk/src/STFit.cpp
r3084 r3106 25 25 #include "STFit.h" 26 26 27 28 using namespace casa; 27 using namespace casacore; 29 28 30 29 namespace asap { 31 30 32 const casa::String STFit::name_ = "FIT";31 const String STFit::name_ = "FIT"; 33 32 34 33 STFit::STFit(const Scantable& parent) : … … 51 50 } 52 51 53 asap::STFit::STFit( casa ::Table tab ) : STSubTable(tab, name_)52 asap::STFit::STFit( casacore::Table tab ) : STSubTable(tab, name_) 54 53 { 55 54 funcCol_.attach(table_,"FUNCTIONS"); -
trunk/src/STFit.h
r1932 r3106 31 31 public: 32 32 STFit() {;} 33 explicit STFit(casa ::Table tab);33 explicit STFit(casacore::Table tab); 34 34 explicit STFit( const Scantable& parent); 35 35 … … 38 38 STFit& operator=(const STFit& other); 39 39 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; 42 42 43 const casa ::String& name() const { return name_; }43 const casacore::String& name() const { return name_; } 44 44 45 45 private: 46 46 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_; 54 54 }; 55 55 -
trunk/src/STFitEntry.cpp
r1932 r3106 13 13 #include <casa/iostream.h> 14 14 15 using namespace casa;16 15 namespace asap { 17 16 -
trunk/src/STFitter.cpp
r3087 r3106 49 49 50 50 using namespace asap; 51 using namespace casacore; 51 52 using namespace casa; 53 54 namespace asap { 52 55 53 56 Fitter::Fitter() … … 483 486 return fit; 484 487 } 488 489 } -
trunk/src/STFitter.h
r2666 r3106 80 80 private: 81 81 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_; 87 87 std::vector<std::string> funcnames_; 88 88 std::vector<int> funccomponents_; 89 89 90 90 //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_; 94 94 std::vector<std::vector<float> > constraints_; 95 95 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_; 100 100 }; 101 101 -
trunk/src/STFocus.cpp
r3084 r3106 22 22 23 23 24 using namespace casa ;24 using namespace casacore; 25 25 26 26 namespace asap { 27 27 28 const casa ::String STFocus::name_ = "FOCUS";28 const casacore::String STFocus::name_ = "FOCUS"; 29 29 30 30 STFocus::STFocus(const Scantable& parent ) : … … 34 34 } 35 35 36 STFocus::STFocus( casa ::Table tab ) :36 STFocus::STFocus( casacore::Table tab ) : 37 37 STSubTable(tab, name_) 38 38 { … … 158 158 159 159 160 casa ::Float STFocus::getTotalAngle( casa::uInt id ) const160 casacore::Float STFocus::getTotalAngle( casacore::uInt id ) const 161 161 { 162 162 Float total = 0.0f; … … 179 179 180 180 181 casa ::Float STFocus::getFeedHand( casa::uInt id ) const181 casacore::Float STFocus::getFeedHand( casacore::uInt id ) const 182 182 { 183 183 Table t = table_(table_.col("ID") == Int(id), 1 ); -
trunk/src/STFocus.h
r2289 r3106 30 30 public: 31 31 STFocus() {;} 32 explicit STFocus(casa ::Table tab);32 explicit STFocus(casacore::Table tab); 33 33 explicit STFocus( const Scantable& parent ); 34 34 … … 37 37 STFocus& operator=(const STFocus& other); 38 38 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); 44 44 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; 50 50 51 casa ::Float getTotalAngle(casa::uInt id) const;51 casacore::Float getTotalAngle(casacore::uInt id) const; 52 52 53 casa ::Float getParAngle(casa::uInt id) const {53 casacore::Float getParAngle(casacore::uInt id) const { 54 54 return parangleCol_(id); 55 55 } 56 casa ::Float getFeedHand(casa::uInt id) const;56 casacore::Float getFeedHand(casacore::uInt id) const; 57 57 58 58 void setParallactify(bool istrue=false); 59 59 60 const casa ::String& name() const { return name_; }60 const casacore::String& name() const { return name_; } 61 61 62 62 private: 63 63 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_, 66 66 tanCol_,handCol_, parangleCol_, 67 67 mountCol_,userCol_, xyphCol_,xyphoffCol_; -
trunk/src/STFrequencies.cpp
r3084 r3106 31 31 32 32 33 using namespace casa ;33 using namespace casacore; 34 34 35 35 namespace asap { … … 43 43 } 44 44 45 STFrequencies::STFrequencies( casa ::Table tab ) :45 STFrequencies::STFrequencies( casacore::Table tab ) : 46 46 STSubTable(tab, name_) 47 47 { … … 266 266 if (!MFrequency::getType(mft, rf)) { 267 267 ostringstream oss; 268 LogIO os( casa ::LogOrigin( "STFrequencies", "getFrame") );268 LogIO os( casacore::LogOrigin( "STFrequencies", "getFrame") ); 269 269 os << LogIO::WARN << "WARNING: Frequency type unknown assuming TOPO" 270 270 << LogIO::POST; -
trunk/src/STFrequencies.h
r2900 r3106 32 32 public: 33 33 STFrequencies() {;} 34 explicit STFrequencies(casa ::Table tab);34 explicit STFrequencies(casacore::Table tab); 35 35 explicit STFrequencies(const Scantable& parent); 36 36 … … 46 46 * @return an index into the frequency table 47 47 */ 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 ); 50 50 51 51 /** … … 56 56 * @param id the identifier 57 57 */ 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 ); 60 60 61 61 /*** … … 68 68 * 17/09/2008 Takeshi Nakazato 69 69 ***/ 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 ) ; 72 72 73 73 … … 75 75 76 76 /** 77 * Retrieve the frequency values as a casa ::SpectralCoordinate77 * Retrieve the frequency values as a casacore::SpectralCoordinate 78 78 * @param freqID 79 * @return casa ::SpectralCoordinate80 */ 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 freqID79 * @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 89 89 ) const; 90 90 **/ 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 freqID91 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 96 96 ) const; 97 97 98 98 /** 99 99 * Return the unit of the frequency values 100 * @return casa ::Unit101 */ 102 casa ::Unit getUnit() const;100 * @return casacore::Unit 101 */ 102 casacore::Unit getUnit() const; 103 103 std::string getUnitString() const; 104 104 105 105 /** 106 106 * Return the doppler type of the values 107 * @return casa ::MDoppler::Types108 */ 109 casa ::MDoppler::Types getDoppler() const;107 * @return casacore::MDoppler::Types 108 */ 109 casacore::MDoppler::Types getDoppler() const; 110 110 std::string getDopplerString() const; 111 111 … … 114 114 * Return the frame type, e.g MFrequency::TOPO 115 115 * @param base return the base frame or the user frame 116 * @return casa ::MFrequency::Types117 */ 118 casa ::MFrequency::Types getFrame(bool base=false) const;116 * @return casacore::MFrequency::Types 117 */ 118 casacore::MFrequency::Types getFrame(bool base=false) const; 119 119 120 120 /** … … 131 131 void setFrame(const std::string& frame, bool base=false); 132 132 /** 133 * set the frequency frame from a casa ::MFrequency::Types134 * @param frame casa ::MFrequency::Types135 */ 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); 137 137 void setUnit( const std::string & unit ); 138 138 void setDoppler( const std::string & doppler ); … … 144 144 * @li "RESAMPLE" 145 145 */ 146 void rescale(casa ::Float factor, const std::string& mode);146 void rescale(casacore::Float factor, const std::string& mode); 147 147 148 148 /** … … 152 152 * @return teh reference frequency 153 153 */ 154 float getRefFreq(casa ::uInt id, casa::uInt channel);154 float getRefFreq(casacore::uInt id, casacore::uInt channel); 155 155 156 156 /** … … 159 159 * @param id the coordinate id 160 160 */ 161 void shiftRefPix(int npix, casa ::uInt id);161 void shiftRefPix(int npix, casacore::uInt id); 162 162 /** 163 163 * Return this table or s specific row as a string representation … … 165 165 * @return a string 166 166 */ 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; 168 168 169 169 std::vector<std::string> getInfo() const; 170 170 void setInfo( const std::vector<std::string>& theinfo ); 171 171 172 const casa ::String& name() const { return name_; }172 const casacore::String& name() const { return name_; } 173 173 174 174 /** … … 185 185 * @return boolean indicating match with any rows or not 186 186 */ 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); 189 189 190 190 private: 191 191 192 192 /** 193 * setup the the column structure of the casa ::table193 * setup the the column structure of the casacore::table 194 194 */ 195 195 void setup(); … … 198 198 * @param sc 199 199 * @param factor the bin factor 200 * @return casa ::SpectralCoordinate201 */ 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); 203 203 /** 204 204 * the actual resampling of the SpectralCoordinate as called by rescale … … 207 207 * @return 208 208 */ 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_; 213 213 }; 214 214 -
trunk/src/STGrid.cpp
r3085 r3106 40 40 using namespace std ; 41 41 using namespace concurrent ; 42 using namespace casa 42 using namespace casacore; 43 43 using namespace asap ; 44 44 -
trunk/src/STGrid.h
r3085 r3106 38 38 39 39 using namespace std ; 40 using namespace casa 40 using namespace casacore; 41 41 42 42 namespace asap { -
trunk/src/STHeader.cpp
r1819 r3106 44 44 #include "STHeader.h" 45 45 46 using namespace casa ;46 using namespace casacore; 47 47 using namespace asap; 48 48 -
trunk/src/STHeader.h
r1439 r3106 40 40 #include <measures/Measures/MDirection.h> 41 41 42 namespace casa {42 namespace casacore { 43 43 template<class T> class Matrix; 44 44 } … … 50 50 51 51 bool conformant(const STHeader& other); 52 casa ::String diff( const STHeader& other );52 casacore::String diff( const STHeader& other ); 53 53 54 54 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; 72 72 void print() const ; 73 73 }; … … 85 85 // direction and another integer index which are just stored along 86 86 // 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); 89 89 90 90 // Number of entries 91 casa ::Int length() const { return n_;}91 casacore::Int length() const { return n_;} 92 92 93 93 // 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];} 98 98 99 99 // Summary … … 101 101 102 102 private: 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_; 107 107 108 108 SDDataDesc(const SDDataDesc& other); -
trunk/src/STHistory.cpp
r3084 r3106 22 22 #include "MathUtils.h" 23 23 24 using namespace casa ;24 using namespace casacore; 25 25 26 26 namespace asap { 27 27 28 const casa ::String STHistory::name_ = "HISTORY";28 const casacore::String STHistory::name_ = "HISTORY"; 29 29 30 30 STHistory::STHistory(const Scantable& parent ) : … … 34 34 } 35 35 36 asap::STHistory::STHistory( casa ::Table tab ) : STSubTable(tab, name_)36 asap::STHistory::STHistory( casacore::Table tab ) : STSubTable(tab, name_) 37 37 { 38 38 itemCol_.attach(table_,"ITEM"); -
trunk/src/STHistory.h
r2820 r3106 30 30 public: 31 31 STHistory() {;} 32 explicit STHistory(casa ::Table tab);32 explicit STHistory(casacore::Table tab); 33 33 explicit STHistory( const Scantable& parent ); 34 34 … … 42 42 * @return an ID (irrelevant) 43 43 */ 44 casa ::uInt addEntry( const casa::String& item);44 casacore::uInt addEntry( const casacore::String& item); 45 45 46 46 /** … … 50 50 * @param id an uInt ID 51 51 */ 52 void getEntry( casa ::String& item, casa::uInt id);52 void getEntry( casacore::String& item, casacore::uInt id); 53 53 54 54 /** … … 64 64 std::vector<std::string> getHistory(int nrow=-1, int start=0 ) const; 65 65 66 const casa ::String& name() const { return name_; }66 const casacore::String& name() const { return name_; } 67 67 68 68 int nrow() const { return table_.nrow(); } … … 73 73 private: 74 74 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_; 77 77 }; 78 78 -
trunk/src/STIdxIter.h
r3078 r3106 14 14 15 15 using namespace std ; 16 using namespace casa 16 using namespace casacore; 17 17 18 18 //namespace { -
trunk/src/STLineFinder.cpp
r3086 r3106 42 42 43 43 using namespace asap; 44 using namespace casa ;44 using namespace casacore; 45 45 using namespace std; 46 46 … … 57 57 // The input data to work with. Use reference symantics to avoid 58 58 // an unnecessary copying 59 const casa ::Vector<casa::Float> &spectrum; // a buffer for the spectrum60 const casa ::Vector<casa::Bool> &mask; // associated mask59 const casacore::Vector<casacore::Float> &spectrum; // a buffer for the spectrum 60 const casacore::Vector<casacore::Bool> &mask; // associated mask 61 61 const std::pair<int,int> &edge; // start and stop+1 channels 62 62 // to work with 63 63 64 64 // statistics for running box filtering 65 casa ::Float sumf; // sum of fluxes66 casa ::Float sumf2; // sum of squares of fluxes67 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) 70 70 71 71 int box_chan_cntr; // actual number of channels in the box … … 73 73 // (calculated from boxsize and actual spectrum size) 74 74 // cache for derivative statistics 75 mutable casa ::Bool need2recalculate; // if true, values of the statistics75 mutable casacore::Bool need2recalculate; // if true, values of the statistics 76 76 // below are invalid 77 mutable casa ::Float linmean; // a value of the linear fit to the77 mutable casacore::Float linmean; // a value of the linear fit to the 78 78 // points in the running box 79 mutable casa ::Float linvariance; // the same for variance79 mutable casacore::Float linvariance; // the same for variance 80 80 int cur_channel; // the number of the current channel 81 81 int start_advance; // number of channel from which the box can … … 85 85 // set up the object with the references to actual data 86 86 // 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, 89 89 const std::pair<int,int> &in_edge, 90 90 int in_max_box_nchan); 91 91 92 92 // 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; 96 96 int getChannel() const; 97 97 … … 104 104 105 105 // checking whether there are still elements 106 casa ::Bool haveMore() const;106 casacore::Bool haveMore() const; 107 107 108 108 // go to start … … 136 136 // was detected in the previous channels. 137 137 std::pair<int,int> cur_line; 138 casa ::Bool is_detected_before;138 casacore::Bool is_detected_before; 139 139 int min_nchan; // A minimum number of consequtive 140 140 // channels, which should satisfy 141 141 // the detection criterion, to be 142 142 // a detection 143 casa ::Float threshold; // detection threshold - the143 casacore::Float threshold; // detection threshold - the 144 144 // minimal signal to noise ratio 145 145 std::list<pair<int,int> > &lines; // list where detections are saved 146 146 // (pair: start and stop+1 channel) 147 147 RunningBox *running_box; // running box filter 148 casa ::Vector<Int> signs; // An array to store the signs of148 casacore::Vector<Int> signs; // An array to store the signs of 149 149 // the value - current mean 150 150 // (used to search wings) 151 casa ::Int last_sign; // a sign (+1, -1 or 0) of the151 casacore::Int last_sign; // a sign (+1, -1 or 0) of the 152 152 // last point of the detected line 153 153 // … … 163 163 LFAboveThreshold(std::list<pair<int,int> > &in_lines, 164 164 int in_min_nchan = 3, 165 casa ::Float in_threshold = 5,165 casacore::Float in_threshold = 5, 166 166 bool use_median = false, 167 167 int noise_sample_size = -1); … … 169 169 170 170 // 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); 172 172 173 173 // return the array with signs of the value-current mean … … 175 175 // This array is updated each time the findLines method is called and 176 176 // is used to search the line wings 177 const casa ::Vector<Int>& getSigns() const;177 const casacore::Vector<Int>& getSigns() const; 178 178 179 179 // find spectral lines and add them into list … … 182 182 // spectrum, mask and edge - reference to the data 183 183 // 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, 186 186 const std::pair<int,int> &edge, 187 187 int max_box_nchan); … … 192 192 // add a new line to the list, if necessary using processCurLine() 193 193 // 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); 195 195 196 196 // process the interval of channels stored in curline 197 197 // 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); 199 199 200 200 // get the sign of runningBox->aboveMean(). The RunningBox pointer 201 201 // should be defined 202 casa ::Int getAboveMeanSign() const;202 casacore::Int getAboveMeanSign() const; 203 203 }; 204 204 … … 457 457 // set up the object with the references to actual data 458 458 // 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,459 RunningBox::RunningBox(const casacore::Vector<casacore::Float> &in_spectrum, 460 const casacore::Vector<casacore::Bool> &in_mask, 461 461 const std::pair<int,int> &in_edge, 462 462 int in_max_box_nchan) : … … 488 488 489 489 // access to the statistics 490 const casa ::Float& RunningBox::getLinMean() const490 const casacore::Float& RunningBox::getLinMean() const 491 491 { 492 492 DebugAssert(cur_channel<edge.second, AipsError); … … 495 495 } 496 496 497 const casa ::Float& RunningBox::getLinVariance() const497 const casacore::Float& RunningBox::getLinVariance() const 498 498 { 499 499 DebugAssert(cur_channel<edge.second, AipsError); … … 502 502 } 503 503 504 casa ::Float RunningBox::aboveMean() const504 casacore::Float RunningBox::aboveMean() const 505 505 { 506 506 DebugAssert(cur_channel<edge.second, AipsError); … … 561 561 562 562 // checking whether there are still elements 563 casa ::Bool RunningBox::haveMore() const563 casacore::Bool RunningBox::haveMore() const 564 564 { 565 565 return cur_channel<edge.second; … … 611 611 LFAboveThreshold::LFAboveThreshold(std::list<pair<int,int> > &in_lines, 612 612 int in_min_nchan, 613 casa ::Float in_threshold,613 casacore::Float in_threshold, 614 614 bool use_median, 615 615 int noise_sample_size) : … … 624 624 625 625 // replace the detection criterion 626 void LFAboveThreshold::setCriterion(int in_min_nchan, casa ::Float in_threshold)626 void LFAboveThreshold::setCriterion(int in_min_nchan, casacore::Float in_threshold) 627 627 { 628 628 min_nchan=in_min_nchan; … … 632 632 // get the sign of runningBox->aboveMean(). The RunningBox pointer 633 633 // should be defined 634 casa ::Int LFAboveThreshold::getAboveMeanSign() const634 casacore::Int LFAboveThreshold::getAboveMeanSign() const 635 635 { 636 636 const Float buf=running_box->aboveMean(); … … 644 644 // add a new line to the list, if necessary 645 645 void LFAboveThreshold::processChannel(Bool detect, 646 const casa ::Vector<casa::Bool> &mask)646 const casacore::Vector<casacore::Bool> &mask) 647 647 { 648 648 try { … … 675 675 // process the interval of channels stored in cur_line 676 676 // if it satisfies the criterion, add this interval as a new line 677 void LFAboveThreshold::processCurLine(const casa ::Vector<casa::Bool> &mask)677 void LFAboveThreshold::processCurLine(const casacore::Vector<casacore::Bool> &mask) 678 678 { 679 679 try { … … 709 709 // This array is updated each time the findLines method is called and 710 710 // is used to search the line wings 711 const casa ::Vector<Int>& LFAboveThreshold::getSigns() const711 const casacore::Vector<Int>& LFAboveThreshold::getSigns() const 712 712 { 713 713 return signs; … … 715 715 716 716 // 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,717 void LFAboveThreshold::findLines(const casacore::Vector<casacore::Float> &spectrum, 718 const casacore::Vector<casacore::Bool> &mask, 719 719 const std::pair<int,int> &edge, 720 720 int max_box_nchan) … … 905 905 // in_median true if median statistics is used as opposed to average of 906 906 // 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)907 void 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) 913 913 { 914 914 threshold=in_threshold; … … 949 949 int STLineFinder::findLines(const std::vector<bool> &in_mask, 950 950 const std::vector<int> &in_edge, 951 const casa ::uInt &whichRow)951 const casacore::uInt &whichRow) 952 952 { 953 953 if (useScantable && scan.null()) … … 1096 1096 // spectrum. It uses the Fitter class. This action is required before 1097 1097 // 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)1098 void STLineFinder::subtractBaseline(const casacore::Vector<casacore::Bool> &temp_mask, 1099 const casacore::Int &order) 1100 1100 { 1101 1101 AlwaysAssert(spectrum.nelements(),AipsError); … … 1112 1112 sdf.setExpression("poly",order); 1113 1113 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()); 1115 1115 } 1116 1116 … … 1121 1121 // array specified, rather than the field of this class 1122 1122 // boxsize - a number of adjacent channels to average 1123 void STLineFinder::averageAdjacentChannels(casa ::Vector<casa::Bool> &mask2update,1124 const casa ::Int &boxsize)1123 void STLineFinder::averageAdjacentChannels(casacore::Vector<casacore::Bool> &mask2update, 1124 const casacore::Int &boxsize) 1125 1125 { 1126 1126 DebugAssert(mask2update.nelements()==spectrum.nelements(), AipsError); … … 1266 1266 // nothing will be done if it is empty 1267 1267 // max_box_nchan - channels in the running box for baseline filtering 1268 void STLineFinder::keepStrongestOnly(const casa ::Vector<casa::Bool> &temp_mask,1268 void STLineFinder::keepStrongestOnly(const casacore::Vector<casacore::Bool> &temp_mask, 1269 1269 std::list<std::pair<int, int> > &lines2update, 1270 1270 int max_box_nchan) … … 1371 1371 // merged together. Any masked channel stops the extension 1372 1372 void 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, 1375 1375 const std::pair<int,int> &edge) 1376 1376 { -
trunk/src/STLineFinder.h
r3085 r3106 70 70 // merged together. Any masked channel stops the extension 71 71 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, 74 74 const std::pair<int,int> &edge); 75 75 protected: … … 153 153 // in_median true if median statistics is used as opposed to average of 154 154 // 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 ) ; 163 163 164 164 // set the scan to work with (in_scan parameter) … … 180 180 int findLines(const std::vector<bool> &in_mask, 181 181 const std::vector<int> &in_edge = std::vector<int>(), 182 const casa ::uInt &whichRow = 0);182 const casacore::uInt &whichRow = 0); 183 183 184 184 // get the mask to mask out all lines that have been found (default) … … 202 202 // array specified, rather than the field of this class 203 203 // 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); 206 206 207 207 // auxiliary function to fit and subtract a polynomial from the current 208 208 // spectrum. It uses the Fitter class. This action is required before 209 209 // 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); 212 212 213 213 // an auxiliary function to remove all lines from the list, except the … … 224 224 // nothing will be done if it is empty 225 225 // 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, 227 227 std::list<std::pair<int, int> > &lines2update, 228 228 int max_box_nchan); 229 229 private: 230 casa ::CountedPtr<Scantable> scan; // the scan to work with231 casa ::Vector<casa::Bool> mask; // associated mask230 casacore::CountedPtr<Scantable> scan; // the scan to work with 231 casacore::Vector<casacore::Bool> mask; // associated mask 232 232 std::pair<int,int> edge; // start and stop+1 channels 233 233 // to work with 234 casa ::Float threshold; // detection threshold - the234 casacore::Float threshold; // detection threshold - the 235 235 // minimal signal to noise ratio 236 casa ::Double box_size; // size of the box for running236 casacore::Double box_size; // size of the box for running 237 237 // mean calculations, specified as 238 238 // a fraction of the whole spectrum … … 241 241 // the detection criterion, to be 242 242 // a detection 243 casa ::Int avg_limit; // perform the averaging of no243 casacore::Int avg_limit; // perform the averaging of no 244 244 // more than in_avg_limit 245 245 // adjacent channels to search 246 246 // for broad lines. see setOptions 247 casa ::uInt last_row_used; // the Row number specified247 casacore::uInt last_row_used; // the Row number specified 248 248 // during the last findLines call 249 249 std::list<std::pair<int, int> > lines; // container of start and stop+1 250 250 // channels of the spectral lines 251 251 // a buffer for the spectrum 252 mutable casa ::Vector<casa::Float> spectrum;252 mutable casacore::Vector<casacore::Float> spectrum; 253 253 254 254 // the box size for off-line noise estimation (if working with 255 255 // local noise. Negative value means use global noise estimate 256 256 // Default is -1 (i.e. estimate using the whole spectrum) 257 casa ::Float itsNoiseBox;257 casacore::Float itsNoiseBox; 258 258 259 259 // true if median statistics is used as opposed to average of 260 260 // the lowest 80% of deviations (default) 261 casa ::Bool itsUseMedian;261 casacore::Bool itsUseMedian; 262 262 263 263 // true if spectra and mask data should be provided from … … 266 266 267 267 // shared object for nominal throw 268 casa ::AipsError err ;268 casacore::AipsError err ; 269 269 }; 270 270 -
trunk/src/STMath.cpp
r3089 r3106 63 63 #include "CalibrationHelper.h" 64 64 65 using namespace casa; 66 using namespace asap; 65 using namespace casacore; 66 67 namespace asap { 67 68 68 69 // 2012/02/17 TN … … 1308 1309 const CountedPtr < Scantable >& ref, 1309 1310 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()")); 1314 1315 if ( ! ref->conformant(*sig) ) { 1315 1316 throw(AipsError("'sig' and 'ref' scantables are not conformant.")); … … 1410 1411 } 1411 1412 1412 CountedPtr< Scantable > STMath::donod(const casa ::CountedPtr<Scantable>& s,1413 CountedPtr< Scantable > STMath::donod(const casacore::CountedPtr<Scantable>& s, 1413 1414 const std::vector<int>& scans, 1414 1415 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 ) 1418 1419 1419 1420 { 1420 1421 setInsitu(false); 1421 LogIO os( casa ::LogOrigin( "STMath", "donod()"));1422 LogIO os( casacore::LogOrigin( "STMath", "donod()")); 1422 1423 STSelector sel; 1423 1424 std::vector<int> scan1, scan2, beams, types; … … 1589 1590 const std::vector<int>& scans, 1590 1591 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 ) 1594 1595 { 1595 1596 … … 2928 2929 const std::string & method) 2929 2930 { 2930 LogIO os( casa ::LogOrigin("STMath", "frequencyAlign()", WHERE));2931 LogIO os( casacore::LogOrigin("STMath", "frequencyAlign()", WHERE)); 2931 2932 // clone as this is not working insitu 2932 2933 bool insitu = insitu_; … … 3158 3159 3159 3160 std::vector<float> 3160 asap::STMath::fft( const casa ::CountedPtr< Scantable > & in,3161 asap::STMath::fft( const casacore::CountedPtr< Scantable > & in, 3161 3162 const std::vector<int>& whichrow, 3162 3163 bool getRealImag ) … … 3250 3251 const std::string& weight, 3251 3252 const std::string& avmode ) 3252 throw ( casa ::AipsError )3253 throw ( casacore::AipsError ) 3253 3254 { 3254 3255 LogIO os( LogOrigin( "STMath", "new_average()", WHERE ) ) ; … … 4359 4360 return a ; 4360 4361 } 4362 4363 } -
trunk/src/STMath.h
r2952 r3106 37 37 public: 38 38 // 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; 41 41 42 42 // typedef for std::map … … 69 69 * @param weight weighting scheme 70 70 * @param avmode the mode ov averaging. Per "SCAN" or "ALL". 71 * @return a casa ::CountedPtr<Scantable> which either holds a new Scantable71 * @return a casacore::CountedPtr<Scantable> which either holds a new Scantable 72 72 * or returns the imput pointer. 73 73 */ 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, 76 76 const std::vector<bool>& mask = std::vector<bool>(), 77 77 const std::string& weight = "NONE", … … 83 83 * @param mode the averaging mode. Currently only "MEDIAN" 84 84 * @param avmode the mode ov averaging. Per "SCAN" or "ALL". 85 * @return a casa ::CountedPtr<Scantable> which either holds a new Scantable85 * @return a casacore::CountedPtr<Scantable> which either holds a new Scantable 86 86 * or returns the imput pointer. 87 87 */ 88 casa ::CountedPtr<Scantable>89 averageChannel( const casa ::CountedPtr<Scantable> & in,88 casacore::CountedPtr<Scantable> 89 averageChannel( const casacore::CountedPtr<Scantable> & in, 90 90 const std::string& mode = "MEDIAN", 91 91 const std::string& avmode = "SCAN"); … … 99 99 * @return 100 100 */ 101 casa ::CountedPtr< Scantable >102 averagePolarisations( const casa ::CountedPtr< Scantable > & in,101 casacore::CountedPtr< Scantable > 102 averagePolarisations( const casacore::CountedPtr< Scantable > & in, 103 103 const std::vector<bool>& mask, 104 104 const std::string& weight ); … … 111 111 * @return 112 112 */ 113 casa ::CountedPtr< Scantable >114 averageBeams( const casa ::CountedPtr< Scantable > & in,113 casacore::CountedPtr< Scantable > 114 averageBeams( const casacore::CountedPtr< Scantable > & in, 115 115 const std::vector<bool>& mask, 116 116 const std::string& weight ); 117 117 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, 120 120 const std::string& mode, bool tsys=false, 121 121 bool skip_flaggedrow=false ); 122 122 123 123 // array operation 124 casa ::CountedPtr<Scantable>125 arrayOperate( const casa ::CountedPtr<Scantable>& in,124 casacore::CountedPtr<Scantable> 125 arrayOperate( const casacore::CountedPtr<Scantable>& in, 126 126 const std::vector<float> val, 127 127 const std::string& mode, … … 131 131 132 132 // channel operation 133 casa ::CountedPtr<Scantable>134 arrayOperateChannel( const casa ::CountedPtr<Scantable>& in,133 casacore::CountedPtr<Scantable> 134 arrayOperateChannel( const casacore::CountedPtr<Scantable>& in, 135 135 const std::vector<float> val, 136 136 const std::string& mode, bool tsys=false, … … 138 138 139 139 // row operation 140 casa ::CountedPtr<Scantable>141 arrayOperateRow( const casa ::CountedPtr<Scantable>& in,140 casacore::CountedPtr<Scantable> 141 arrayOperateRow( const casacore::CountedPtr<Scantable>& in, 142 142 const std::vector<float> val, 143 143 const std::string& mode, bool tsys=false, … … 145 145 146 146 // 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, 149 149 const std::vector< std::vector<float> > val, 150 150 const std::string& mode, bool tsys=false ); 151 151 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, 155 155 const std::string& mode); 156 156 157 casa ::CountedPtr<Scantable> autoQuotient(const casa::CountedPtr<Scantable>& in,157 casacore::CountedPtr<Scantable> autoQuotient(const casacore::CountedPtr<Scantable>& in, 158 158 const std::string& mode = "NEAREST", 159 159 bool preserve = true); 160 160 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, 163 163 bool preserve = true ); 164 164 … … 168 168 * @param caloff uncalibrated Scantable with no CAL signal 169 169 * @param tcal optional scalar Tcal, CAL temperature (K) 170 * @return casa ::CountedPtr<Scantable> which holds a calibrated Scantable170 * @return casacore::CountedPtr<Scantable> which holds a calibrated Scantable 171 171 * (spectrum - average of the two CAL on and off spectra; 172 172 * tsys - mean Tsys = <caloff>*Tcal/<calon-caloff> + Tcal/2) 173 173 */ 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 ); 177 177 178 178 /** … … 185 185 * set tau, as well 186 186 * @param tau optional scalar Tau value 187 * @return casa ::CountedPtr<Scantable> which holds combined scans187 * @return casacore::CountedPtr<Scantable> which holds combined scans 188 188 * (spectrum = (sig-ref)/ref * Tsys ) 189 189 */ 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, 192 192 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 ); 195 195 196 196 /** … … 203 203 * @param tau optional scalar Tau value 204 204 * @param tcal optional scalar Tcal, CAL temperature (K) 205 * @return casa ::CountedPtr<Scantable> which holds calibrated scans206 */ 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, 208 208 const std::vector<int>& scans, 209 209 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 ); 213 213 214 214 /** … … 221 221 * @param tau optional scalar Tau value 222 222 * @param tcal optional scalar Tcal, CAL temperature (K) 223 * @return casa ::CountedPtr<Scantable> which holds calibrated scans224 */ 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, 226 226 const std::vector<int>& scans, 227 227 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 ); 231 231 232 232 /** … … 241 241 * @param a string that indicates antenna name 242 242 **/ 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 ); 246 246 247 247 /** … … 254 254 * @param a string that indicates antenna name 255 255 **/ 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 ); 258 258 259 259 … … 264 264 * @param choffset 265 265 **/ 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 ); 270 270 271 271 /** 272 272 * ALMA calibration 273 273 **/ 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, 282 282 const std::vector<bool>& mask, 283 283 const std::string& which); 284 284 285 std::vector<float> statisticRow(const casa ::CountedPtr<Scantable>& in,285 std::vector<float> statisticRow(const casacore::CountedPtr<Scantable>& in, 286 286 const std::vector<bool>& mask, 287 287 const std::string& which, 288 288 int row); 289 289 290 std::vector< int > minMaxChan(const casa ::CountedPtr<Scantable>& in,290 std::vector< int > minMaxChan(const casacore::CountedPtr<Scantable>& in, 291 291 const std::vector<bool>& mask, 292 292 const std::string& which); 293 293 294 casa ::CountedPtr<Scantable> bin( const casa::CountedPtr<Scantable>& in,294 casacore::CountedPtr<Scantable> bin( const casacore::CountedPtr<Scantable>& in, 295 295 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, 298 298 const std::string& method, float width); 299 299 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, 302 302 float width, int order=2); 303 303 304 casa ::CountedPtr<Scantable>305 gainElevation(const casa ::CountedPtr<Scantable>& in,304 casacore::CountedPtr<Scantable> 305 gainElevation(const casacore::CountedPtr<Scantable>& in, 306 306 const std::vector<float>& coeff, 307 307 const std::string& fileName, 308 308 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, 311 311 float etaap, float jyperk); 312 312 313 casa ::CountedPtr<Scantable> opacity(const casa::CountedPtr<Scantable>& in,313 casacore::CountedPtr<Scantable> opacity(const casacore::CountedPtr<Scantable>& in, 314 314 const std::vector<float>& tau); 315 315 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, 318 318 const std::string &freqTol = ""); 319 319 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, 334 334 const std::string& refTime = "", 335 335 const std::string& method = "cubic" ); 336 336 337 casa ::CountedPtr<Scantable>338 convertPolarisation( const casa ::CountedPtr<Scantable>& in,337 casacore::CountedPtr<Scantable> 338 convertPolarisation( const casacore::CountedPtr<Scantable>& in, 339 339 const std::string& newtype); 340 340 341 casa ::CountedPtr<Scantable>342 mxExtract( const casa ::CountedPtr<Scantable>& in,341 casacore::CountedPtr<Scantable> 342 mxExtract( const casacore::CountedPtr<Scantable>& in, 343 343 const std::string& srctype = "on"); 344 344 … … 348 348 * @param width the number of lags to flag left to the side of the frequency 349 349 */ 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, 352 352 double end, const std::string& mode="frequency"); 353 353 354 354 std::vector<float> 355 fft( const casa ::CountedPtr<Scantable>& in,355 fft( const casacore::CountedPtr<Scantable>& in, 356 356 const std::vector<int>& whichrow, 357 357 bool getRealImag=false ); 358 358 359 359 // 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, 362 362 const bool& compel, 363 363 const std::vector<bool>& mask = std::vector<bool>(), 364 364 const std::string& weight = "NONE", 365 365 const std::string& avmode = "SCAN" ) 366 throw (casa ::AipsError) ;366 throw (casacore::AipsError) ; 367 367 368 368 private: 369 casa ::CountedPtr<Scantable> applyToPol( const casa::CountedPtr<Scantable>& in,369 casacore::CountedPtr<Scantable> applyToPol( const casacore::CountedPtr<Scantable>& in, 370 370 STPol::polOperation fptr, 371 casa ::Float phase);371 casacore::Float phase); 372 372 373 373 static imethod stringToIMethod(const std::string& in); 374 374 static WeightType stringToWeight(const std::string& in); 375 375 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, 378 378 bool dotsys); 379 379 380 void scaleFromAsciiTable(casa ::Table& in, const std::string& filename,380 void scaleFromAsciiTable(casacore::Table& in, const std::string& filename, 381 381 const std::string& method, 382 const casa ::Vector<casa::Float>& xout,382 const casacore::Vector<casacore::Float>& xout, 383 383 bool dotsys); 384 384 385 void scaleFromTable(casa ::Table& in, const casa::Table& table,385 void scaleFromTable(casacore::Table& in, const casacore::Table& table, 386 386 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, 390 390 bool tokelvin, float cfac); 391 391 392 casa ::CountedPtr< Scantable >393 smoothOther( const casa ::CountedPtr< Scantable >& in,392 casacore::CountedPtr< Scantable > 393 smoothOther( const casacore::CountedPtr< Scantable >& in, 394 394 const std::string& kernel, 395 395 float width, int order=2 ); 396 396 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); 408 408 409 409 // 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, 434 434 vector<bool> &mask, 435 435 string weight ) ; -
trunk/src/STMathWrapper.h
r3008 r3106 42 42 const std::string& avmode ) 43 43 { 44 std::vector<casa ::CountedPtr<Scantable> > sts;44 std::vector<casacore::CountedPtr<Scantable> > sts; 45 45 for (unsigned int i=0; i<in.size(); ++i) sts.push_back(in[i].getCP()); 46 46 return ScantableWrapper(STMath::average(sts, mask, weight, avmode)); … … 105 105 106 106 ScantableWrapper dototalpower( const ScantableWrapper& calon, 107 const ScantableWrapper& caloff, casa ::Float tcal= 0 )107 const ScantableWrapper& caloff, casacore::Float tcal= 0 ) 108 108 { return ScantableWrapper( STMath::dototalpower( calon.getCP(), caloff.getCP(), tcal ) ); } 109 109 110 110 ScantableWrapper dosigref( const ScantableWrapper& sig, 111 111 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) 113 113 { return ScantableWrapper( STMath::dosigref( sig.getCP(), ref.getCP(), smoothref, tsysv, tau ) ); } 114 114 … … 116 116 const std::vector<int>& scans, 117 117 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 ) 119 119 { return ScantableWrapper( STMath::donod( s.getCP(), scans, smoothref, tsysv, tau, tcal ) ); } 120 120 … … 122 122 const std::vector<int>& scans, 123 123 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 ) 125 125 { return ScantableWrapper( STMath::dofs( s.getCP(), scans, smoothref, tsysv, tau, tcal ) ); } 126 126 … … 180 180 const std::string &freqTol) 181 181 { 182 std::vector<casa ::CountedPtr<Scantable> > sts;182 std::vector<casacore::CountedPtr<Scantable> > sts; 183 183 for (unsigned int i=0; i<in.size(); ++i) sts.push_back(in[i].getCP()); 184 184 return ScantableWrapper(STMath::merge(sts, freqTol)); } … … 229 229 const std::string& avmode ) 230 230 { 231 std::vector<casa ::CountedPtr<Scantable> > sts;231 std::vector<casacore::CountedPtr<Scantable> > sts; 232 232 for (unsigned int i=0; i<in.size(); ++i) sts.push_back(in[i].getCP()); 233 233 return ScantableWrapper(STMath::new_average(sts, compel, mask, weight, avmode)); … … 239 239 const std::string antname ) 240 240 { 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 ) ; 244 244 return ScantableWrapper( STMath::cwcal( tab, mode, name ) ) ; 245 245 } … … 248 248 const std::string calmode ) 249 249 { 250 casa ::CountedPtr<Scantable> tab = in.getCP() ;251 casa ::String mode( calmode ) ;250 casacore::CountedPtr<Scantable> tab = in.getCP() ; 251 casacore::String mode( calmode ) ; 252 252 return ScantableWrapper( STMath::almacal( tab, mode ) ) ; 253 253 } -
trunk/src/STMolecules.cpp
r3084 r3106 25 25 26 26 27 using namespace casa ;27 using namespace casacore; 28 28 29 29 namespace asap { 30 30 31 const casa ::String STMolecules::name_ = "MOLECULES";31 const casacore::String STMolecules::name_ = "MOLECULES"; 32 32 33 33 STMolecules::STMolecules(const Scantable& parent) : … … 37 37 } 38 38 39 asap::STMolecules::STMolecules( casa ::Table tab ) : STSubTable(tab, name_)39 asap::STMolecules::STMolecules( casacore::Table tab ) : STSubTable(tab, name_) 40 40 { 41 41 restfreqCol_.attach(table_,"RESTFREQUENCY"); -
trunk/src/STMolecules.h
r2321 r3106 32 32 public: 33 33 STMolecules() {;} 34 explicit STMolecules(casa ::Table tab);34 explicit STMolecules(casacore::Table tab); 35 35 explicit STMolecules( const Scantable& parent); 36 36 … … 40 40 41 41 /*** 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=""); 44 44 ***/ 45 45 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)); 49 49 50 50 /*** 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; 53 53 ***/ 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; 58 58 59 59 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_; } 62 62 int nrow() const; 63 63 64 64 private: 65 65 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. latex74 casa ::ArrayColumn<casa::String> formattednameCol_; // e.g. latex66 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 75 75 76 76 }; -
trunk/src/STPol.cpp
r904 r3106 43 43 if ( labelmap_.find(type) == labelmap_.end() ) { 44 44 std::string msg = "Illegal polarisation type "+type; 45 throw(casa ::AipsError(msg));45 throw(casacore::AipsError(msg)); 46 46 } else { 47 47 std::map<int, std::string> poltype = labelmap_[type]; 48 48 if ( poltype.find(index) == poltype.end() ) { 49 49 std::string msg = "Illegal polarisation index"; 50 throw(casa ::AipsError(msg));50 throw(casacore::AipsError(msg)); 51 51 } else { 52 52 return poltype[index]; … … 95 95 if ( polmap_.find(key) == polmap_.end() ) { 96 96 std::string msg = "Illegal polarisation type "+key; 97 throw(casa ::AipsError(msg));97 throw(casacore::AipsError(msg)); 98 98 } else { 99 99 return polmap_[key]; -
trunk/src/STPol.h
r2163 r3106 27 27 Convert betweeen the possible polarisations (linear, circular, stokes, stokes2) 28 28 29 @author Malte Marquarding 30 @date $Date:$ 29 @author Malte Marquarding @date $Date:$ 31 30 32 31 */ … … 34 33 public: 35 34 36 typedef void (STPol::*polOperation)( casa ::Float phase );35 typedef void (STPol::*polOperation)( casacore::Float phase ); 37 36 STPol(): totalangle_(0.0),feedhand_(1.0) {} 38 37 virtual ~STPol() {} … … 44 43 { return factories[type]->create(); } 45 44 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 ) 47 46 { 48 47 if (mode == "linear") … … 55 54 return getCircular(index); 56 55 else 57 throw(casa ::AipsError("Polarisation type unknown"));56 throw(casacore::AipsError("Polarisation type unknown")); 58 57 } 59 58 60 virtual casa ::Vector<casa::Float> getCircular( casa::uInt index ) = 0;59 virtual casacore::Vector<casacore::Float> getCircular( casacore::uInt index ) = 0; 61 60 62 virtual casa ::Vector<casa::Float> getStokes( casa::uInt index ) = 0;61 virtual casacore::Vector<casacore::Float> getStokes( casacore::uInt index ) = 0; 63 62 64 virtual casa ::Vector<casa::Float> getLinPol( casa::uInt index ) = 0;63 virtual casacore::Vector<casacore::Float> getLinPol( casacore::uInt index ) = 0; 65 64 66 virtual casa ::Vector<casa::Float> getLinear( casa::uInt index ) = 0;65 virtual casacore::Vector<casacore::Float> getLinear( casacore::uInt index ) = 0; 67 66 68 virtual void rotatePhase( casa ::Float ) {}69 virtual void rotateLinPolPhase( casa ::Float) {}67 virtual void rotatePhase( casacore::Float ) {} 68 virtual void rotateLinPolPhase( casacore::Float) {} 70 69 71 virtual void invertPhase( casa ::Float ) {}70 virtual void invertPhase( casacore::Float ) {} 72 71 73 casa ::uInt nspec() const { return basespectra_.ncolumn(); }72 casacore::uInt nspec() const { return basespectra_.ncolumn(); } 74 73 75 const casa ::Vector<casa::Float> getSpectrum(casa::uInt index) const74 const casacore::Vector<casacore::Float> getSpectrum(casacore::uInt index) const 76 75 { return basespectra_.column(index); } 77 76 78 casa ::Matrix<casa::Float>& getSpectra()77 casacore::Matrix<casacore::Float>& getSpectra() 79 78 { return basespectra_; } 80 79 81 void setSpectra(const casa ::Matrix<casa::Float>& spec)80 void setSpectra(const casacore::Matrix<casacore::Float>& spec) 82 81 { basespectra_.resize(); basespectra_ = spec; } 83 82 84 83 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) 86 85 { totalangle_=totalang;feedhand_=feedhand;} 87 86 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_; } 90 89 91 90 static std::pair<int, std::string> polFromString(const std::string& key); … … 98 97 static std::map<std::string, std::map<int, std::string> > labelmap_; 99 98 100 casa ::Float totalangle_,feedhand_;99 casacore::Float totalangle_,feedhand_; 101 100 std::string mode_; 102 casa ::Matrix<casa::Float> basespectra_;101 casacore::Matrix<casacore::Float> basespectra_; 103 102 104 103 }; -
trunk/src/STPolCircular.cpp
r3080 r3106 17 17 #include "STPolCircular.h" 18 18 19 using namespace casa ;19 using namespace casacore; 20 20 21 21 namespace asap { -
trunk/src/STPolCircular.h
r1353 r3106 40 40 STPolCircular() {} 41 41 42 explicit STPolCircular(const casa ::Matrix<casa::Float>& specs)42 explicit STPolCircular(const casacore::Matrix<casacore::Float>& specs) 43 43 { setSpectra(specs); } 44 44 … … 47 47 static Factory<STPol,STPolCircular> myFactory; 48 48 49 virtual casa ::Vector<casa::Float> getCircular( casa::uInt index );49 virtual casacore::Vector<casacore::Float> getCircular( casacore::uInt index ); 50 50 51 virtual casa ::Vector<casa::Float> getStokes( casa::uInt index);51 virtual casacore::Vector<casacore::Float> getStokes( casacore::uInt index); 52 52 53 virtual casa ::Vector<casa::Float> getLinPol( casa::uInt index);53 virtual casacore::Vector<casacore::Float> getLinPol( casacore::uInt index); 54 54 55 virtual casa ::Vector<casa::Float> getLinear( casa::uInt index );55 virtual casacore::Vector<casacore::Float> getLinear( casacore::uInt index ); 56 56 57 57 }; -
trunk/src/STPolLinear.cpp
r3080 r3106 17 17 #include "STPolLinear.h" 18 18 19 using namespace casa ;19 using namespace casacore; 20 20 21 21 namespace asap { … … 138 138 } 139 139 140 void asap::STPolLinear::rotateLinPolPhase( casa ::Float phase )140 void asap::STPolLinear::rotateLinPolPhase( casacore::Float phase ) 141 141 { 142 142 // -
trunk/src/STPolLinear.h
r1353 r3106 39 39 STPolLinear() {} 40 40 41 explicit STPolLinear(const casa ::Matrix<casa::Float>& specs)41 explicit STPolLinear(const casacore::Matrix<casacore::Float>& specs) 42 42 { setSpectra(specs); } 43 43 … … 46 46 static Factory<STPol,STPolLinear> myFactory; 47 47 48 virtual casa ::Vector<casa::Float> getCircular( casa::uInt index );48 virtual casacore::Vector<casacore::Float> getCircular( casacore::uInt index ); 49 49 50 virtual casa ::Vector<casa::Float> getStokes( casa::uInt index);50 virtual casacore::Vector<casacore::Float> getStokes( casacore::uInt index); 51 51 52 virtual casa ::Vector<casa::Float> getLinPol( casa::uInt index);52 virtual casacore::Vector<casacore::Float> getLinPol( casacore::uInt index); 53 53 54 virtual casa ::Vector<casa::Float> getLinear( casa::uInt index );54 virtual casacore::Vector<casacore::Float> getLinear( casacore::uInt index ); 55 55 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 ); 58 58 59 virtual void invertPhase( casa ::Float phase );59 virtual void invertPhase( casacore::Float phase ); 60 60 61 61 }; -
trunk/src/STPolStokes.cpp
r3080 r3106 17 17 #include "STPolStokes.h" 18 18 19 using namespace casa ;19 using namespace casacore; 20 20 21 21 namespace asap { -
trunk/src/STPolStokes.h
r1353 r3106 28 28 STPolStokes() {} 29 29 30 explicit STPolStokes(const casa ::Matrix<casa::Float>& specs)30 explicit STPolStokes(const casacore::Matrix<casacore::Float>& specs) 31 31 { setSpectra(specs); } 32 32 … … 35 35 static Factory<STPol,STPolStokes> myFactory; 36 36 37 virtual casa ::Vector<casa::Float> getCircular( casa::uInt index );37 virtual casacore::Vector<casacore::Float> getCircular( casacore::uInt index ); 38 38 39 virtual casa ::Vector<casa::Float> getStokes( casa::uInt index);39 virtual casacore::Vector<casacore::Float> getStokes( casacore::uInt index); 40 40 41 virtual casa ::Vector<casa::Float> getLinPol( casa::uInt index);41 virtual casacore::Vector<casacore::Float> getLinPol( casacore::uInt index); 42 42 43 virtual casa ::Vector<casa::Float> getLinear( casa::uInt index );43 virtual casacore::Vector<casacore::Float> getLinear( casacore::uInt index ); 44 44 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 ); 48 48 49 49 }; -
trunk/src/STSelector.cpp
r3084 r3106 22 22 23 23 using namespace asap; 24 using namespace casa ;24 using namespace casacore; 25 25 26 26 STSelector::STSelector() : … … 314 314 } 315 315 316 casa ::Table asap::STSelector::sort( const casa::Table & tab )316 casacore::Table asap::STSelector::sort( const casacore::Table & tab ) 317 317 { 318 318 if (order_.nelements() > 0) { -
trunk/src/STSelector.h
r1930 r3106 62 62 std::vector<std::string> getSortOrder() const; 63 63 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); }; 66 66 67 67 void reset() { intselections_.clear();stringselections_.clear(); taql_ = "";}; … … 80 80 private: 81 81 82 casa ::Table sort(const casa::Table& tab);82 casacore::Table sort(const casacore::Table& tab); 83 83 84 84 typedef std::map<std::string, std::vector<int> > intidmap; … … 88 88 mutable stringidmap stringselections_; 89 89 std::vector<std::string> poltypes_; 90 casa ::Block<casa::String> order_;90 casacore::Block<casacore::String> order_; 91 91 std::string taql_; 92 92 std::vector<int> rowselection_; -
trunk/src/STSideBandSep.cpp
r3092 r3106 32 32 33 33 using namespace std ; 34 using namespace casa ;34 using namespace casacore ; 35 35 using namespace asap ; 36 36 -
trunk/src/STSideBandSep.h
r2976 r3106 28 28 #include "Scantable.h" 29 29 30 using namespace std;31 using namespace casa;32 33 30 namespace asap { 34 31 … … 38 35 * constructors and a destructor 39 36 **/ 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); 43 40 virtual ~STSideBandSep(); 44 41 … … 47 44 * Separate side bands 48 45 **/ 49 void separate(st ring outname);46 void separate(std::string outname); 50 47 51 48 /** 52 49 * Set IFNO and frequency tolerance to select data to process 53 50 **/ 54 void setFrequency(const int ifno, const st ring freqtol,55 const st ring frame="");51 void setFrequency(const int ifno, const std::string freqtol, 52 const std::string frame=""); 56 53 57 54 /** … … 59 56 * The spectra within this range will be averaged before procesing. 60 57 **/ 61 void setDirTolerance(const vector<string> dirtol);58 void setDirTolerance(const std::vector<std::string> dirtol); 62 59 63 60 /** … … 65 62 * of each of scantable. 66 63 **/ 67 void setShift(const vector<double> &shift);64 void setShift(const std::vector<double> &shift); 68 65 69 66 /** … … 91 88 * Set additional information to fill frequencies of image sideband 92 89 **/ 93 void setLO1(const st ring lo1, conststring frame="TOPO",94 const double reftime=-1, st ring refdir="");95 void setLO1Root(const st ring 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); 96 93 97 94 private: … … 101 98 102 99 /** 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=""); 104 101 105 102 /** **/ 106 103 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, 108 105 double &freq0, double &incr, unsigned int &nchan); 109 106 110 107 /** Grid scantable **/ 111 108 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); 115 112 116 113 /** … … 134 131 * TIME by INTERVAL in each row. 135 132 **/ 136 void shiftTimeInGriddedST(const CountedPtr<Scantable> &stab);133 void shiftTimeInGriddedST(const casacore::CountedPtr<Scantable> &stab); 137 134 /** 138 135 * Actual calculation of frequencies of image sideband … … 143 140 * Get LO1 frequency to solve the frequencies of image side band 144 141 **/ 145 bool getLo1FromAsdm(const st ring asdmname,142 bool getLo1FromAsdm(const std::string asdmname, 146 143 const double refval, const double refpix, 147 144 const double increment, const int nChan); 148 bool getLo1FromAsisTab(const st ring msname,145 bool getLo1FromAsisTab(const std::string msname, 149 146 const double refval, const double refpix, 150 147 const double increment, const int nChan); 151 bool getLo1FromScanTab(casa ::CountedPtr< Scantable > &scantab,148 bool getLo1FromScanTab(casacore::CountedPtr< Scantable > &scantab, 152 149 const double refval, const double refpix, 153 150 const double increment, const int nChan); 154 151 // bool getSpectraToSolve(const int polId, const int beamId, 155 152 // const double dirX, const double dirY, 156 // Matrix<float> &specmat, vector<uInt> &tabIdvec);153 // Matrix<float> &specmat, std::vector<casacore::uInt> &tabIdvec); 157 154 bool getSpectraToSolve(const int polId, const int beamId, 158 155 const double dirX, const double dirY, 159 Matrix<float> &specMat,Matrix<bool> &flagMat,160 vector<uInt> &tabIdvec);161 162 vector<float> solve(constMatrix<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, 164 161 const bool signal = true); 165 162 166 Vector<bool> collapseFlag(constMatrix<bool> &flagMat,167 const vector<uInt> &tabIdvec,163 casacore::Vector<bool> collapseFlag(const casacore::Matrix<bool> &flagMat, 164 const std::vector<casacore::uInt> &tabIdvec, 168 165 const bool signal = true); 169 166 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, constvector<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); 185 182 186 183 … … 188 185 /** Member variables **/ 189 186 // input tables 190 vector<string> infileList_;191 vector<CountedPtr<Scantable> > intabList_;187 std::vector<std::string> infileList_; 188 std::vector< casacore::CountedPtr<Scantable> > intabList_; 192 189 unsigned int ntable_; 193 190 // frequency and direction setup to select data. 194 191 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_; 198 195 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_; 201 198 // solution parameters 202 199 bool otherside_, doboth_; … … 204 201 // LO1 205 202 double lo1Freq_; // in Hz 206 MFrequency::Types loFrame_;203 casacore::MFrequency::Types loFrame_; 207 204 double loTime_; 208 st ring loDir_;209 st ring asdmName_, asisName_;205 std::string loDir_; 206 std::string asdmName_, asisName_; 210 207 211 208 //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; 215 212 216 213 }; // class -
trunk/src/STSubTable.cpp
r857 r3106 20 20 21 21 22 using namespace casa ;22 using namespace casacore; 23 23 24 24 namespace asap { 25 25 26 STSubTable::STSubTable( const Scantable& parent, const casa ::String& name )26 STSubTable::STSubTable( const Scantable& parent, const casacore::String& name ) 27 27 { 28 28 TableDesc td("", "1", TableDesc::Scratch); -
trunk/src/STSubTable.h
r2658 r3106 31 31 public: 32 32 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 ); 35 35 36 36 virtual ~STSubTable(); … … 46 46 // -> virtual bool conformant(const STSubTable& other) = 0; 47 47 48 virtual const casa ::String& name() const = 0;48 virtual const casacore::String& name() const = 0; 49 49 50 50 /** … … 53 53 * @return the 'old' IDs 54 54 */ 55 casa ::Vector<casa::uInt> repopulate();55 casacore::Vector<casacore::uInt> repopulate(); 56 56 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_; } 59 59 60 60 protected: 61 casa ::Table table_;62 casa ::ScalarColumn<casa::uInt> idCol_;61 casacore::Table table_; 62 casacore::ScalarColumn<casacore::uInt> idCol_; 63 63 64 64 private: -
trunk/src/STTcal.cpp
r3084 r3106 24 24 25 25 26 using namespace casa ;26 using namespace casacore; 27 27 28 28 namespace asap { 29 29 30 const casa ::String STTcal::name_ = "TCAL";30 const casacore::String STTcal::name_ = "TCAL"; 31 31 32 32 STTcal::STTcal(const Scantable& parent) : … … 46 46 } 47 47 48 asap::STTcal::STTcal( casa ::Table tab ) : STSubTable(tab, name_)48 asap::STTcal::STTcal( casacore::Table tab ) : STSubTable(tab, name_) 49 49 { 50 50 timeCol_.attach(table_,"TIME"); -
trunk/src/STTcal.h
r1353 r3106 31 31 public: 32 32 STTcal() {;} 33 explicit STTcal(casa ::Table tab);33 explicit STTcal(casacore::Table tab); 34 34 explicit STTcal( const Scantable& parent); 35 35 … … 38 38 STTcal& operator=(const STTcal& other); 39 39 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 ); 44 44 45 const casa ::String& name() const { return name_; }45 const casacore::String& name() const { return name_; } 46 46 47 47 private: 48 48 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_; 53 53 }; 54 54 -
trunk/src/STUpgrade.cpp
r2332 r3106 7 7 8 8 9 using namespace casa ;9 using namespace casacore; 10 10 11 11 namespace asap { -
trunk/src/STUpgrade.h
r2321 r3106 27 27 class STUpgrade { 28 28 public: 29 explicit STUpgrade(casa ::uInt version) { version_ = version ;}29 explicit STUpgrade(casacore::uInt version) { version_ = version ;} 30 30 virtual ~STUpgrade() {;} 31 31 … … 36 36 37 37 private: 38 casa ::uInt version_;38 casacore::uInt version_; 39 39 }; 40 40 -
trunk/src/STWeather.cpp
r3084 r3106 22 22 23 23 24 using namespace casa ;24 using namespace casacore; 25 25 26 26 namespace asap { 27 27 28 const casa ::String STWeather::name_ = "WEATHER";28 const casacore::String STWeather::name_ = "WEATHER"; 29 29 30 30 STWeather::STWeather(const Scantable& parent) : … … 35 35 36 36 37 asap::STWeather::STWeather( casa ::Table tab ) : STSubTable(tab, name_)37 asap::STWeather::STWeather( casacore::Table tab ) : STSubTable(tab, name_) 38 38 { 39 39 temperatureCol_.attach(table_,"TEMPERATURE"); -
trunk/src/STWeather.h
r1481 r3106 30 30 public: 31 31 STWeather() {;} 32 explicit STWeather(casa ::Table tab);32 explicit STWeather(casacore::Table tab); 33 33 explicit STWeather(const Scantable& parent); 34 34 … … 37 37 STWeather& operator=(const STWeather& other); 38 38 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); 42 42 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; 47 47 48 const casa ::String& name() const { return name_; }48 const casacore::String& name() const { return name_; } 49 49 50 50 private: 51 51 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_, 56 56 humidityCol_, 57 57 windspeedCol_, windazCol_; -
trunk/src/STWriter.cpp
r3081 r3106 59 59 #include "STWriter.h" 60 60 61 using namespace casa; 61 using namespace casacore; 62 62 63 namespace asap { 63 64 … … 322 323 ++scanit; 323 324 } 324 LogIO os( casa ::LogOrigin("STWriter"));325 LogIO os( casacore::LogOrigin("STWriter")); 325 326 os << "STWriter: wrote " << count << " rows to " << filename 326 << casa ::LogIO::POST;327 << casacore::LogIO::POST; 327 328 328 329 writer_->close(); -
trunk/src/STWriter.h
r2658 r3106 62 62 * @return ststus code from PKSwriter 63 63 */ 64 casa ::Int setFormat(const string& format = "SDFITS");64 casacore::Int setFormat(const string& format = "SDFITS"); 65 65 66 66 /** … … 70 70 * @return 71 71 */ 72 casa ::Int write(const casa::CountedPtr<Scantable> table,72 casacore::Int write(const casacore::CountedPtr<Scantable> table, 73 73 const string& filename); 74 74 75 75 private: 76 casa ::Vector<casa::Float> tsysFromTable(const casa::Table& tab);76 casacore::Vector<casacore::Float> tsysFromTable(const casacore::Table& tab); 77 77 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); 82 82 83 casa ::String getObsTypes( casa::Int srctype ) ;83 casacore::String getObsTypes( casacore::Int srctype ) ; 84 84 85 85 std::string format_; -
trunk/src/STWriterWrapper.h
r1353 r3106 47 47 explicit STWriterWrapper(const string& format = "SDFITS") : STWriter(format) {;} 48 48 49 casa ::Int write(const ScantableWrapper& table, const string &filename) {49 casacore::Int write(const ScantableWrapper& table, const string &filename) { 50 50 return STWriter::write(table.getCP(), filename); 51 51 } -
trunk/src/Scantable.cpp
r3085 r3106 82 82 #define debug 1 83 83 84 using namespace casa ;84 using namespace casacore; 85 85 86 86 namespace asap { … … 540 540 if ( Scantable::factories_.find(feedtype) == Scantable::factories_.end() ) { 541 541 std::string msg = "Illegal feed type "+ feedtype; 542 throw(casa ::AipsError(msg));542 throw(casacore::AipsError(msg)); 543 543 } 544 544 table_.rwKeywordSet().define(String("POLTYPE"), feedtype); … … 863 863 { 864 864 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" ) ); 866 866 } 867 867 Vector<uChar> flgs = flagsCol_(whichrow); … … 963 963 } 964 964 965 const casa ::Table& Scantable::table( ) const965 const casacore::Table& Scantable::table( ) const 966 966 { 967 967 return table_; 968 968 } 969 969 970 casa ::Table& Scantable::table( )970 casacore::Table& Scantable::table( ) 971 971 { 972 972 return table_; … … 1881 1881 1882 1882 void asap::Scantable::reshapeSpectrum( int nmin, int nmax ) 1883 throw( casa ::AipsError )1883 throw( casacore::AipsError ) 1884 1884 { 1885 1885 // assumed that all rows have same nChan … … 1889 1889 // if nmin < 0 or nmax < 0, nothing to do 1890 1890 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." ) ) ; 1892 1892 } 1893 1893 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." ) ) ; 1895 1895 } 1896 1896 … … 1907 1907 // if nmin exceeds nChan, nothing to do 1908 1908 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." ) ) ; 1910 1910 } 1911 1911 … … 5155 5155 const std::vector<bool>& chanMask, 5156 5156 int whichrow, 5157 const casa ::String& coordInfo,5157 const casacore::String& coordInfo, 5158 5158 bool hasSameNchan, 5159 5159 ofstream& ofs, 5160 const casa ::String& funcName,5160 const casacore::String& funcName, 5161 5161 const std::vector<int>& edge, 5162 5162 const std::vector<float>& params, … … 5187 5187 const std::vector<bool>& chanMask, 5188 5188 int whichrow, 5189 const casa ::String& coordInfo,5189 const casacore::String& coordInfo, 5190 5190 bool hasSameNchan, 5191 5191 ofstream& ofs, 5192 const casa ::String& funcName,5192 const casacore::String& funcName, 5193 5193 const std::vector<float>& params, 5194 5194 const int nClipped) … … 5503 5503 } 5504 5504 5505 std::string Scantable::getMaskRangeList(const std::vector<bool>& mask, int whichrow, const casa ::String& coordInfo, bool hasSameNchan, bool verbose)5505 std::string Scantable::getMaskRangeList(const std::vector<bool>& mask, int whichrow, const casacore::String& coordInfo, bool hasSameNchan, bool verbose) 5506 5506 { 5507 5507 if (mask.size() <= 0) { -
trunk/src/Scantable.h
r3090 r3106 57 57 58 58 /** 59 * This class contains and wraps a casa ::Table, which is used to store59 * This class contains and wraps a casacore::Table, which is used to store 60 60 * all the information. This can be either a MemoryTable or a 61 61 * disk based Table. … … 83 83 * Default constructor 84 84 */ 85 explicit Scantable(casa ::Table::TableType ttype = casa::Table::Memory);85 explicit Scantable(casacore::Table::TableType ttype = casacore::Table::Memory); 86 86 87 87 /** … … 90 90 */ 91 91 explicit Scantable(const std::string& name, 92 casa ::Table::TableType ttype = casa::Table::Memory);92 casacore::Table::TableType ttype = casacore::Table::Memory); 93 93 94 94 /// @fixme this is only sensible for MemoryTables.... … … 101 101 102 102 /** 103 * get a const reference to the underlying casa ::Table104 * @return const \ref casa ::Table reference105 */ 106 const casa ::Table& table() const;107 108 /** 109 * get a reference to the underlying casa ::Table with the Selection103 * 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 110 110 * object applied if set 111 * @return casa ::Table reference112 */ 113 casa ::Table& table();111 * @return casacore::Table reference 112 */ 113 casacore::Table& table(); 114 114 115 115 … … 169 169 int nscan() const; 170 170 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; 175 175 176 176 /** 177 177 * Get global antenna position 178 * @return casa ::MPosition179 */ 180 casa ::MPosition getAntennaPosition() const;181 182 /** 183 * the @ref casa ::MDirection for a specific row178 * @return casacore::MPosition 179 */ 180 casacore::MPosition getAntennaPosition() const; 181 182 /** 183 * the @ref casacore::MDirection for a specific row 184 184 * @param[in] whichrow the row number 185 * return casa ::MDirection186 */ 187 casa ::MDirection getDirection( int whichrow ) const;185 * return casacore::MDirection 186 */ 187 casacore::MDirection getDirection( int whichrow ) const; 188 188 189 189 /** … … 249 249 * param[in] rows list of row numbers to be flagged 250 250 */ 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); 252 252 253 253 /** … … 262 262 * (CAS-1807 Wataru Kawasaki) 263 263 */ 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); 265 265 266 266 /** … … 268 268 * about which channel is clipped. 269 269 */ 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); 273 273 274 274 /** … … 347 347 348 348 float getTsys(int whichrow) const 349 { return casa ::Vector<casa::Float>(tsysCol_(whichrow))(0); }349 { return casacore::Vector<casacore::Float>(tsysCol_(whichrow))(0); } 350 350 std::vector<float> getTsysSpectrum(int whichrow) const ; 351 351 … … 400 400 //std::string getTime(int whichrow=-1, bool showdate=true) const; 401 401 std::string getTime(int whichrow=-1, bool showdate=true, 402 casa ::uInt prec=0) const;402 casacore::uInt prec=0) const; 403 403 double getIntTime(int whichrow) const { return integrCol_(whichrow); } 404 404 … … 445 445 void shift(int npix); 446 446 447 casa ::SpectralCoordinate getSpectralCoordinate(int whichrow) const;447 casacore::SpectralCoordinate getSpectralCoordinate(int whichrow) const; 448 448 449 449 void convertDirection(const std::string& newframe); … … 475 475 * @return antenna name string 476 476 */ 477 casa ::String getAntennaName() const;477 casacore::String getAntennaName() const; 478 478 479 479 /** … … 507 507 * 30/07/2008 Takeshi Nakazato 508 508 **/ 509 void reshapeSpectrum( int nmin, int nmax ) throw( casa ::AipsError );509 void reshapeSpectrum( int nmin, int nmax ) throw( casacore::AipsError ); 510 510 void reshapeSpectrum( int nmin, int nmax, int irow ) ; 511 511 … … 522 522 void regridSpecChannel( double dnu, int nchan=-1 ) ; 523 523 524 bool isAllChannelsFlagged(casa ::uInt whichrow);524 bool isAllChannelsFlagged(casacore::uInt whichrow); 525 525 526 526 std::vector<std::string> applyBaselineTable(const std::string& bltable, … … 666 666 static std::vector<bool> getMaskFromMaskList(const int nchan, 667 667 const std::vector<int>& masklist); 668 static casa ::Vector<casa::uInt> getMaskListFromMask(668 static casacore::Vector<casacore::uInt> getMaskListFromMask( 669 669 const std::vector<bool>& mask); 670 670 static std::vector<int> splitToIntList(const std::string& str, … … 677 677 private: 678 678 679 casa ::Matrix<casa::Float> getPolMatrix( casa::uInt whichrow ) const;679 casacore::Matrix<casacore::Float> getPolMatrix( casacore::uInt whichrow ) const; 680 680 681 681 /** … … 684 684 * @return 685 685 */ 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 string694 * @param md an casa ::MDirection686 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 695 695 * @param prec output precision of direction 696 696 * @return 697 697 */ 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; 699 699 700 700 /** … … 702 702 * @return just the name 703 703 */ 704 static casa ::String generateName();704 static casacore::String generateName(); 705 705 706 706 /** … … 710 710 711 711 /** 712 * Set up the main casa ::Table712 * Set up the main casacore::Table 713 713 */ 714 714 void setupMainTable(); … … 724 724 int rowToScanIndex(int therow); 725 725 726 std::vector<uint> getNumbers(const casa ::ScalarColumn<casa::uInt>& col) const;726 std::vector<uint> getNumbers(const casacore::ScalarColumn<casacore::uInt>& col) const; 727 727 728 728 /** … … 733 733 std::size_t nValidMask(const std::vector<bool>& mask); 734 734 735 static const casa ::uInt version_ = 4;735 static const casacore::uInt version_ = 4; 736 736 737 737 STSelector selector_; 738 738 739 casa ::Table::TableType type_;739 casacore::Table::TableType type_; 740 740 741 741 // the actual data 742 casa ::Table table_;743 casa ::Table originalTable_;742 casacore::Table table_; 743 casacore::Table originalTable_; 744 744 745 745 STTcal tcalTable_; … … 752 752 753 753 // 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_; 764 764 765 765 // id in frequencies table 766 casa ::ScalarColumn<casa::uInt> mfreqidCol_;766 casacore::ScalarColumn<casacore::uInt> mfreqidCol_; 767 767 // 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_; 777 777 778 778 static std::map<std::string, STPol::STPolFactory *> factories_; … … 789 789 * 25/10/2009 Wataru Kawasaki 790 790 */ 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&, 793 793 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>&); 797 797 798 798 double getNormalPolynomial(int n, double x); … … 950 950 bool& outTextFile, 951 951 bool& csvFormat, 952 casa ::String& coordInfo,952 casacore::String& coordInfo, 953 953 bool& hasSameNchan, 954 954 const std::string& progressInfo, 955 955 bool& showProgress, 956 956 int& minNRow, 957 casa ::Vector<casa::Double>& timeSecCol);957 casacore::Vector<casacore::Double>& timeSecCol); 958 958 void finaliseBaselining(const bool outBaselineTable, 959 959 STBaselineTable* pbt, … … 968 968 std::string getMaskRangeList(const std::vector<bool>& mask, 969 969 int whichrow, 970 const casa ::String& coordInfo,970 const casacore::String& coordInfo, 971 971 bool hasSameNchan, 972 972 bool verbose=false); … … 976 976 std::vector<bool> getCompositeChanMask(int whichrow, const std::vector<bool>& inMask); 977 977 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); 980 980 void parseProgressInfo(const std::string& progressInfo, bool& showProgress, int& minNRow); 981 981 void showProgressOnTerminal(const int nProcessed, const int nTotal, const bool showProgress=true, const int nTotalThreshold=1000); 982 982 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); 984 984 985 985 double doCalculateModelSelectionCriteria(const std::string& valname, … … 988 988 const std::string& blfunc, 989 989 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); 991 991 std::string packFittingResults(const int irow, const std::vector<float>& params, const float rms); 992 992 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 45 45 { 46 46 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; 49 49 table_ = new Scantable(name, tp); 50 50 } … … 53 53 { 54 54 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; 57 57 table_= new Scantable(tp); 58 58 } 59 59 60 explicit ScantableWrapper(casa ::CountedPtr<Scantable> cp) : table_(cp) {;}60 explicit ScantableWrapper(casacore::CountedPtr<Scantable> cp) : table_(cp) {;} 61 61 62 62 ScantableWrapper(const ScantableWrapper& mt) : … … 105 105 // { return table_->getTime(whichrow); } 106 106 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)); } 108 108 109 109 double getIntTime(int whichrow=0) const … … 134 134 { table_->flag(whichrow, msk, unflag); } 135 135 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) 137 137 { table_->flagRow(rows, unflag); } 138 138 … … 140 140 { return table_->getFlagRow(whichrow); } 141 141 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) 143 143 { table_->clip(uthres, dthres, clipoutside, unflag); } 144 144 145 std::vector<bool> getClipMask(int whichrow, const casa ::Float uthres, const casa::Float dthres, bool clipoutside, bool unflag) const145 std::vector<bool> getClipMask(int whichrow, const casacore::Float uthres, const casacore::Float dthres, bool clipoutside, bool unflag) const 146 146 { return table_->getClipMask(whichrow, uthres, dthres, clipoutside, unflag); } 147 147 … … 236 236 { table_->setDirectionRefString(refstr); } 237 237 238 casa ::CountedPtr<Scantable> getCP() const {return table_;}238 casacore::CountedPtr<Scantable> getCP() const {return table_;} 239 239 Scantable* getPtr() {return &(*table_);} 240 240 … … 343 343 344 344 bool isAllChannelsFlagged(int whichrow=0) const 345 { return table_->isAllChannelsFlagged(casa ::uInt(whichrow)); }345 { return table_->isAllChannelsFlagged(casacore::uInt(whichrow)); } 346 346 347 347 std::vector<float> execFFT(int whichrow, const std::vector<bool>& mask, bool getRealImag=false, bool getAmplitudeOnly=false) … … 362 362 363 363 private: 364 casa ::CountedPtr<Scantable> table_;364 casacore::CountedPtr<Scantable> table_; 365 365 }; 366 366 -
trunk/src/TableTraverse.cpp
r3091 r3106 23 23 //static const char version[] = "$Id$"; 24 24 25 using namespace casa ;25 using namespace casacore; 26 26 27 27 namespace asap { -
trunk/src/TableTraverse.h
r2343 r3106 43 43 // <p>If <src>visit()</src> throws an exception, the iteration stops and 44 44 // <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, 47 47 void const *const colValues[]) = 0; 48 48 … … 55 55 public: 56 56 virtual ~TypeManager() {} 57 virtual casa ::BaseCompare *getComparator() const = 0;57 virtual casacore::BaseCompare *getComparator() const = 0; 58 58 virtual size_t sizeOf() const = 0; 59 59 virtual void *allocArray(size_t size) const = 0; … … 62 62 63 63 // This template is applicable to the type which can be applied to 64 // <src>casa ::ObjCompare<T></src>.64 // <src>casacore::ObjCompare<T></src>. 65 65 template<class T> class TypeManagerImpl: public TypeManager { 66 66 public: 67 67 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; 70 70 return &comparator; 71 71 } … … 100 100 // for each column. <src>columnNames[0]</src> is a primary sort key and 101 101 // <src>columnNames[1]</src> is a secondary sort key, ...</p> 102 void traverseTable(const casa ::Table &table,102 void traverseTable(const casacore::Table &table, 103 103 const char *const columnNames[], 104 104 const TypeManager *const typeManagers[], 105 105 TableVisitor *visitor, 106 casa ::Bool doSort = casa::True);106 casacore::Bool doSort = casacore::True); 107 107 108 108 } -
trunk/src/python_asap.cpp
r3035 r3106 51 51 namespace python { 52 52 53 void translate_ex(const casa ::AipsError& e)53 void translate_ex(const casacore::AipsError& e) 54 54 { 55 55 // Use the Python 'C' API to set up an exception object -
trunk/src/python_asap.h
r2921 r3106 34 34 namespace asap { 35 35 namespace python { 36 void translate_ex(const casa ::AipsError& e);36 void translate_ex(const casacore::AipsError& e); 37 37 #ifdef ENABLE_PLOTTER2 38 38 void python_Plotter2();
Note:
See TracChangeset
for help on using the changeset viewer.