Changeset 27004 for trunk/ppStack/src/ppStackPrepare.c
- Timestamp:
- Feb 18, 2010, 6:42:01 PM (16 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppStackPrepare.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src
- Property svn:ignore
-
old new 10 10 stamp-h1 11 11 ppStackVersionDefinitions.h 12 ppStackErrorCodes.c 13 ppStackErrorCodes.h
-
- Property svn:ignore
-
trunk/ppStack/src/ppStackPrepare.c
r26918 r27004 26 26 float zpRadius = psMetadataLookupS32(&mdok, recipe, "PHOT.RADIUS"); // Radius for PHOT measurement 27 27 if (!mdok) { 28 psError(P S_ERR_UNKNOWN, true, "Unable to find PHOT.RADIUS in recipe");28 psError(PPSTACK_ERR_CONFIG, true, "Unable to find PHOT.RADIUS in recipe"); 29 29 return false; 30 30 } 31 31 float zpSigma = psMetadataLookupF32(&mdok, recipe, "PHOT.SIGMA"); // Gaussian sigma for photometry 32 32 if (!mdok) { 33 psError(P S_ERR_UNKNOWN, true, "Unable to find PHOT.SIGMA in recipe");33 psError(PPSTACK_ERR_CONFIG, true, "Unable to find PHOT.SIGMA in recipe"); 34 34 return false; 35 35 } 36 36 float zpFrac = psMetadataLookupF32(&mdok, recipe, "PHOT.FRAC"); // Fraction of good pixels for photometry 37 37 if (!mdok) { 38 psError(P S_ERR_UNKNOWN, true, "Unable to find PHOT.FRAC in recipe");38 psError(PPSTACK_ERR_CONFIG, true, "Unable to find PHOT.FRAC in recipe"); 39 39 return false; 40 40 } … … 42 42 psString maskValStr = psMetadataLookupStr(&mdok, recipe, "MASK.VAL"); // Name of bits to mask going in 43 43 if (!mdok || !maskValStr) { 44 psError(P S_ERR_UNKNOWN, false, "Unable to find MASK.VAL in recipe");44 psError(PPSTACK_ERR_CONFIG, false, "Unable to find MASK.VAL in recipe"); 45 45 return false; 46 46 } … … 53 53 psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); // Statistics 54 54 if (!psImageBackground(stats, NULL, image, mask, maskVal, rng)) { 55 psError(P S_ERR_UNKNOWN, false, "Unable to measure background for image");55 psError(PPSTACK_ERR_DATA, false, "Unable to measure background for image"); 56 56 psFree(stats); 57 57 psFree(rng); … … 148 148 pmPSF *psf = psMetadataLookupPtr(NULL, chip->analysis, "PSPHOT.PSF"); // PSF 149 149 if (!psf) { 150 psError(P S_ERR_UNKNOWN, false, "Unable to find PSF.");150 psError(PPSTACK_ERR_PROG, false, "Unable to find PSF."); 151 151 psFree(view); 152 152 psFree(fileIter); … … 163 163 int naxis2 = psMetadataLookupS32(NULL, hdu->header, "NAXIS2"); // Number of rows 164 164 if (naxis1 <= 0 || naxis2 <= 0) { 165 psError(P S_ERR_UNKNOWN, false, "Unable to determine size of image from PSF.");165 psError(PPSTACK_ERR_PROG, false, "Unable to determine size of image from PSF."); 166 166 psFree(view); 167 167 psFree(fileIter); … … 183 183 detections = psMetadataLookupPtr(NULL, ro->analysis, "PSPHOT.DETECTIONS"); // Sources 184 184 if (!detections) { 185 psError(P S_ERR_UNEXPECTED_NULL, false, "Unable to find source detections in readout.");185 psError(PPSTACK_ERR_PROG, false, "Unable to find source detections in readout."); 186 186 return NULL; 187 187 } … … 209 209 210 210 if (!ppStackInputPhotometer(ro, detections->allSources, config)) { 211 psError( PS_ERR_UNKNOWN, false, "Unable to do photometry on input sources");211 psError(psErrorCodeLast(), false, "Unable to do photometry on input sources"); 212 212 psFree(view); 213 213 psFree(photView); … … 273 273 psFree(psfs); 274 274 if (!options->psf) { 275 psError( PS_ERR_UNKNOWN, false, "Unable to determine output PSF.");275 psError(psErrorCodeLast(), false, "Unable to determine output PSF."); 276 276 psFree(view); 277 277 return false; … … 290 290 // Zero point calibration 291 291 if (!ppStackSourcesTransparency(options, view, config)) { 292 psError(P S_ERR_UNKNOWN, false, "Unable to calculate transparency differences");292 psError(PPSTACK_ERR_DATA, false, "Unable to calculate transparency differences"); 293 293 psFree(view); 294 294 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
