Changeset 25383 for trunk/psphot
- Timestamp:
- Sep 15, 2009, 12:45:01 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
- 1 copied
-
. (modified) (1 prop)
-
psphot/doc/efficiency.txt (modified) (1 prop)
-
psphot/src/Makefile.am (modified) (1 diff)
-
psphot/src/psphot.h (modified) (4 diffs)
-
psphot/src/psphotAddNoise.c (modified) (3 diffs)
-
psphot/src/psphotEfficiency.c (copied) (copied from branches/pap/psphot/src/psphotEfficiency.c )
-
psphot/src/psphotFake.c (modified) (1 prop)
-
psphot/src/psphotFitSourcesLinear.c (modified) (1 diff)
-
psphot/src/psphotMagnitudes.c (modified) (2 diffs)
-
psphot/src/psphotReadout.c (modified) (2 diffs)
-
psphot/src/psphotReadoutMinimal.c (modified) (1 diff)
-
psphot/src/psphotReplaceUnfit.c (modified) (1 diff)
-
psphot/src/psphotSignificanceImage.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/pap (added) merged: 25238,25241-25243,25246,25258-25267,25278,25302,25309-25312,25326-25329,25331-25339
- Property svn:mergeinfo changed
-
trunk/psphot/doc/efficiency.txt
- Property svn:mergeinfo changed
/trunk/psphot/doc/efficiency.txt merged: 25137-25229
- Property svn:mergeinfo changed
-
trunk/psphot/src/Makefile.am
r24586 r25383 128 128 psphotCheckStarDistribution.c \ 129 129 psphotThreadTools.c \ 130 psphotAddNoise.c 130 psphotAddNoise.c \ 131 psphotEfficiency.c 131 132 132 133 # dropped? psphotGrowthCurve.c -
trunk/psphot/src/psphot.h
r24890 r25383 49 49 bool psphotPSFstats (pmReadout *readout, psMetadata *recipe, pmPSF *psf); 50 50 bool psphotMomentsStats (pmReadout *readout, psMetadata *recipe, psArray *sources); 51 bool psphotFitSourcesLinear (pmReadout *readout, psArray *sources, psMetadata *recipe,pmPSF *psf, bool final);51 bool psphotFitSourcesLinear (pmReadout *readout, psArray *sources, const psMetadata *recipe, const pmPSF *psf, bool final); 52 52 bool psphotReplaceUnfitSources (psArray *sources, psImageMaskType maskVal); 53 53 54 54 bool psphotReplaceAllSources (psArray *sources, psMetadata *recipe); 55 bool psphotRemoveAllSources ( psArray *sources,psMetadata *recipe);55 bool psphotRemoveAllSources (const psArray *sources, const psMetadata *recipe); 56 56 57 57 bool psphotBlendFit (pmConfig *config, pmReadout *readout, psArray *sources, pmPSF *psf); … … 64 64 bool psphotGuessModel_Threaded (psThreadJob *job); 65 65 66 bool psphotMagnitudes (pmConfig *config, pmReadout *readout, const pmFPAview *view, psArray *sources, pmPSF *psf);66 bool psphotMagnitudes (pmConfig *config, pmReadout *readout, const pmFPAview *view, psArray *sources, const pmPSF *psf); 67 67 bool psphotMagnitudes_Threaded (psThreadJob *job); 68 68 … … 76 76 bool psphotExtendedSourceAnalysis (pmReadout *readout, psArray *sources, psMetadata *recipe); 77 77 bool psphotExtendedSourceFits (pmReadout *readout, psArray *sources, psMetadata *recipe); 78 bool psphotEfficiency(pmConfig *config, pmReadout *readout, const pmFPAview *view, const pmPSF *psf, psMetadata *recipe, const psArray *realSources); 78 79 79 80 // thread-related: … … 147 148 pmPSF *psphotLoadPSF (pmConfig *config, const pmFPAview *view, psMetadata *recipe); 148 149 bool psphotSetHeaderNstars (psMetadata *recipe, psArray *sources); 149 bool psphotAddNoise (pmReadout *readout, psArray *sources,psMetadata *recipe);150 bool psphotSubNoise (pmReadout *readout, psArray *sources,psMetadata *recipe);151 bool psphotAddOrSubNoise (pmReadout *readout, psArray *sources,psMetadata *recipe, bool add);150 bool psphotAddNoise (pmReadout *readout, const psArray *sources, const psMetadata *recipe); 151 bool psphotSubNoise (pmReadout *readout, const psArray *sources, const psMetadata *recipe); 152 bool psphotAddOrSubNoise (pmReadout *readout, const psArray *sources, const psMetadata *recipe, bool add); 152 153 bool psphotRadialPlot (int *kapa, const char *filename, pmSource *source); 153 154 bool psphotSourcePlots (pmReadout *readout, psArray *sources, psMetadata *recipe); -
trunk/psphot/src/psphotAddNoise.c
r21519 r25383 1 1 # include "psphotInternal.h" 2 2 3 bool psphotAddNoise (pmReadout *readout, psArray *sources,psMetadata *recipe) {3 bool psphotAddNoise (pmReadout *readout, const psArray *sources, const psMetadata *recipe) { 4 4 return psphotAddOrSubNoise (readout, sources, recipe, true); 5 5 } 6 6 7 bool psphotSubNoise (pmReadout *readout, psArray *sources,psMetadata *recipe) {7 bool psphotSubNoise (pmReadout *readout, const psArray *sources, const psMetadata *recipe) { 8 8 return psphotAddOrSubNoise (readout, sources, recipe, false); 9 9 } 10 10 11 bool psphotAddOrSubNoise (pmReadout *readout, psArray *sources,psMetadata *recipe, bool add) {11 bool psphotAddOrSubNoise (pmReadout *readout, const psArray *sources, const psMetadata *recipe, bool add) { 12 12 13 13 bool status = false; … … 42 42 PS_ASSERT (status, false); 43 43 if (isfinite(GAIN)) { 44 FACTOR /= GAIN;44 FACTOR /= GAIN; 45 45 } 46 46 … … 70 70 oldshape.sxy = PAR[PM_PAR_SXY]; 71 71 72 // XXX can this be done more intelligently?73 if (oldI0 == 0.0) continue;74 if (!isfinite(oldI0)) continue;72 // XXX can this be done more intelligently? 73 if (oldI0 == 0.0) continue; 74 if (!isfinite(oldI0)) continue; 75 75 76 76 // increase size and height of source -
trunk/psphot/src/psphotFake.c
- Property svn:mergeinfo changed
/trunk/psphot/src/psphotFake.c merged: 25137-25229
- Property svn:mergeinfo changed
-
trunk/psphot/src/psphotFitSourcesLinear.c
r23445 r25383 12 12 static bool SetBorderMatrixElements (psSparseBorder *border, pmReadout *readout, psArray *sources, bool constant_weights, int SKY_FIT_ORDER, psImageMaskType markVal); 13 13 14 bool psphotFitSourcesLinear (pmReadout *readout, psArray *sources, psMetadata *recipe,pmPSF *psf, bool final) {14 bool psphotFitSourcesLinear (pmReadout *readout, psArray *sources, const psMetadata *recipe, const pmPSF *psf, bool final) { 15 15 16 16 bool status; -
trunk/psphot/src/psphotMagnitudes.c
r23349 r25383 1 1 # include "psphotInternal.h" 2 2 3 bool psphotMagnitudes(pmConfig *config, pmReadout *readout, const pmFPAview *view, psArray *sources, pmPSF *psf) {3 bool psphotMagnitudes(pmConfig *config, pmReadout *readout, const pmFPAview *view, psArray *sources, const pmPSF *psf) { 4 4 5 5 bool status = false; … … 64 64 65 65 psArrayAdd(job->args, 1, cells->data[j]); // sources 66 psArrayAdd(job->args, 1, psf);66 psArrayAdd(job->args, 1, (pmPSF*)psf); // Casting away const 67 67 psArrayAdd(job->args, 1, binning); 68 68 psArrayAdd(job->args, 1, backModel); -
trunk/psphot/src/psphotReadout.c
r24890 r25383 61 61 // display the backsub and backgnd images 62 62 psphotVisualShowBackground (config, view, readout); 63 63 64 64 // run a single-model test if desired (exits from here if test is run) 65 65 psphotModelTest (config, view, recipe); … … 224 224 psphotMagnitudes(config, readout, view, sources, psf); 225 225 226 if (!psphotEfficiency(config, readout, view, psf, recipe, sources)) { 227 psErrorStackPrint(stderr, "Unable to determine detection efficiencies from fake sources"); 228 psErrorClear(); 229 } 230 226 231 // replace failed sources? 227 232 // psphotReplaceUnfitSources (sources); -
trunk/psphot/src/psphotReadoutMinimal.c
r24890 r25383 97 97 psphotMagnitudes(config, readout, view, sources, psf); 98 98 99 if (!psphotEfficiency(config, readout, view, psf, recipe, sources)) { 100 psErrorStackPrint(stderr, "Unable to determine detection efficiencies from fake sources"); 101 psErrorClear(); 102 } 103 99 104 // drop the references to the image pixels held by each source 100 105 psphotSourceFreePixels (sources); -
trunk/psphot/src/psphotReplaceUnfit.c
r21519 r25383 47 47 } 48 48 49 bool psphotRemoveAllSources ( psArray *sources,psMetadata *recipe) {49 bool psphotRemoveAllSources (const psArray *sources, const psMetadata *recipe) { 50 50 51 51 bool status; -
trunk/psphot/src/psphotSignificanceImage.c
r21407 r25383 22 22 } 23 23 24 bool status_x, status_y; 25 float FWHM_X = psMetadataLookupF32 (&status_x, recipe, "FWHM_X"); 26 float FWHM_Y = psMetadataLookupF32 (&status_y, recipe, "FWHM_Y"); 27 if (status_x && status_y) { 28 // if we know the FHWM, use that to set the smoothing kernel (XXX allow an optional override?) 29 SIGMA_SMTH = 0.5*(FWHM_X + FWHM_Y) / (2.0*sqrt(2.0*log(2.0))); 30 NSIGMA_SMTH = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_NSIGMA"); 31 guess = false; 24 bool statusMajor, statusMinor; 25 float fwhmMajor = psMetadataLookupF32(&statusMajor, recipe, "FWHM_MAJ"); 26 float fwhmMinor = psMetadataLookupF32(&statusMinor, recipe, "FWHM_MIN"); 27 if (statusMajor && statusMinor) { 28 // if we know the FHWM, use that to set the smoothing kernel (XXX allow an optional override?) 29 if (!isfinite(fwhmMajor) || !isfinite(fwhmMinor) || fwhmMajor == 0.0 || fwhmMinor == 0.0) { 30 psWarning("fwhmMajor (%f) or fwhmMinor (%f) is bad!", fwhmMajor, fwhmMinor); 31 } 32 SIGMA_SMTH = 0.5*(fwhmMajor + fwhmMinor) / (2.0*sqrt(2.0*log(2.0))); 33 NSIGMA_SMTH = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_NSIGMA"); 34 guess = false; 32 35 } else { 33 // if we do not know the FWHM, use the guess smoothing kernel supplied.34 // it is a configuration error if these are not supplied35 SIGMA_SMTH = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_SIGMA");36 PS_ASSERT (status, NULL);37 NSIGMA_SMTH = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_NSIGMA");38 PS_ASSERT (status, NULL);39 guess = true;36 // if we do not know the FWHM, use the guess smoothing kernel supplied. 37 // it is a configuration error if these are not supplied 38 SIGMA_SMTH = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_SIGMA"); 39 PS_ASSERT (status, NULL); 40 NSIGMA_SMTH = psMetadataLookupF32 (&status, recipe, "PEAKS_SMOOTH_NSIGMA"); 41 PS_ASSERT (status, NULL); 42 guess = true; 40 43 } 41 44 // record the actual smoothing sigma
Note:
See TracChangeset
for help on using the changeset viewer.
