Changeset 1967 for trunk/src


Ignore:
Timestamp:
12/14/10 19:31:05 (14 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

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...

Changed a way to get time information from the data.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMath.cpp

    r1907 r1967  
    42794279      }
    42804280      else {
    4281         double t0 = getMJD( s->getTime( idx[0] ) ) ;
    4282         double t1 = getMJD( s->getTime( idx[1] ) ) ;
     4281        //double t0 = getMJD( s->getTime( idx[0] ) ) ;
     4282        //double t1 = getMJD( s->getTime( idx[1] ) ) ;
     4283        double t0 = s->getEpoch( idx[0] ).get( Unit( "d" ) ).getValue() ;
     4284        double t1 = s->getEpoch( idx[1] ).get( Unit( "d" ) ).getValue() ;
    42834285        double tref = getMJD( reftime ) ;
    42844286        if ( abs( t0 - tref ) > abs( t1 - tref ) ) {
     
    43174319        // do interpolation
    43184320        //os << "interpolate between " << idx[0] << " and " << idx[1] << " (scanno: " << s->getScan( idx[0] ) << ", " << s->getScan( idx[1] ) << ")" << LogIO::POST ;
    4319         double t0 = getMJD( s->getTime( idx[0] ) ) ;
    4320         double t1 = getMJD( s->getTime( idx[1] ) ) ;
     4321        //double t0 = getMJD( s->getTime( idx[0] ) ) ;
     4322        //double t1 = getMJD( s->getTime( idx[1] ) ) ;
     4323        double t0 = s->getEpoch( idx[0] ).get( Unit( "d" ) ).getValue() ;
     4324        double t1 = s->getEpoch( idx[1] ).get( Unit( "d" ) ).getValue() ;
    43214325        double tref = getMJD( reftime ) ;
    43224326        vector<float> sp0 = s->getSpectrum( idx[0] ) ;
     
    44594463      }
    44604464      else {
    4461         double t0 = getMJD( s->getTime( idx[0] ) ) ;
    4462         double t1 = getMJD( s->getTime( idx[1] ) ) ;
     4465        //double t0 = getMJD( s->getTime( idx[0] ) ) ;
     4466        //double t1 = getMJD( s->getTime( idx[1] ) ) ;
     4467        double t0 = s->getEpoch( idx[0] ).get( Unit( "d" ) ).getValue() ;
     4468        double t1 = s->getEpoch( idx[1] ).get( Unit( "d" ) ).getValue() ;
    44634469        double tref = getMJD( reftime ) ;
    44644470        if ( abs( t0 - tref ) > abs( t1 - tref ) ) {
     
    45054511        // do interpolation
    45064512        //os << "interpolate between " << idx[0] << " and " << idx[1] << " (scanno: " << s->getScan( idx[0] ) << ", " << s->getScan( idx[1] ) << ")" << LogIO::POST ;
    4507         double t0 = getMJD( s->getTime( idx[0] ) ) ;
    4508         double t1 = getMJD( s->getTime( idx[1] ) ) ;
     4513        //double t0 = getMJD( s->getTime( idx[0] ) ) ;
     4514        //double t1 = getMJD( s->getTime( idx[1] ) ) ;
     4515        double t0 = s->getEpoch( idx[0] ).get( Unit( "d" ) ).getValue() ;
     4516        double t1 = s->getEpoch( idx[1] ).get( Unit( "d" ) ).getValue() ;
    45094517        double tref = getMJD( reftime ) ;
    45104518        vector<float> tcal0 ;
     
    45894597      }
    45904598      else {
    4591         double t0 = getMJD( s->getTime( idx[0] ) ) ;
    4592         double t1 = getMJD( s->getTime( idx[1] ) ) ;
     4599        //double t0 = getMJD( s->getTime( idx[0] ) ) ;
     4600        //double t1 = getMJD( s->getTime( idx[1] ) ) ;
     4601        double t0 = s->getEpoch( idx[0] ).get( Unit( "d" ) ).getValue() ;
     4602        double t1 = s->getEpoch( idx[1] ).get( Unit( "d" ) ).getValue() ;
    45934603        double tref = getMJD( reftime ) ;
    45944604        if ( abs( t0 - tref ) > abs( t1 - tref ) ) {
     
    46314641        // do interpolation
    46324642        //os << "interpolate between " << idx[0] << " and " << idx[1] << " (scanno: " << s->getScan( idx[0] ) << ", " << s->getScan( idx[1] ) << ")" << LogIO::POST ;
    4633         double t0 = getMJD( s->getTime( idx[0] ) ) ;
    4634         double t1 = getMJD( s->getTime( idx[1] ) ) ;
     4643        //double t0 = getMJD( s->getTime( idx[0] ) ) ;
     4644        //double t1 = getMJD( s->getTime( idx[1] ) ) ;
     4645        double t0 = s->getEpoch( idx[0] ).get( Unit( "d" ) ).getValue() ;
     4646        double t1 = s->getEpoch( idx[1] ).get( Unit( "d" ) ).getValue() ;
    46354647        double tref = getMJD( reftime ) ;
    46364648        vector<float> tsys0 ;
Note: See TracChangeset for help on using the changeset viewer.