Changeset 5628 for trunk/psphot/src/psphot.c
- Timestamp:
- Nov 30, 2005, 7:04:58 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphot.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphot.c
r5617 r5628 10 10 psStats *sky = NULL; 11 11 pmPSFClump psfClump; 12 bool status; 12 13 13 14 config = psphotArguments (&argc, argv); … … 17 18 // we have memory leaks here -- may be from psMetadata 18 19 imdata = psphotSetup (config); 20 char *breakPt = psMetadataLookupPtr (&status, config, "BREAK_POINT"); 21 if (!status) { 22 breakPt = psStringCopy ("NONE"); 23 } 19 24 20 25 // measure image stats for initial guess … … 23 28 // find the peaks in the image 24 29 peaks = pmPeaksSigmaLimit (imdata, config, sky); 30 if (!strcasecmp (breakPt, "PEAKS")) exit (0); 25 31 26 32 // construct sources and measure basic stats 27 33 sources = psphotSourceStats (imdata, config, peaks); 34 if (!strcasecmp (breakPt, "STATS")) exit (0); 28 35 29 36 // classify sources based on moments, brightness 30 37 // XXX - this has 1 leak 31 38 psfClump = pmSourcePSFClump (sources, config); 32 // psLogMsg ("psphot", 4, "clump X, Y: %f, %f\n", psfClump.X, psfClump.Y);33 // psLogMsg ("psphot", 4, "clump DX, DY: %f, %f\n", psfClump.dX, psfClump.dY);34 39 35 40 // group into STAR, COSMIC, GALAXY, SATURATED 36 41 pmSourceRoughClass (sources, config, psfClump); 37 38 // optional dump of all rough source data 39 { 40 bool status; 41 char *output = psMetadataLookupPtr (&status, config, "MOMENTS_OUTPUT_FILE"); 42 if (status && (output != NULL) && (output[0])) { 43 pmMomentsWriteText (sources, output); 44 psFree (output); 45 } 46 } 42 if (!strcasecmp (breakPt, "CLASS")) exit (0); 47 43 48 44 // source analysis is done in S/N order (brightest first) … … 51 47 // use bright stellar objects to measure PSF 52 48 psf = psphotChoosePSF (config, sources, sky); 49 if (!strcasecmp (breakPt, "PSFFIT")) exit (0); 53 50 54 51 // test PSF on all except SATURATE and DEFECT (artifacts) 55 52 psphotApplyPSF (imdata, config, sources, psf, sky); 53 if (!strcasecmp (breakPt, "PSFSUB")) exit (0); 56 54 57 55 // fit extended objects with galaxy models 58 56 psphotFitGalaxies (imdata, config, sources, sky); 57 if (!strcasecmp (breakPt, "GALSUB")) exit (0); 59 58 60 59 // write out data in appropriate format
Note:
See TracChangeset
for help on using the changeset viewer.
