Changeset 14520
- Timestamp:
- Aug 15, 2007, 4:18:51 PM (19 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 2 edited
-
ppStackCamera.c (modified) (3 diffs)
-
ppStackReadout.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackCamera.c
r14404 r14520 40 40 psString weight = psMetadataLookupStr(&mdok, input, "WEIGHT"); // Name of weight map 41 41 42 float seeing = psMetadataLookupF32( NULL, input, "SEEING"); // Seeing FWHM43 if ( isnan(seeing)) {42 float seeing = psMetadataLookupF32(&mdok, input, "SEEING"); // Seeing FWHM 43 if (!mdok || isnan(seeing) || seeing == 0.0) { 44 44 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Component %s lacks SEEING of type F32", item->name); 45 45 psFree(iter); … … 47 47 } 48 48 49 float weighting = psMetadataLookupF32( NULL, input, "WEIGHTING"); // Relative weighting50 if ( isnan(weighting)) {49 float weighting = psMetadataLookupF32(&mdok, input, "WEIGHTING"); // Relative weighting 50 if (!mdok || isnan(weighting) || weighting == 0.0) { 51 51 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Component %s lacks WEIGHTING of type F32", item->name); 52 52 psFree(iter); … … 54 54 } 55 55 56 float scale = psMetadataLookupF32( NULL, input, "SCALE"); // Relative scale57 if ( isnan(scale)) {56 float scale = psMetadataLookupF32(&mdok, input, "SCALE"); // Relative scale 57 if (!mdok || isnan(scale) || scale == 0.0) { 58 58 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Component %s lacks SCALE of type F32", item->name); 59 59 psFree(iter); -
trunk/ppStack/src/ppStackReadout.c
r14470 r14520 52 52 psListAdd(cellList, PS_LIST_TAIL, ro->parent); 53 53 54 float seeing = psMetadataLookupF32(NULL, inputFile->fpa->analysis, "PPSTACK.SEEING"); // Seeing FWHM 55 float weighting = psMetadataLookupF32(NULL, inputFile->fpa->analysis, 54 bool mdok; // Status of MD lookup 55 float seeing = psMetadataLookupF32(&mdok, inputFile->fpa->analysis, "PPSTACK.SEEING"); // Seeing FWHM 56 if (!mdok || !isfinite(seeing)) { 57 psWarning("No SEEING supplied for image %d --- set to unity.", fileNum); 58 seeing = 1.0; 59 } 60 float weighting = psMetadataLookupF32(&mdok, inputFile->fpa->analysis, 56 61 "PPSTACK.WEIGHTING"); // Relative weighting 57 float scale = psMetadataLookupF32(NULL, inputFile->fpa->analysis, "PPSTACK.SCALE"); // Rel. scale 62 if (!mdok || !isfinite(weighting)) { 63 psWarning("No WEIGHTING supplied for image %d --- set to unity.", fileNum); 64 weighting = 1.0; 65 } 66 float scale = psMetadataLookupF32(&mdok, inputFile->fpa->analysis, "PPSTACK.SCALE"); // Rel. scale 67 if (!mdok || !isfinite(scale)) { 68 psWarning("No SCALE supplied for image %d --- set to unity.", fileNum); 69 scale = 1.0; 70 } 58 71 59 72 // Brain-dead background subtraction … … 69 82 return false; 70 83 } 84 psTrace("ppStack", 3, "Background for image %d is %f\n", fileNum, stats->robustMedian); 71 85 (void)psBinaryOp(ro->image, ro->image, "-", psScalarAlloc(stats->robustMedian, PS_TYPE_F32)); 72 86
Note:
See TracChangeset
for help on using the changeset viewer.
