Changeset 20710
- Timestamp:
- Nov 12, 2008, 3:14:57 PM (17 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 3 edited
-
ppStackCamera.c (modified) (2 diffs)
-
ppStackMatch.c (modified) (1 diff)
-
ppStackReadout.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackCamera.c
r19744 r20710 101 101 psString psf = psMetadataLookupStr(&mdok, input, "PSF"); // Name of PSF 102 102 psString sources = psMetadataLookupStr(&mdok, input, "SOURCES"); // Name of sources 103 104 float weighting = psMetadataLookupF32(&mdok, input, "WEIGHTING"); // Relative weighting105 if (!mdok || isnan(weighting) || weighting == 0.0) {106 psWarning("Component %s lacks WEIGHTING of type F32 --- assuming 1.0", item->name);107 weighting = 1.0;108 }109 103 110 104 // Add the image file … … 258 252 #endif 259 253 260 psMetadataAddF32(imageFile->fpa->analysis, PS_LIST_TAIL, "PPSTACK.WEIGHTING", 0,261 "Relative weighting for image", weighting);262 263 254 i++; 264 255 } -
trunk/ppStack/src/ppStackMatch.c
r20654 r20710 384 384 (void)psBinaryOp(readout->image, readout->image, "+", 385 385 psScalarAlloc(- psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN), PS_TYPE_F32)); 386 psMetadataAddF32(readout->analysis, PS_LIST_TAIL, "PPSTACK.WEIGHTING", 0, 387 "Weighting by 1/noise^2 for stack", 388 1.0 / PS_SQR(psStatsGetValue(bg, PS_STAT_ROBUST_STDEV))); 386 389 } 387 390 psFree(bg); -
trunk/ppStack/src/ppStackReadout.c
r20499 r20710 117 117 continue; 118 118 } 119 pmFPA *fpa = ro->parent->parent->parent; // Parent FPA 120 121 float weighting = psMetadataLookupF32(&mdok, fpa->analysis, "PPSTACK.WEIGHTING"); // Relative weight 119 120 float weighting = psMetadataLookupF32(&mdok, ro->analysis, "PPSTACK.WEIGHTING"); // Relative weight 122 121 if (!mdok || !isfinite(weighting)) { 123 psWarning("No WEIGHTINGsupplied for image %d --- set to unity.", i);122 psWarning("No weighting supplied for image %d --- set to unity.", i); 124 123 weighting = 1.0; 124 } else { 125 psLogMsg("ppStack", PS_LOG_INFO, "Weighting for image %d is %f", i, weighting); 125 126 } 126 127 … … 210 211 pmReadout *ro = readouts->data[i]; 211 212 assert(ro); 212 pmFPA *fpa = ro->parent->parent->parent; // Parent FPA213 213 214 214 bool mdok; // Status of MD lookup 215 float weighting = psMetadataLookupF32(&mdok, fpa->analysis, "PPSTACK.WEIGHTING"); // Relative weight215 float weighting = psMetadataLookupF32(&mdok, ro->analysis, "PPSTACK.WEIGHTING"); // Relative weight 216 216 if (!mdok || !isfinite(weighting)) { 217 217 psWarning("No WEIGHTING supplied for image %d --- set to unity.", i);
Note:
See TracChangeset
for help on using the changeset viewer.
