Changeset 2907
- Timestamp:
- 03/21/14 05:25:31 (11 years ago)
- Location:
- trunk
- Files:
-
- 3 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. -
trunk/src/PKSFiller.cpp
r2268 r2907 326 326 // Why is spectra.ncolumn() == 3 for haveXPol_ == True 327 327 uInt npol = (pksrec.spectra.ncolumn()==1 ? 1: 2); 328 uInt polno =0; 328 //uInt polno =0; 329 Int polno =0; 329 330 for ( uInt i=0; i< npol; ++i ) { 330 331 tsysvec = pksrec.tsys(i); 331 332 if (isGBTFITS) { 332 333 polno = pksrec.polNo ; 334 if (polno==-1) { 335 polno = i; 336 } 333 337 } else { 334 338 polno = i; 335 339 } 336 setIndex(pksrec.scanNo-1, pksrec.cycleNo-1, pksrec.IFno-1, polno,340 setIndex(pksrec.scanNo-1, pksrec.cycleNo-1, pksrec.IFno-1, (uInt) polno, 337 341 pksrec.beamNo-1); 338 342 setSpectrum(pksrec.spectra.column(i), pksrec.flagged.column(i), tsysvec);
Note:
See TracChangeset
for help on using the changeset viewer.