Changeset 28559
- Timestamp:
- Jun 30, 2010, 10:05:23 AM (16 years ago)
- Location:
- trunk/ippToPsps/src
- Files:
-
- 3 edited
-
ippToPspsBatchDetection.c (modified) (4 diffs)
-
ippToPspsBatchTest.c (modified) (2 diffs)
-
ippToPspsConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/ippToPspsBatchDetection.c
r28529 r28559 57 57 status=0; fits_read_key(fitsIn, TDOUBLE, "MJD-OBS", &expStart, NULL, &status); 58 58 status=0; fits_read_key(fitsIn, TDOUBLE, "EXPTIME", &expTime, NULL, &status); 59 obsTime = expStart + (expTime/172800 ); // exp start plus half exp time (converted from secs to days)59 obsTime = expStart + (expTime/172800.0); // exp start plus half exp time (converted from secs to days) 60 60 61 61 ippToPspsConfig_writeTable(this->config, fitsIn, this->fitsOut, 1, "FrameMeta", true); … … 161 161 long removeList[MAXDETECT]; 162 162 long thisObjId; 163 bool firstTimeIn = true; 164 int ippIDetNum, instMagNum, instMagErrNum, peakMagNum; 163 165 164 166 // loop round all 60 chips … … 251 253 s = d = totalDetections = invalidDvoRows = smfJumps = unmatched = 0; 252 254 255 // determine column numbers for certain IPP detection columns 256 if (firstTimeIn) { 257 258 status=0;fits_get_colnum(fitsIn, CASESEN, "IPP_IDET", &ippIDetNum, &status); 259 if (status) psError(PS_ERR_IO, false, "Unable to read col num for IPP_IDET"); 260 status=0;fits_get_colnum(fitsIn, CASESEN, "PSF_INST_MAG", &instMagNum, &status); 261 if (status) psError(PS_ERR_IO, false, "Unable to read col num for PSF_INST_MAG"); 262 status=0;fits_get_colnum(fitsIn, CASESEN, "PSF_INST_MAG_SIG", &instMagErrNum, &status); 263 if (status) psError(PS_ERR_IO, false, "Unable to read col num for PSF_INST_MAG_SIG"); 264 status=0;fits_get_colnum(fitsIn, CASESEN, "PEAK_FLUX_AS_MAG", &peakMagNum, &status); 265 if (status) psError(PS_ERR_IO, false, "Unable to read col num for PEAK_FLUX_AS_MAG"); 266 267 firstTimeIn=false; 268 } 269 253 270 anynull = 0; 254 fits_read_col(fitsIn, TLONG, 1, 1, 1, nDet, &longnull, ippIDet, &anynull, &status);255 fits_read_col(fitsIn, TFLOAT, 8, 1, 1, nDet, &floatnull, instMag, &anynull, &status);256 fits_read_col(fitsIn, TFLOAT, 9, 1, 1, nDet, &floatnull, instMagErr, &anynull, &status);257 fits_read_col(fitsIn, TFLOAT, 12, 1, 1, nDet, &floatnull, peakMag, &anynull, &status);271 fits_read_col(fitsIn, TLONG, ippIDetNum, 1, 1, nDet, &longnull, ippIDet, &anynull, &status); 272 fits_read_col(fitsIn, TFLOAT, instMagNum, 1, 1, nDet, &floatnull, instMag, &anynull, &status); 273 fits_read_col(fitsIn, TFLOAT, instMagErrNum, 1, 1, nDet, &floatnull, instMagErr, &anynull, &status); 274 fits_read_col(fitsIn, TFLOAT, peakMagNum, 1, 1, nDet, &floatnull, peakMag, &anynull, &status); 258 275 259 276 // DVO detections are ordered by IPP_IDET, which increments from 0 in SMF table … … 405 422 } 406 423 407 -
trunk/ippToPsps/src/ippToPspsBatchTest.c
r28531 r28559 138 138 long removeList[MAXDETECT]; 139 139 long thisObjId; 140 bool firstTimeIn = true; 141 int ippIDetNum, instMagNum, instMagErrNum, peakMagNum; 140 142 141 143 // loop round all 60 chips … … 222 224 s = d = totalDetections = invalidDvoRows = smfJumps = unmatched = 0; 223 225 226 // determine column numbers for certain IPP detection columns 227 if (firstTimeIn) { 228 229 status=0;fits_get_colnum(fitsIn, CASESEN, "IPP_IDET", &ippIDetNum, &status); 230 if (status) psError(PS_ERR_IO, false, "Unable to read col num for IPP_IDET"); 231 status=0;fits_get_colnum(fitsIn, CASESEN, "PSF_INST_MAG", &instMagNum, &status); 232 if (status) psError(PS_ERR_IO, false, "Unable to read col num for PSF_INST_MAG"); 233 status=0;fits_get_colnum(fitsIn, CASESEN, "PSF_INST_MAG_SIG", &instMagErrNum, &status); 234 if (status) psError(PS_ERR_IO, false, "Unable to read col num for PSF_INST_MAG_SIG"); 235 status=0;fits_get_colnum(fitsIn, CASESEN, "PEAK_FLUX_AS_MAG", &peakMagNum, &status); 236 if (status) psError(PS_ERR_IO, false, "Unable to read col num for PEAK_FLUX_AS_MAG"); 237 238 firstTimeIn=false; 239 } 240 224 241 anynull = 0; 225 fits_read_col(fitsIn, TLONG, 1, 1, 1, nDet, &longnull, ippIDet, &anynull, &status);226 fits_read_col(fitsIn, TFLOAT, 8, 1, 1, nDet, &floatnull, instMag, &anynull, &status);227 fits_read_col(fitsIn, TFLOAT, 9, 1, 1, nDet, &floatnull, instMagErr, &anynull, &status);228 fits_read_col(fitsIn, TFLOAT, 12, 1, 1, nDet, &floatnull, peakMag, &anynull, &status);242 fits_read_col(fitsIn, TLONG, ippIDetNum, 1, 1, nDet, &longnull, ippIDet, &anynull, &status); 243 fits_read_col(fitsIn, TFLOAT, instMagNum, 1, 1, nDet, &floatnull, instMag, &anynull, &status); 244 fits_read_col(fitsIn, TFLOAT, instMagErrNum, 1, 1, nDet, &floatnull, instMagErr, &anynull, &status); 245 fits_read_col(fitsIn, TFLOAT, peakMagNum, 1, 1, nDet, &floatnull, peakMag, &anynull, &status); 229 246 230 247 // DVO detections are ordered by IPP_IDET, which increments from 0 in SMF table -
trunk/ippToPsps/src/ippToPspsConfig.c
r28556 r28559 731 731 int writeStatus = 0; 732 732 733 // first loop round all columns and get IPP col numbers for provided column names 733 // first loop round all columns and get IPP col numbers for provided column names TODO only do once, first time in 734 734 if(!fromHeader) { 735 735
Note:
See TracChangeset
for help on using the changeset viewer.
