Changeset 30865
- Timestamp:
- Mar 10, 2011, 5:23:09 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110213/psModules/src/objects
- Files:
-
- 9 edited
-
pmFootprint.h (modified) (1 diff)
-
pmFootprintCullPeaks.c (modified) (2 diffs)
-
pmMoments.h (modified) (1 diff)
-
pmPeaks.h (modified) (1 diff)
-
pmSource.c (modified) (1 diff)
-
pmSourceIO_CMF_PS1_V3.c (modified) (1 diff)
-
pmSourceMoments.c (modified) (5 diffs)
-
pmSourceOutputs.c (modified) (1 diff)
-
pmSourceOutputs.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/psModules/src/objects/pmFootprint.h
r30621 r30865 84 84 const float nsigma_delta, // how many sigma above local background a peak needs to be to survive 85 85 const float fPadding, // fractional padding added to stdev since bright peaks have unreasonably high significance 86 const float min_threshold // minimum permitted coll height 86 const float min_threshold, // minimum permitted coll height 87 const float max_threshold // maximum permitted coll height 87 88 ); 88 89 -
branches/eam_branches/ipp-20110213/psModules/src/objects/pmFootprintCullPeaks.c
r30752 r30865 38 38 const float nsigma_delta, // how many sigma above local background a peak needs to be to survive 39 39 const float fPadding, // fractional padding added to stdev since bright peaks have unreasonably high significance 40 const float min_threshold) { // minimum permitted coll height 40 const float min_threshold, // minimum permitted coll height 41 const float max_threshold) { // maximum permitted coll height 41 42 assert (img != NULL); assert (img->type.type == PS_TYPE_F32); 42 43 assert (weight != NULL); assert (weight->type.type == PS_TYPE_F32); … … 119 120 threshold = min_threshold; 120 121 } 122 if (threshold > max_threshold) { 123 threshold = max_threshold; 124 } 121 125 122 126 // init peakFootprint here? -
branches/eam_branches/ipp-20110213/psModules/src/objects/pmMoments.h
r29004 r30865 51 51 int nPixels; ///< Number of pixels used. 52 52 53 float KronFlux; ///< Kron flux (flux in 2.5*Mrf) 53 float KronCore; ///< flux in r < 1.0*Mrf 54 float KronCoreErr; ///< error on flux in r < 1.0*Mrf 55 56 float KronFlux; ///< Kron flux (flux in r < 2.5*Mrf) 54 57 float KronFluxErr; ///< Kron flux error 55 58 56 float KronFinner; ///< Kron flux (flux in 2.5*Mrf) 57 float KronFouter; ///< Kron flux (flux in 2.5*Mrf) 58 59 float KronFinner; ///< Kron flux (flux in 1.0*Mrf < r < 2.5*Mrf) 60 float KronFouter; ///< Kron flux (flux in 2.5*Mrf < r < 4.0*Mrf) 59 61 } 60 62 pmMoments; -
branches/eam_branches/ipp-20110213/psModules/src/objects/pmPeaks.h
r29004 r30865 35 35 PM_PEAK_EDGE, ///< Peak on edge. 36 36 PM_PEAK_FLAT, ///< Peak has equal-value neighbors. 37 PM_PEAK_SUSPECT_SATURATION, ///< Peak is probably saturated 37 38 PM_PEAK_UNDEF ///< Undefined. 38 39 } pmPeakType; -
branches/eam_branches/ipp-20110213/psModules/src/objects/pmSource.c
r30775 r30865 637 637 // XXX eliminate the classification? 638 638 if ((source->moments->SN > 10) && (sigX < 0.05 || sigY < 0.05)) { 639 source->type = PM_SOURCE_TYPE_DEFECT; 640 source->mode |= PM_SOURCE_MODE_DEFECT; 641 Ncr ++; 642 continue; 643 } 644 645 // check for insignificant sources or excessively low-surface brightness 646 float coreSN = source->moments->KronCore / source->moments->KronCoreErr; 647 float coreKR = source->moments->KronCore / source->moments->KronFlux; 648 649 // XXX these values need to be in the recipe... 650 if (false && isfinite(coreSN) && (coreSN < 5.0)) { 651 source->type = PM_SOURCE_TYPE_DEFECT; 652 source->mode |= PM_SOURCE_MODE_DEFECT; 653 Ncr ++; 654 continue; 655 } 656 if (false && isfinite(coreKR) && (coreKR < 0.1)) { 639 657 source->type = PM_SOURCE_TYPE_DEFECT; 640 658 source->mode |= PM_SOURCE_MODE_DEFECT; -
branches/eam_branches/ipp-20110213/psModules/src/objects/pmSourceIO_CMF_PS1_V3.c
r30763 r30865 161 161 psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_INNER", PS_DATA_F32, "Kron Flux (in 2.5 R1)", moments.Kinner); 162 162 psMetadataAdd (row, PS_LIST_TAIL, "KRON_FLUX_OUTER", PS_DATA_F32, "Kron Flux (in 2.5 R1)", moments.Kouter); 163 // psMetadataAdd (row, PS_LIST_TAIL, "KRON_CORE_FLUX", PS_DATA_F32, "Kron Flux (in 1.0 R1)", moments.KronCore); 164 // psMetadataAdd (row, PS_LIST_TAIL, "KRON_CORE_ERROR", PS_DATA_F32, "Kron Error (in 1.0 R1)", moments.KronCoreErr); 163 165 psMetadataAdd (row, PS_LIST_TAIL, "FLAGS", PS_DATA_U32, "psphot analysis flags", source->mode); 164 166 psMetadataAdd (row, PS_LIST_TAIL, "FLAGS2", PS_DATA_U32, "psphot analysis flags", source->mode2); -
branches/eam_branches/ipp-20110213/psModules/src/objects/pmSourceMoments.c
r29602 r30865 82 82 psF32 Sum = 0.0; 83 83 psF32 Var = 0.0; 84 psF32 SumCore = 0.0; 85 psF32 VarCore = 0.0; 84 86 psF32 R2 = PS_SQR(radius); 85 87 psF32 minSN2 = PS_SQR(minSN); … … 248 250 249 251 int nKronPix = 0; 252 int nCorePix = 0; 253 int nInner = 0; 254 int nOuter = 0; 250 255 Sum = Var = 0.0; 251 256 float SumInner = 0.0; … … 255 260 256 261 psF32 yDiff = row - yCM; 257 if (fabs(yDiff) > radK ron) continue;262 if (fabs(yDiff) > radKouter) continue; 258 263 259 264 psF32 *vPix = source->pixels->data.F32[row]; … … 272 277 273 278 psF32 xDiff = col - xCM; 274 if (fabs(xDiff) > radK ron) continue;279 if (fabs(xDiff) > radKouter) continue; 275 280 276 281 // radKron is just a function of (xDiff, yDiff) … … 293 298 } 294 299 300 // use sigma (fixed by psf) not a radKron based value 301 if (r < sigma) { 302 SumCore += pDiff; 303 VarCore += wDiff; 304 nCorePix ++; 305 } 306 295 307 if ((r > radKinner) && (r < radKron)) { 296 308 SumInner += pDiff; 309 nInner ++; 297 310 } 298 311 if ((r > radKron) && (r < radKouter)) { 299 312 SumOuter += pDiff; 313 nOuter ++; 300 314 } 301 315 } 302 316 } 303 source->moments->KronFlux = Sum; 304 source->moments->KronFinner = SumInner; 305 source->moments->KronFouter = SumOuter; 306 source->moments->KronFluxErr = sqrt(Var); 317 // *** should I rescale these fluxes by pi R^2 / nNpix? 318 source->moments->KronCore = SumCore * M_PI * PS_SQR(sigma) / nCorePix; 319 source->moments->KronCoreErr = sqrt(VarCore) * M_PI * PS_SQR(sigma) / nCorePix; 320 source->moments->KronFlux = Sum * M_PI * PS_SQR(radKron) / nKronPix; 321 source->moments->KronFluxErr = sqrt(Var) * M_PI * PS_SQR(radKron) / nKronPix; 322 source->moments->KronFinner = SumInner * M_PI * (PS_SQR(radKron) - PS_SQR(radKinner)) / nInner; 323 source->moments->KronFouter = SumOuter * M_PI * (PS_SQR(radKouter) - PS_SQR(radKron)) / nOuter; 307 324 308 325 psTrace ("psModules.objects", 4, "Mrf: %f KronFlux: %f Mxx: %f Mxy: %f Myy: %f Mxxx: %f Mxxy: %f Mxyy: %f Myyy: %f Mxxxx: %f Mxxxy: %f Mxxyy: %f Mxyyy: %f Mxyyy: %f\n", -
branches/eam_branches/ipp-20110213/psModules/src/objects/pmSourceOutputs.c
r30784 r30865 170 170 moments->Kinner = source->moments ? source->moments->KronFinner : NAN; 171 171 moments->Kouter = source->moments ? source->moments->KronFouter : NAN; 172 moments->KronCore = source->moments ? source->moments->KronCore : NAN; 173 moments->KronCoreErr = source->moments ? source->moments->KronCoreErr : NAN; 172 174 173 175 return true; -
branches/eam_branches/ipp-20110213/psModules/src/objects/pmSourceOutputs.h
r30763 r30865 50 50 float Kinner; 51 51 float Kouter; 52 float KronCore; 53 float KronCoreErr; 52 54 } pmSourceOutputsMoments; 53 55
Note:
See TracChangeset
for help on using the changeset viewer.
