Ignore:
Timestamp:
07/08/11 11:37:22 (13 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...

Update of channel frequency calculation according to a documentation
from NRO.


File:
1 edited

Legend:

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

    r2202 r2212  
    687687  //cout << "NRODataset::getFrequencies()  ib = " << ib << endl ;
    688688
    689 //   if ( strncmp( record->ARRYT, "X", 1 ) == 0 ) {
    690 //     // FX
    691 //     if ( strncmp( (record->ARRYT)+1, "1", 1 ) == 0
    692 //          || strncmp( (record->ARRYT)+1, "3", 1 ) ) {
    693 //       // FX1, 3
    694 //       ia = 2 ;
    695 //     }
    696 //     else {
    697 //       // FX2, 4
    698 //       ia = 1 ;
    699 //     }
    700 //   }
    701 //   else if ( strncmp( record->ARRYT, "A", 1 ) == 0 )
    702 //     ia = 2 ;  // AC
    703 //   else if ( strncmp( record->ARRYT, "W", 1 ) == 0 ) {
    704 //     // AOS-W   
    705 //     ia = 2 ; 
    706 //     isAOS = true ;
    707 //   }
    708 //   else if ( strncmp( record->ARRYT, "U", 1 ) == 0 ) {
    709 //     // AOS-U
    710 //     ia = 2 ; 
    711 //     isAOS = true ;
    712 //   }
    713 //   else if ( strncmp( record->ARRYT, "H", 1 ) == 0 ) {
    714 //     // AOS-H
    715 //     isAOS = true ;
    716 //     //cout << record->ARRYT << " " <<  strlen(record->ARRYT) << endl ;
    717 //     //cout << (record->ARRYT)+1 << endl ;
    718 //     if ( strncmp( (record->ARRYT)+2, " ", 1 ) == 0 ) {
    719 //       // H1-9
    720 //       if ( strncmp( (record->ARRYT)+1, "9", 1 ) == 0 ) {
    721 //         // H9
    722 //         ia = 2 ;
    723 //       }
    724 //       else {
    725 //         // H1-8
    726 //         ia = 1 ;
    727 //       }
    728 //     }
    729 //     else {
    730 //       // H10-16
    731 //       ia = 2 ;
    732 //     }
    733 //   }
    734689  if ( arryt[0] == 'W' || arryt[0] == 'U' || arryt[0] == 'H' )
    735690    isAOS = true ;
     
    802757  }
    803758  else {
    804     cw = getBERES()[ib] ;
    805 
    806     if ( !isUSB )
     759
     760    cw = ( freqs[1] - freqs[0] )
     761      / ( chcal[1] - chcal[0] ) ;   
     762
     763    if ( isUSB ) {
     764      // channel frequency inversion
    807765      cw *= -1.0 ;
     766      Double tmp = freqs[1] ;
     767      freqs[1] = freqs[0] ;
     768      freqs[0] = tmp ;
     769    }
    808770   
    809     if ( cw == 0.0 ) {
    810       cw = ( freqs[1] - freqs[0] )
    811         / ( chcal[1] - chcal[0] ) ;
    812     }
    813 
    814771    v[0] = chcal[0] - 1 ; // 0-base
    815772    v[1] = freqs[0] ;
Note: See TracChangeset for help on using the changeset viewer.