Changeset 29294
- Timestamp:
- Oct 1, 2010, 2:09:14 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/src/ippToPsps.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/ippToPsps.c
r29198 r29294 24 24 extern int ippToPsps_batchDifference(IppToPsps *data); 25 25 26 // Gets uncalibrated instrumental flux from magnitude 27 __inline bool ippToPsps_getFlux(const float exposureTime, const float magnitude, float* flux, const float magnitudeErr, float* fluxErr) { 28 29 *flux = powf(10.0, -0.4*magnitude) / exposureTime; 30 if (!isfinite(*flux) || *flux < 0.000001) return false; 31 if (fluxErr) *fluxErr = fabsf((magnitudeErr * *flux)/1.085736); 32 if (fluxErr) printf("Mag = %03.03f, Flux = %03.03f, Mag err = %03.03f, Flux Err = %03.03f\n", magnitude, *flux, magnitudeErr, *fluxErr); 33 34 return true; 35 } 36 26 37 // Destructor 27 38 static void ippToPsps_Destructor(IppToPsps* this) { … … 55 66 // save XML document for results 56 67 if (this->resultsXmlDoc) { 57 68 58 69 xmlSaveFormatFileEnc(this->resultsPath, this->resultsXmlDoc, "UTF-8", 1); 59 70 … … 215 226 this->batchType == BATCH_STACK || 216 227 this->batchType == BATCH_DIFFERENCE ) { 217 218 if (this->numOfInputFiles < 1) this->exitCode = PS_EXIT_DATA_ERROR; 219 psError(PS_ERR_UNKNOWN, false, "No input files for this batch"); 228 229 if (this->numOfInputFiles < 1) { 230 231 this->exitCode = PS_EXIT_DATA_ERROR; 232 psError(PS_ERR_UNKNOWN, false, "No input files for this batch"); 233 } 220 234 221 235 }
Note:
See TracChangeset
for help on using the changeset viewer.
