Changeset 2200 for trunk/external-alma


Ignore:
Timestamp:
06/23/11 18:02:32 (14 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-2819

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Equinox is always 2000.0 since direction is converted to J2000.

Bug fix on conversion from AZEL to J2000.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/atnf/PKSIO/NROReader.cc

    r2198 r2200  
    3939#include <atnf/PKSIO/ASTEDataset.h>
    4040
     41#include <measures/Measures/MEpoch.h>
     42#include <measures/Measures/MPosition.h>
    4143#include <measures/Measures/MDirection.h>
    4244#include <measures/Measures/MCDirection.h>
     45#include <measures/Measures/MeasFrame.h>
    4346#include <measures/Measures/MeasConvert.h>
    4447
     
    359362  else if ( icoord == 2 ) {
    360363    // convert from AZEL to RADEC
     364    vector<double> antpos = getAntennaPosition() ;
     365    Vector<Quantity> qantpos( 3 ) ;
     366    for ( int ip = 0 ; ip < 3 ; ip++ )
     367      qantpos[ip] = Quantity( antpos[ip], "m" ) ;
     368    Double scantime = Double( dataset_->getScanTime( i ) ) ;
     369    MEpoch me( Quantity( scantime, "d" ), MEpoch::UTC ) ;
     370    MPosition mp( MVPosition( qantpos ), MPosition::ITRF ) ;
     371    MeasFrame mf( me, mp ) ;
    361372    MDirection result =
    362373      MDirection::Convert( MDirection( Quantity( dirx, "rad" ),
    363374                                       Quantity( diry, "rad" ),
    364375                                       MDirection::Ref( MDirection::AZEL ) ),
    365                            MDirection::Ref( MDirection::J2000 ) ) () ;
     376                           MDirection::Ref( MDirection::J2000, mf ) ) () ;
    366377    v = result.getAngle().getValue() ;
    367378    //cout << "NROReader::getDirection()  DIRECTION convert from ("
     
    441452  //cout << "antpos = " << antpos << endl ;
    442453  string eq = dataset_->getEPOCH() ;
    443   if ( eq.compare( 0, 5, "B1950" ) == 0 )
    444     equinox = 1950.0 ;
    445   else if ( eq.compare( 0, 5, "J2000" ) == 0 )
    446     equinox = 2000.0 ;
     454//   if ( eq.compare( 0, 5, "B1950" ) == 0 )
     455//     equinox = 1950.0 ;
     456//   else if ( eq.compare( 0, 5, "J2000" ) == 0 )
     457//     equinox = 2000.0 ;
     458  // equinox is always 2000.0
     459  equinox = 2000.0 ;
    447460  //cout << "equinox = " << equinox << endl ;
    448461  string vref = dataset_->getVREF() ;
Note: See TracChangeset for help on using the changeset viewer.