Changeset 28423 for trunk/ippToPsps/src/ippToPspsBatchDetection.c
- Timestamp:
- Jun 22, 2010, 1:43:44 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/src/ippToPspsBatchDetection.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/ippToPspsBatchDetection.c
r28305 r28423 13 13 #include "fitsio.h" 14 14 15 // Gets flux from magnitude15 // Gets uncalibrated instrumental flux from magnitude 16 16 static __inline bool ippToPsps_getFlux(const float zeroPoint, const float exposureTime, const float magnitude, float* flux) { 17 17 18 // use uncalibrated instrumental flux19 18 *flux = powf(10.0, -0.4*magnitude) / exposureTime; 20 21 // use calibrated flux in Janskys, where 3631 Jy is the zero point flux for the filter: constant over all filters because we're using AB magnitudes22 //float flux = 3631 * powf(10.0, -0.4*(magnitude + zeroPoint)) / exposureTime;23 24 // printf("mag=%f\texpTime=%f\tzeroPoint=%f\tflux=%f\n", magnitude, exposureTime, zeroPoint, flux);25 19 return (!isfinite(*flux) || *flux < 0.000001) ? false : true; 26 20 } … … 163 157 uint32_t numInvalidFlux; 164 158 long numDetectionsOut; 159 long totalDetectionsOut = 0; 165 160 long removeList[MAXDETECT]; 166 161 long thisObjId; … … 365 360 extensionName, nDet, numDetectionsOut, unmatched, numOfDuplicates, numInvalidFlux); 366 361 362 totalDetectionsOut += numDetectionsOut; 363 367 364 if (dvoDetections!= NULL) dvoFree(dvoDetections); 368 365 SkyListFree(skylist); 369 366 } 370 367 } 368 369 psLogMsg("ippToPsps", PS_LOG_INFO, "Total detections for this exposure = %ld\n", totalDetectionsOut); 371 370 372 371 for (uint32_t i=0; i<MAXDETECT;i++) free(assocDate[i]); … … 390 389 if (fprintf(this->resultsFile, "%ld\n", maxObjID) < 1 ) 391 390 psError(PS_ERR_IO, false, "Unable to write max Object ID to'%s'\n", this->resultsPath); 391 if (fprintf(this->resultsFile, "%ld\n", totalDetectionsOut) < 1 ) 392 psError(PS_ERR_IO, false, "Unable to write totalDetectionsOut to'%s'\n", this->resultsPath); 392 393 } 393 394
Note:
See TracChangeset
for help on using the changeset viewer.
