Changeset 2907 for trunk/external-alma


Ignore:
Timestamp:
03/21/14 05:25:31 (11 years ago)
Author:
TakTsutsumi
Message:

New Development: No

JIRA Issue: Yes CAS-6303

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: test_sdsave

Put in Release Notes: No

Module(s): Module Names change impacts.

Description: Modified the way search the FITS header keywords

allowing more random ordering.
Fixed GBTFITSreader to work for GBT SDFITS with a single
binary table and a minor fix in PKSFiller side to force
npol=1 when pksrecord.polno = -1.


Location:
trunk/external-alma/atnf/PKSIO
Files:
2 edited

Legend:

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

    r1868 r2907  
    18481848
    18491849  // Convert frequency reference to LSRK if GBT TOPO
    1850   if ( cGBT ) {
     1850  if ( cGBT && numHDU > 1 ) {
    18511851    char sampler[10];
    18521852    readData(SAMPLER,cRowR,sampler);
  • trunk/external-alma/atnf/PKSIO/PKSreader.cc

    r2579 r2907  
    7878    } else {
    7979      RegularFileIO file(name);
    80       char buf[32];
    81       file.read(30, buf, False);
    82       buf[30] = '\0';
    83       if (String(buf) == "SIMPLE  =                    T") {
    84         file.seek(560);
    85         file.read(26, buf, False);
    86         buf[26] = '\0' ;
    87         if ( String(buf) == "ORIGIN  = 'NRAO Green Bank" ) {
    88           // Looks like GBT SDFITS
    89           format = "GBTFITS" ;
    90           reader = new PKSFITSreader("GBTFITS") ;
    91         }
    92         else {
    93           // Looks like SDFITS.
    94           format = "SDFITS";
    95           reader = new PKSFITSreader("SDFITS");
    96         }
     80      //char buf[32];
     81      char buf[80];
     82      //file.read(30, buf, False);
     83      file.read(80, buf, False);
     84      //buf[30] = '\0';
     85      //if (String(buf) == "SIMPLE  =                    T") {
     86      if (String(buf).contains("SIMPLE  =                    T")) {
     87        //file.seek(560);
     88        //file.read(26, buf, False);
     89        //buf[26] = '\0' ;
     90        Int nbread=1;
     91        while (nbread) {
     92          nbread=file.read(80, buf, False);
     93        //if ( String(buf) == "ORIGIN  = 'NRAO Green Bank" ) {
     94          if ( String(buf).contains("ORIGIN  = 'NRAO Green Bank" )) {
     95            // Looks like GBT SDFITS
     96            format = "GBTFITS" ;
     97            reader = new PKSFITSreader("GBTFITS") ;
     98            break;
     99          }
     100          else {
     101            if ( String(buf).find("END ")==0 ) {
     102              // Looks like SDFITS.
     103              format = "SDFITS";
     104              reader = new PKSFITSreader("SDFITS");
     105              break;
     106            }
     107          }
     108        }//while loop 
    97109       } else {
    98110         // Assume it's MBFITS.
Note: See TracChangeset for help on using the changeset viewer.