Changeset 4946 for trunk/psphot/src/psphot.c
- Timestamp:
- Sep 5, 2005, 2:25:53 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphot.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphot.c
r4901 r4946 9 9 pmPSF *psf = NULL; 10 10 psStats *sky = NULL; 11 pmPSFClump psfClump; 11 12 12 config = load_args (&argc, argv);13 config = psphotArguments (&argc, argv); 13 14 14 15 // load input data (image and config) 15 16 // create or load mask and noise images 16 17 // we have memory leaks here -- may be from psMetadata 17 imdata = setup (config);18 imdata = psphotSetup (config); 18 19 19 20 // measure image stats for initial guess 20 sky = image_stats (imdata, config);21 sky = psphotImageStats (imdata, config); 21 22 22 23 // find the peaks in the image 23 peaks = find_peaks(imdata, config, sky);24 peaks = pmPeaksSigmaLimit (imdata, config, sky); 24 25 25 26 // construct sources and measure basic stats 26 sources = source_moments (imdata, config, peaks);27 sources = psphotSourceStats (imdata, config, peaks); 27 28 28 29 // classify sources based on moments, brightness 29 basic_classes (sources, config); 30 // XXX - this has 1 leak 31 psfClump = pmSourcePSFClump (sources, config); 32 33 // group into STAR, COSMIC, GALAXY, SATURATED 34 pmSourceRoughClass (sources, config, psfClump); 30 35 31 36 // source analysis is done in S/N order (brightest first) 32 sources = psArraySort (sources, by_SN);37 sources = psArraySort (sources, psphotSortBySN); 33 38 34 39 // use bright stellar objects to measure PSF 35 psf = choose_psf_model(config, sources, sky);40 psf = psphotChoosePSF (config, sources, sky); 36 41 37 42 // test PSF on all except SATURATE and DEFECT (artifacts) 38 apply_psf_model(imdata, config, sources, psf, sky);43 psphotApplyPSF (imdata, config, sources, psf, sky); 39 44 40 45 // fit extended objects with galaxy models 41 fit_galaxies (imdata, config, sources, sky);46 psphotFitGalaxies (imdata, config, sources, sky); 42 47 43 48 // write out data in appropriate format 44 output (imdata, config, sources); 45 49 psphotOutput (imdata, config, sources); 46 50 exit (0); 47 51 }
Note:
See TracChangeset
for help on using the changeset viewer.
