Changeset 34317 for trunk/psphot/src/psphotStackMatchPSFsNext.c
- Timestamp:
- Aug 16, 2012, 2:38:37 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotStackMatchPSFsNext.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotStackMatchPSFsNext.c
r34136 r34317 81 81 psImageMaskType maskVal = psMetadataLookupImageMask(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels 82 82 psAssert (maskVal, "missing mask value?"); 83 psImageMaskType maskSat = psMetadataLookupImageMask(&status, recipe, "MASK.SAT"); // Mask value for bad pixels 84 psAssert (maskSat, "missing mask value?"); 85 83 86 84 87 float minGauss = psMetadataLookupF32(NULL, recipe, "PEAKS_MIN_GAUSS"); // Minimum valid fraction of kernel … … 123 126 psImageSmoothMask_Threaded(readout->variance, readout->variance, readout->mask, maskVal, SIGMA_SMTH * M_SQRT1_2, NSIGMA_SMTH, minGauss); 124 127 psLogMsg("psphot", PS_LOG_MINUTIA, "smooth variance: %f sec\n", psTimerMark("psphot.smooth")); 128 129 // Insure that invalid pixels are masked 130 // XXX: the smoothing seems to generate nan pixels in the variance image 131 // XXX: We may need to loop over the cached sources and redefine the maskObj images... 132 pmReadoutMaskInvalid(readout, maskVal, maskSat); 133 { 134 // Now go rebuild the sources' copies of the mask 135 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); 136 psAssert (detections, "missing detections?"); 137 138 psArray *sources = detections->allSources; 139 140 if (sources && sources->n) { 141 for (int i = 0 ; i < sources->n; i++) { 142 // XXX: move this to a function in pmSource.c 143 pmSource *source = sources->data[i]; 144 if (source->maskObj && source->maskView) { 145 psFree(source->maskObj); 146 source->maskObj = psImageCopy (source->maskObj, source->maskView, PS_TYPE_IMAGE_MASK); 147 } 148 } 149 } 150 } 125 151 126 152 psLogMsg("psphot", PS_LOG_INFO, "smoothed");
Note:
See TracChangeset
for help on using the changeset viewer.
