Changeset 1372 for trunk/external/atnf/PKSIO
- Timestamp:
- 07/09/07 11:34:03 (17 years ago)
- Location:
- trunk/external/atnf/PKSIO
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external/atnf/PKSIO/MBFITSreader.cc
r1325 r1372 27 27 //# AUSTRALIA 28 28 //# 29 //# $Id: MBFITSreader.cc,v 19.3 2 2007/01/30 23:40:30cal103 Exp $29 //# $Id: MBFITSreader.cc,v 19.34 2007/07/02 06:12:18 cal103 Exp $ 30 30 //#--------------------------------------------------------------------------- 31 31 //# The MBFITSreader class reads single dish RPFITS files (such as Parkes … … 132 132 133 133 if (jstat) { 134 fprintf(stderr, " Failed to open MBFITS file: %s\n", rpname);134 fprintf(stderr, "ERROR, failed to open MBFITS file: %s\n", rpname); 135 135 return 1; 136 136 } … … 152 152 153 153 if (jstat) { 154 fprintf(stderr, " Failed to read MBFITS header: %s\n", rpname);154 fprintf(stderr, "ERROR, failed to read MBFITS header: %s\n", rpname); 155 155 close(); 156 156 return 1; … … 160 160 cMopra = strncmp(names_.instrument, "ATMOPRA", 7) == 0; 161 161 162 // Tidbinbilla data has some more. 163 cTid = strncmp(names_.sta, "tid", 3) == 0; 164 if (cTid) { 165 // Telescope position is stored in the source table. 162 // Non-ATNF data may not store the position in (u,v,w). 163 if (strncmp(names_.sta, "tid", 3) == 0) { 164 fprintf(stderr, "WARNING, found Tidbinbilla data"); 165 cSUpos = 1; 166 } else if (strncmp(names_.sta, "HOB", 3) == 0) { 167 fprintf(stderr, "WARNING, found Hobart data"); 168 cSUpos = 1; 169 } else if (strncmp(names_.sta, "CED", 3) == 0) { 170 fprintf(stderr, "WARNING, found Ceduna data"); 171 cSUpos = 1; 172 } else { 173 cSUpos = 0; 174 } 175 176 if (cSUpos) { 177 fprintf(stderr, ", using telescope position from SU table.\n"); 166 178 cInterp = 0; 167 179 } … … 177 189 178 190 if (cNBeam <= 0) { 179 fprintf(stderr, " Couldn't determine number of beams.\n");191 fprintf(stderr, "ERROR, couldn't determine number of beams.\n"); 180 192 close(); 181 193 return 1; … … 279 291 // Read the first syscal record. 280 292 if (rpget(1, cEOS)) { 281 fprintf(stderr, "E rror: Failed to read first syscal record.\n");293 fprintf(stderr, "ERROR, failed to read first syscal record.\n"); 282 294 close(); 283 295 return 1; … … 314 326 { 315 327 if (!cMBopen) { 316 fprintf(stderr, " An MBFITS file has not been opened.\n");328 fprintf(stderr, "ERROR, an MBFITS file has not been opened.\n"); 317 329 return 1; 318 330 } … … 436 448 437 449 if (!cMBopen) { 438 fprintf(stderr, " An MBFITS file has not been opened.\n");450 fprintf(stderr, "ERROR, an MBFITS file has not been opened.\n"); 439 451 return 1; 440 452 } … … 564 576 565 577 if (cNBin > 1 && cNBeamSel > 1) { 566 fprintf(stderr, " Cannot handle binning mode for multiple "578 fprintf(stderr, "ERROR, cannot handle binning mode for multiple " 567 579 "beams.\n"); 568 580 close(); … … 891 903 } 892 904 905 // Sanity check on incomplete integrations within a scan. 906 if (iMBuff->nIF && (iMBuff->cycleNo != cCycleNo)) { 907 // Force the incomplete integration to be flushed before proceeding. 908 cFlushing = 1; 909 continue; 910 } 911 893 912 iMBuff->scanNo = cScanNo; 894 913 iMBuff->cycleNo = cCycleNo; … … 929 948 930 949 // Beam position at the specified time. 931 if (c Tid) {932 // Tidbinbilla data.950 if (cSUpos) { 951 // Non-ATNF data that does not store the position in (u,v,w). 933 952 iMBuff->ra = doubles_.su_ra[cSrcNo-1]; 934 953 iMBuff->dec = doubles_.su_dec[cSrcNo-1]; … … 1211 1230 } 1212 1231 1213 fprintf(stderr, " RPFITS read failed too many times.\n");1232 fprintf(stderr, "ERROR, RPFITS read failed too many times.\n"); 1214 1233 return 2; 1215 1234 } -
trunk/external/atnf/PKSIO/MBFITSreader.h
r1325 r1372 27 27 //# AUSTRALIA 28 28 //# 29 //# $Id: MBFITSreader.h,v 19.1 2 2007/01/30 23:40:30cal103 Exp $29 //# $Id: MBFITSreader.h,v 19.13 2007/07/02 06:11:22 cal103 Exp $ 30 30 //#--------------------------------------------------------------------------- 31 31 //# The MBFITSreader class reads single dish RPFITS files (such as Parkes … … 113 113 char cDateObs[10]; 114 114 int *cBeamSel, *cChanOff, cFirst, *cIFSel, cInterp, cIntTime, cMBopen, 115 cMopra, cNBeamSel, cNBin, cRetry, *cStaleness, c Tid, *cXpolOff;115 cMopra, cNBeamSel, cNBin, cRetry, *cStaleness, cSUpos, *cXpolOff; 116 116 117 117 // The data has to be bufferred to allow positions to be interpolated.
Note:
See TracChangeset
for help on using the changeset viewer.