Changeset 2755 for trunk/external-alma/asdm2ASAP
- Timestamp:
- 01/31/13 16:39:48 (12 years ago)
- Location:
- trunk/external-alma/asdm2ASAP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/asdm2ASAP/ASDMReader.cc
r2705 r2755 48 48 corrMode_.reset() ; 49 49 timeSampling_.reset() ; 50 initConvert() ; 50 51 } 51 52 … … 224 225 for ( casa::uInt i = 0 ; i < 3 ; i++ ) 225 226 antennaPosition_[i] = Quantity( casa::Double( antpos[i].get() ), Unit( "m" ) ) ; 227 mp_ = casa::MPosition( casa::MVPosition( antennaPosition_ ), 228 casa::MPosition::ITRF ) ; 229 mf_.set( mp_ ) ; 226 230 227 231 // create SDMBinData object … … 887 891 String ref( CDirectionReferenceCode::toString( dircode ) ) ; 888 892 double mjd = vmsData_->v_time[dataIndex_] * s2d ; 889 srcdir = toJ2000( srcdir, ref, mjd , antennaPosition_) ;893 srcdir = toJ2000( srcdir, ref, mjd ) ; 890 894 } 891 895 } … … 1670 1674 } 1671 1675 1672 toJ2000( dir, az, el, tcen , antennaPosition_) ;1676 toJ2000( dir, az, el, tcen ) ; 1673 1677 } 1674 1678 … … 1694 1698 double &az, 1695 1699 double &el, 1696 double &mjd, 1697 casa::Vector<casa::Quantity> &antpos ) 1698 // casa::Vector<casa::Double> antpos ) 1700 double &mjd ) 1699 1701 { 1700 1702 String funcName = "toJ2000" ; … … 1704 1706 azel[0] = az ; 1705 1707 azel[1] = el ; 1706 dir = toJ2000( azel, ref, mjd , antpos) ;1708 dir = toJ2000( azel, ref, mjd ) ; 1707 1709 } 1708 1710 1709 1711 vector<double> ASDMReader::toJ2000( vector<double> &dir, 1710 1712 casa::String &dirref, 1711 double &mjd, 1712 casa::Vector<casa::Quantity> &antpos ) 1713 // casa::Vector<casa::Double> antpos ) 1713 double &mjd ) 1714 1714 { 1715 1715 casa::String funcName = "toJ2000" ; … … 1717 1717 vector<double> newd( dir ) ; 1718 1718 if ( dirref != "J2000" ) { 1719 casa::MEpoch me( casa::Quantity( (casa::Double)mjd, "d" ), casa::MEpoch::UTC ) ; 1720 casa::MPosition mp( casa::MVPosition( antpos ), 1721 casa::MPosition::ITRF ) ; 1722 //ostringstream oss ; 1723 //mp.print( oss ) ; 1724 //logsink_->postLocally( LogMessage(oss.str(),LogOrigin(className_,funcName,WHERE)) ) ; 1725 1726 casa::MeasFrame mf( me, mp ) ; 1719 me_ = casa::MEpoch( casa::Quantity( (casa::Double)mjd, "d" ), casa::MEpoch::UTC ) ; 1720 mf_.set( me_ ) ; 1727 1721 casa::MDirection::Types dirtype ; 1728 1722 casa::Bool b = casa::MDirection::getType( dirtype, dirref ) ; 1729 1723 if ( b ) { 1730 casa::MDirection::Convert toj2000( dirtype, 1731 casa::MDirection::Ref( casa::MDirection::J2000, mf ) ) ; 1732 casa::Vector<casa::Double> cdir = toj2000( dir ).getAngle( "rad" ).getValue() ; 1724 casa::Vector<casa::Double> cdir = toj2000_( dir ).getAngle( "rad" ).getValue() ; 1733 1725 //logsink_->postLocally( LogMessage("cdir = "+String::toString(cdir),LogOrigin(className_,funcName,WHERE)) ) ; 1734 1726 newd[0] = (double)(cdir[0]) ; … … 1896 1888 return dir ; 1897 1889 } 1890 1891 void ASDMReader::initConvert() 1892 { 1893 toj2000_ = MDirection::Convert(MDirection::AZELGEO, 1894 MDirection::Ref(MDirection::J2000, mf_)); 1895 } -
trunk/external-alma/asdm2ASAP/ASDMReader.h
r2301 r2755 10 10 #include <ASDMAll.h> 11 11 #include <SDMBinData.h> 12 13 class casa::MDirection; 14 class casa::MeasFrame; 15 class casa::MPosition; 16 class casa::MEpoch; 12 17 13 18 class ASDMReader … … 489 494 double &az, 490 495 double &el, 491 double &mjd, 492 casa::Vector<casa::Quantity> &antpos ) ; 493 496 double &mjd ) ; 494 497 /** 495 498 * to J2000 … … 503 506 std::vector<double> toJ2000( std::vector<double> &dir, 504 507 casa::String &dirref, 505 double &mjd ,506 casa::Vector<casa::Quantity> &antpos ) ; 508 double &mjd ) ; 509 507 510 /** 508 511 * get nIF … … 537 540 **/ 538 541 std::vector< std::vector<double> > pointingDir( asdm::PointingRow *row ) ; 542 543 /** 544 * initialize conversion engine 545 **/ 546 void initConvert() ; 539 547 540 548 asdm::ASDM *asdm_ ; // pointer to ASDM object … … 606 614 // time 607 615 asdm::ArrayTimeInterval timeInterval_ ; 616 617 casa::MDirection::Convert toj2000_ ; 618 casa::MeasFrame mf_ ; 619 casa::MPosition mp_ ; 620 casa::MEpoch me_ ; 608 621 } ; 609 622 #endif // ASAP_ASDM_READER_H
Note:
See TracChangeset
for help on using the changeset viewer.