Changeset 2907 for trunk/external-alma/atnf/PKSIO
- Timestamp:
- 03/21/14 05:25:31 (11 years ago)
- Location:
- trunk/external-alma/atnf/PKSIO
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/atnf/PKSIO/GBTFITSreader.cc
r1868 r2907 1848 1848 1849 1849 // Convert frequency reference to LSRK if GBT TOPO 1850 if ( cGBT ) {1850 if ( cGBT && numHDU > 1 ) { 1851 1851 char sampler[10]; 1852 1852 readData(SAMPLER,cRowR,sampler); -
trunk/external-alma/atnf/PKSIO/PKSreader.cc
r2579 r2907 78 78 } else { 79 79 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 97 109 } else { 98 110 // Assume it's MBFITS.
Note:
See TracChangeset
for help on using the changeset viewer.