Changeset 1654


Ignore:
Timestamp:
10/28/09 18:42:21 (15 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-1683

Ready to Release: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: read/write GBT SDFITS data

Put in Release Notes: No

Module(s): atnf

Description: Describe your changes here...

Changes concurrent with modifications in atnf PKSIO modules, which
is several bug fixes for reading/writing GBT SDFITS data.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/src/STFiller.cpp

    r1616 r1654  
    312312  PKSrecord pksrec;
    313313  int n = 0;
     314  bool isGBTFITS = false ;
     315  if ((header_->antennaname.find( "GBT" ) != String::npos) && File(filename_).isRegular()) {
     316    FILE *fp = fopen( filename_.c_str(), "r" ) ;
     317    fseek( fp, 640, SEEK_SET ) ;
     318    char buf[81] ;
     319    fread( buf, 80, 1, fp ) ;
     320    buf[80] = '\0' ;
     321    if ( strstr( buf, "NRAO_GBT" ) != NULL ) {
     322      isGBTFITS = true ;
     323    }
     324    fclose( fp ) ;
     325  }
    314326  while ( status == 0 ) {
    315327    status = reader_->read(pksrec);
     
    418430      tsysvec = pksrec.tsys(i);
    419431      *tsysCol = tsysvec;
    420       *polnoCol = i;
     432      if (isGBTFITS)
     433        *polnoCol = pksrec.polNo ;
     434      else
     435        *polnoCol = i;
    421436
    422437      *specCol = pksrec.spectra.column(i);
Note: See TracChangeset for help on using the changeset viewer.