Changeset 31384 for branches/eam_branches/ipp-20110404/psphot
- Timestamp:
- Apr 26, 2011, 5:54:39 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110404/psphot/src
- Files:
-
- 5 edited
-
psphotBlendFit.c (modified) (1 diff)
-
psphotFitSourcesLinear.c (modified) (2 diffs)
-
psphotGuessModels.c (modified) (4 diffs)
-
psphotMakeGrowthCurve.c (modified) (1 diff)
-
psphotRadialApertures.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110404/psphot/src/psphotBlendFit.c
r31313 r31384 242 242 if (source->mode & PM_SOURCE_MODE_PAIR) continue; 243 243 244 // do not include MOMENTS_FAILURES in the fit 245 if (source->mode & PM_SOURCE_MODE_MOMENTS_FAILURE) continue; 246 244 247 // limit selection to some SN limit 245 248 if (sqrt(source->peak->detValue) < FIT_SN_LIM) continue; -
branches/eam_branches/ipp-20110404/psphot/src/psphotFitSourcesLinear.c
r31381 r31384 137 137 if (source->mode & PM_SOURCE_MODE_CR_LIMIT) continue; 138 138 139 // do not include MOMENTS_FAILURES in the fit 140 if (source->mode & PM_SOURCE_MODE_MOMENTS_FAILURE) continue; 141 139 142 // XXX count saturated stars 140 143 if (source->mode & PM_SOURCE_MODE_SATSTAR) { … … 166 169 // apply mask? 167 170 float modelSum = 0.0; 171 float maskedSum = 0.0; 168 172 for (int iy = 0; iy < source->modelFlux->numRows; iy++) { 169 173 for (int ix = 0; ix < source->modelFlux->numCols; ix++) { 170 174 modelSum += source->modelFlux->data.F32[iy][ix]; 175 if (source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[iy][ix] & maskVal) continue; 176 maskedSum += source->modelFlux->data.F32[iy][ix]; 171 177 } 172 178 } 173 179 if (modelSum < 0.5) continue; // skip sources with no model constraint (somewhat arbitrary limit) 174 180 if (modelSum < 0.8) { 175 fprintf (stderr, "low-sig model @ %f, %f (%f sum, %f peak)\n", 176 source->peak->xf, source->peak->yf, modelSum, source->peak->rawFlux); 181 fprintf (stderr, "low-sig model @ %f, %f (%f masked sum, %f sum, %f peak)\n", 182 source->peak->xf, source->peak->yf, maskedSum, modelSum, source->peak->rawFlux); 183 } 184 if (maskedSum < 0.5) { 185 fprintf (stderr, "worrying model @ %f, %f (%f masked sum, %f sum, %f peak)\n", 186 source->peak->xf, source->peak->yf, maskedSum, modelSum, source->peak->rawFlux); 177 187 } 178 188 -
branches/eam_branches/ipp-20110404/psphot/src/psphotGuessModels.c
r31154 r31384 160 160 pmSource *source = sources->data[i]; 161 161 162 if (source->mode & PM_SOURCE_MODE_MOMENTS_FAILURE) {163 fprintf (stderr, "moment failure\n");164 }165 166 162 // this is used to mark sources for which the model is measured. We check later that 167 163 // all are used. … … 169 165 170 166 // skip non-astronomical objects (very likely defects) 167 if (source->mode & PM_SOURCE_MODE_MOMENTS_FAILURE) continue; 171 168 if (source->type == PM_SOURCE_TYPE_DEFECT) continue; 172 169 if (source->type == PM_SOURCE_TYPE_SATURATED) continue; … … 196 193 } 197 194 195 # if (0) 198 196 if (source->mode & PM_SOURCE_MODE_SATSTAR) { 199 197 fprintf (stderr, "satstar: %f,%f vs %f,%f : %c\n", … … 202 200 (useMoments ? 'T' : 'F')); 203 201 } 202 # endif 204 203 205 204 // set PSF parameters for this model (apply 2D shape model to coordinates Xo, Yo) -
branches/eam_branches/ipp-20110404/psphot/src/psphotMakeGrowthCurve.c
r31362 r31384 50 50 # endif 51 51 52 psLogMsg ("psphot", PS_LOG_MINUTIA, "built growth curve: %f sec\n", psTimerMark ("psphot.growth")); 53 52 54 float offset = pmGrowthCurveCorrect (psf->growth, PSF_APERTURE); 53 fprintf (stderr, "correction from %f to %f: %f mags\n", PSF_APERTURE, REF_RADIUS, offset); 54 55 psLogMsg ("psphot", PS_LOG_MINUTIA, "built growth curve: %f sec\n", psTimerMark ("psphot.growth")); 55 psLogMsg ("psphot", PS_LOG_DETAIL, "correction from %f to %f: %f mags\n", PSF_APERTURE, REF_RADIUS, offset); 56 56 57 57 return true; -
branches/eam_branches/ipp-20110404/psphot/src/psphotRadialApertures.c
r31154 r31384 95 95 if (source->type == PM_SOURCE_TYPE_SATURATED) continue; 96 96 if (source->mode & PM_SOURCE_MODE_DEFECT) continue; 97 if (source->mode & PM_SOURCE_MODE_SATSTAR) continue; 97 98 // XXX measure radial apertures even for saturated stars 99 // if (source->mode & PM_SOURCE_MODE_SATSTAR) continue; 98 100 99 101 // limit selection to some SN limit … … 257 259 float SBstdv = sqrt((fluxStd->data.F32[i] / nPix) - PS_SQR(SBmean)); 258 260 261 // XXX report the total flux or the mask-corrected flux? 259 262 // flux->data.F32[i] = SBmean * Area; 263 // fluxErr->data.F32[i] = sqrt(fluxErr->data.F32[i]) * Area / nPix; 264 265 fluxErr->data.F32[i] = sqrt(fluxErr->data.F32[i]); 260 266 fluxStd->data.F32[i] = SBstdv * Area; 261 fluxErr->data.F32[i] = sqrt(fluxErr->data.F32[i]) * Area / nPix; 262 263 // fill->data.F32[i] /= Area; 267 fill->data.F32[i] /= Area; 268 264 269 psTrace ("psphot", 5, "radial bins: %3d %5.1f : %8.1f +/- %7.2f : %8.1f +/- %8.1f : %4.2f %6.1f\n", 265 270 i, aperRadii->data.F32[i], flux->data.F32[i], fluxErr->data.F32[i], SBmean, SBstdv, fill->data.F32[i], Area);
Note:
See TracChangeset
for help on using the changeset viewer.
