Changeset 34136
- Timestamp:
- Jul 10, 2012, 3:44:12 PM (14 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 8 edited
-
psphot.h (modified) (1 diff)
-
psphotChoosePSF.c (modified) (1 diff)
-
psphotFitSourcesLinear.c (modified) (1 diff)
-
psphotRadialApertures.c (modified) (1 diff)
-
psphotReplaceUnfit.c (modified) (2 diffs)
-
psphotStackMatchPSFs.c (modified) (2 diffs)
-
psphotStackMatchPSFsNext.c (modified) (2 diffs)
-
psphotStackMatchPSFsUtils.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphot.h
r34086 r34136 419 419 // bool loadKernel (pmConfig *config, pmReadout *readoutCnv, psphotStackOptions *options, int index); 420 420 421 bool psphotStackSetInputsToSkip(pmConfig *config, const pmFPAview *view, const char *filerule, bool set) ; 422 421 423 bool psphotStackRenormaliseVariance(const pmConfig *config, pmReadout *readout); 422 424 -
trunk/psphot/src/psphotChoosePSF.c
r32348 r34136 47 47 if (psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.PSF")) { 48 48 psLogMsg ("psphot", PS_LOG_DETAIL, "psf model supplied for input file %d", index); 49 return true; 50 } 51 52 if (psMetadataLookupBool (&status, readout->analysis, "PSPHOT.SKIP.INPUT")) { 53 psLogMsg ("psphot", PS_LOG_DETAIL, "skipping choose PSF for input file %d", index); 49 54 return true; 50 55 } -
trunk/psphot/src/psphotFitSourcesLinear.c
r34086 r34136 50 50 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 51 51 psAssert (readout, "missing readout?"); 52 53 if (psMetadataLookupBool (&status, readout->analysis, "PSPHOT.SKIP.INPUT")) { 54 psLogMsg ("psphot", PS_LOG_DETAIL, "skipping fit sources for input file %d", i); 55 continue; 56 } 57 52 58 53 59 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); -
trunk/psphot/src/psphotRadialApertures.c
r33089 r34136 71 71 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 72 72 psAssert (readout, "missing readout?"); 73 74 if (psMetadataLookupBool (&status, readout->analysis, "PSPHOT.SKIP.INPUT")) { 75 psLogMsg ("psphot", PS_LOG_DETAIL, "skipping radial aptertures for input file %d", index); 76 return true; 77 } 78 73 79 74 80 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); -
trunk/psphot/src/psphotReplaceUnfit.c
r33980 r34136 55 55 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 56 56 psAssert (readout, "missing readout?"); 57 58 if (psMetadataLookupBool (&status, readout->analysis, "PSPHOT.SKIP.INPUT")) { 59 psLogMsg ("psphot", PS_LOG_DETAIL, "skipping replace all sources for input file %d", index); 60 return true; 61 } 57 62 58 63 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); … … 304 309 psAssert (readout, "missing readout?"); 305 310 311 if (psMetadataLookupBool (&status, readout->analysis, "PSPHOT.SKIP.INPUT")) { 312 psLogMsg ("psphot", PS_LOG_DETAIL, "skipping reset models for input file %d", index); 313 return true; 314 } 315 316 306 317 // XXX the sources have already been copied (merge into here?) 307 318 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); -
trunk/psphot/src/psphotStackMatchPSFs.c
r32868 r34136 87 87 } 88 88 89 // copy the header data from Src to Out90 // pmHDU *hduSrc = pmHDUFromReadout(readoutSrc);91 // psAssert (hduSrc, "input missing hdu?");92 93 94 89 // set NAN pixels to 'SAT' 95 90 psImageMaskType maskSat = pmConfigMaskGet("SAT", config); … … 116 111 // save the output fwhm values in the readout->analysis. we may have / will have multiple output PSF sizes, 117 112 // so we save this in a vector. if the vector is not yet defined, create it 113 // Skip this if the readout deconvolution fraction was over the limit. 118 114 // NOTE: fwhmValues as defined here has 1 + nMatched PSF : 0 == unmatched 119 115 psVector *fwhmValues = psVectorAllocEmpty(10, PS_TYPE_F32); 120 116 psVectorAppend(fwhmValues, NAN); // XXX this corresponds to the unmatched image set 121 for (int i = 0; i < options->targetSeeing->n; i++) { 122 psVectorAppend(fwhmValues, options->targetSeeing->data.F32[i]); 117 118 bool overLimit = psMetadataLookupBool(NULL, readoutOut->analysis, "DECONV.OVERLIMIT"); 119 if (!overLimit) { 120 for (int i = 0; i < options->targetSeeing->n; i++) { 121 psVectorAppend(fwhmValues, options->targetSeeing->data.F32[i]); 122 } 123 123 } 124 124 psMetadataAddVector(readoutSrc->analysis, PS_LIST_TAIL, "STACK.PSF.FWHM.VALUES", PS_META_REPLACE, "PSF sizes", fwhmValues); -
trunk/psphot/src/psphotStackMatchPSFsNext.c
r32996 r34136 7 7 int nRadialEntries = 0; 8 8 9 // find the currently selected readout 10 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filerule, 0); // File of interest 11 psAssert (file, "missing file?"); 9 // find the numer of fwhmValues in the first non-skipped input 10 int num = psphotFileruleCount(config, filerule); 11 for (int i=0; i<num; i++) { 12 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filerule, i); // File of interest 13 psAssert (file, "missing file?"); 12 14 13 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 14 psAssert (readout, "missing readout?"); 15 16 bool status = false; 17 psVector *fwhmValues = psMetadataLookupVector(&status, readout->analysis, "STACK.PSF.FWHM.VALUES"); 18 if (!fwhmValues) { 19 return 1; 15 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 16 psAssert (readout, "missing readout?"); 17 bool status = false; 18 if (!psMetadataLookupBool (&status, readout->analysis, "PSPHOT.SKIP.INPUT")) { 19 psVector *fwhmValues = psMetadataLookupVector(&status, readout->analysis, "STACK.PSF.FWHM.VALUES"); 20 if (fwhmValues) { 21 nRadialEntries = fwhmValues->n; 22 } else { 23 nRadialEntries = 1; 24 } 25 break; 26 } 20 27 } 21 22 nRadialEntries = fwhmValues->n;23 28 return nRadialEntries; 24 29 } … … 60 65 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 61 66 psAssert (readout, "missing readout?"); 67 68 if (psMetadataLookupBool (&status, readout->analysis, "PSPHOT.SKIP.INPUT")) { 69 psLogMsg("psphot", PS_LOG_INFO, "skipping smooth %d to next psf", index); 70 return true; 71 } 62 72 63 73 psLogMsg("psphot", PS_LOG_INFO, "smooth %d to next psf", index); -
trunk/psphot/src/psphotStackMatchPSFsUtils.c
r33841 r34136 310 310 float deconv = psMetadataLookupF32(NULL, readoutOut->analysis, PM_SUBTRACTION_ANALYSIS_DECONV_MAX); // Max deconvolution fraction 311 311 if (deconv > deconvLimit) { 312 #if (1) 313 // XXX: don't reject the image set 314 psWarning("Maximum deconvolution fraction (%f) exceeds limit (%f) --- rejecting image for matched psf analysis%d\n", deconv, deconvLimit, index); 315 psMetadataAddBool(readoutOut->analysis, PS_LIST_TAIL, "DECONV.OVERLIMIT", PS_META_REPLACE, "", true); 316 #else 312 317 psWarning("Maximum deconvolution fraction (%f) exceeds limit (%f) --- rejecting image %d\n", deconv, deconvLimit, index); 313 318 goto escape; 319 #endif 320 } else { 321 psMetadataAddBool(readoutOut->analysis, PS_LIST_TAIL, "DECONV.OVERLIMIT", PS_META_REPLACE, "", false); 314 322 } 315 323 … … 461 469 return optWidths; 462 470 } 471 472 // Set input to be skipped if the decovolution fraction was overlimit. Use for radial apertures 473 // This interface can be potentiall be extended for other uses 474 bool psphotStackSetInputsToSkip(pmConfig *config, const pmFPAview *view, const char *filerule, bool set) { 475 int num = psphotFileruleCount(config, filerule); 476 bool status; 477 int chisqNum = psMetadataLookupS32 (&status, config->arguments, "PSPHOT.CHISQ.NUM"); 478 if (!status) chisqNum = -1; 479 for (int i = 0; i < num; i++) { 480 if (i == chisqNum) { 481 continue; 482 } 483 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filerule, i); // File of interest 484 psAssert (file, "missing file?"); 485 486 pmReadout *readout = pmFPAviewThisReadout(view, file->fpa); 487 psAssert (readout, "missing readout?"); 488 if (set) { 489 bool overLimit = psMetadataLookupBool(&status, readout->analysis, "DECONV.OVERLIMIT"); 490 psMetadataAddBool(readout->analysis, PS_LIST_TAIL, "PSPHOT.SKIP.INPUT", PS_META_REPLACE, "Skip analysis", overLimit); 491 } else { 492 psMetadataAddBool(readout->analysis, PS_LIST_TAIL, "PSPHOT.SKIP.INPUT", PS_META_REPLACE, "Skip analysis", false); 493 } 494 } 495 496 return true; 497 }
Note:
See TracChangeset
for help on using the changeset viewer.
