Changeset 6964 for trunk/psphot
- Timestamp:
- Apr 22, 2006, 3:20:29 PM (20 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 5 edited
-
psphotChoosePSF.c (modified) (1 diff)
-
psphotCleanup.c (modified) (1 diff)
-
psphotParseCamera.c (modified) (1 diff)
-
psphotReadout.c (modified) (5 diffs)
-
psphotSourceFits.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotChoosePSF.c
r6950 r6964 146 146 psMetadataAdd (recipe, PS_LIST_TAIL, "ANGLE", PS_DATA_F32 | PS_META_REPLACE, "PSF angle", axes.theta); 147 147 148 psFree (modelEXT); 149 psFree (modelPSF); 150 148 151 return true; 149 152 } -
trunk/psphot/src/psphotCleanup.c
r6727 r6964 6 6 psMemCheckCorruption (true); 7 7 pmModelGroupCleanup (); 8 // psphotOutputCleanup ();9 8 psTimeFinalize (); 10 9 pmConceptsDone (); 10 pmConfigDone (); 11 11 fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, NULL, false), "psphot"); 12 12 // fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, stdout, false), "psphot"); -
trunk/psphot/src/psphotParseCamera.c
r6862 r6964 75 75 } 76 76 } 77 psFree (chips); 77 78 78 79 psTrace(__func__, 1, "Done with psphotParseCamera...\n"); -
trunk/psphot/src/psphotReadout.c
r6862 r6964 3 3 bool psphotReadout (pmConfig *config, pmFPAview *view) { 4 4 5 psArray *sources = NULL;6 psArray *peaks = NULL;7 pmPSF *psf = NULL;8 bool status;9 10 5 // select the current recipe 11 psMetadata *recipe = psMetadataLookupPtr ( &status, config->recipes, "PSPHOT");6 psMetadata *recipe = psMetadataLookupPtr (NULL, config->recipes, "PSPHOT"); 12 7 13 8 // find the currently selected readout … … 28 23 29 24 // find the peaks in the image 30 p eaks = psphotFindPeaks (readout, recipe);25 psArray *peaks = psphotFindPeaks (readout, recipe); 31 26 32 27 // construct sources and measure basic stats 33 28 // limit moments analysis by S/N? 34 sources = psphotSourceStats (readout, recipe, peaks);29 psArray *sources = psphotSourceStats (readout, recipe, peaks); 35 30 36 31 // classify sources based on moments, brightness … … 42 37 43 38 // use bright stellar objects to measure PSF 44 p sf = psphotChoosePSF (readout, sources, recipe);39 pmPSF *psf = psphotChoosePSF (readout, sources, recipe); 45 40 psphotPSFstats (readout, recipe, psf); 46 41 … … 76 71 77 72 // save the results of the analysis 78 status =psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY, "psphot sources", sources);79 status =psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.HEADER", PS_DATA_METADATA, "header stats", header);80 status =psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_DATA_UNKNOWN, "psphot psf", psf);73 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY, "psphot sources", sources); 74 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.HEADER", PS_DATA_METADATA, "header stats", header); 75 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_DATA_UNKNOWN, "psphot psf", psf); 81 76 82 77 // remove internal pmFPAfiles, if created … … 85 80 86 81 // free up the local copies of the data 82 psFree (peaks); 83 psFree (sources); 87 84 psFree (psf); 88 85 psFree (header); 89 psFree (sources);90 psFree (peaks);91 86 return true; 92 87 } -
trunk/psphot/src/psphotSourceFits.c
r6949 r6964 95 95 okDBL = psphotEvalDBL (tmpSrc, DBL->data[0]); 96 96 okDBL &= psphotEvalDBL (tmpSrc, DBL->data[1]); 97 // XXX should I keep / save the flags set in the eval functions? 97 98 98 99 // correct first model chisqs for flux trend … … 100 101 chiTrend = psPolynomial1DEval (psf->ChiTrend, ONE->params->data.F32[1]); 101 102 ONE->chisqNorm = ONE->chisq / chiTrend; 102 // ONE->chisqNorm = ONE->chisq;103 103 104 104 // save chisq for double-star/galaxy comparison … … 109 109 chiTrend = psPolynomial1DEval (psf->ChiTrend, ONE->params->data.F32[1]); 110 110 ONE->chisqNorm = ONE->chisq / chiTrend; 111 // ONE->chisqNorm = ONE->chisq; 112 113 psFree (tmpSrc); // XXX should I keep / save the flags set in the eval functions? 111 112 psFree (tmpSrc); 114 113 115 114 if (okEXT && okDBL) { … … 195 194 196 195 modelSet = psArrayAlloc (2); 197 // DROP modelSet->n = 0;196 modelSet->n = 2; 198 197 199 198 DBL = pmModelCopy (PSF);
Note:
See TracChangeset
for help on using the changeset viewer.
