Changeset 6056 for trunk/psphot/src/psphot.c
- Timestamp:
- Jan 19, 2006, 2:55:33 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphot.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphot.c
r5993 r6056 5 5 6 6 psMetadata *config = NULL; 7 eamReadout *imdata = NULL; 7 psMetadata *header = NULL; 8 pmReadout *readout = NULL; 8 9 psArray *sources = NULL; 9 10 psArray *peaks = NULL; … … 18 19 19 20 // load input data (config and images (signal, noise, mask) 20 imdata = psphotSetup (config);21 readout = psphotSetup (config, &header); 21 22 22 23 // run a single-model test if desired 23 psphotModelTest ( imdata, config);24 psphotModelTest (readout, config); 24 25 25 26 // measure image stats for initial guess 26 sky = psphotImageStats ( imdata, config);27 sky = psphotImageStats (readout, config); 27 28 28 29 // generate a background model (currently, 2D polynomial) 29 30 // XXX this should be available to be re-added to the original image 30 psphotImageBackground ( imdata, config, sky);31 psphotImageBackground (readout, config, sky); 31 32 32 33 // find the peaks in the image 33 peaks = psphotFindPeaks ( imdata, config, sky);34 peaks = psphotFindPeaks (readout, config, sky); 34 35 35 36 // construct sources and measure basic stats 36 sources = psphotSourceStats ( imdata, config, peaks);37 sources = psphotSourceStats (readout, config, peaks); 37 38 38 39 // classify sources based on moments, brightness … … 49 50 switch (FITMODE) { 50 51 case 0: 51 psphotEnsemblePSF ( imdata, config, sources, psf, sky);52 psphotEnsemblePSF (readout, config, sources, psf, sky); 52 53 break; 53 54 54 55 case 1: 55 psphotEnsemblePSF ( imdata, config, sources, psf, sky);56 psphotFullFit ( imdata, config, sources, psf, sky);56 psphotEnsemblePSF (readout, config, sources, psf, sky); 57 psphotFullFit (readout, config, sources, psf, sky); 57 58 psphotReplaceUnfit (sources); 58 psphotApResid ( imdata, sources, config, psf);59 psphotApResid (readout, sources, config, psf); 59 60 break; 60 61 61 62 case 2: 62 psphotEnsemblePSF ( imdata, config, sources, psf, sky);63 psphotBlendFit ( imdata, config, sources, psf, sky);63 psphotEnsemblePSF (readout, config, sources, psf, sky); 64 psphotBlendFit (readout, config, sources, psf, sky); 64 65 psphotReplaceUnfit (sources); 65 psphotApResid ( imdata, sources, config, psf);66 psphotApResid (readout, sources, config, psf); 66 67 break; 67 68 68 69 case 3: 69 psphotApplyPSF ( imdata, config, sources, psf, sky);70 psphotApplyPSF (readout, config, sources, psf, sky); 70 71 break; 71 72 72 73 case 4: 73 psphotApplyPSF ( imdata, config, sources, psf, sky);74 psphotFitExtended ( imdata, config, sources, sky);74 psphotApplyPSF (readout, config, sources, psf, sky); 75 psphotFitExtended (readout, config, sources, sky); 75 76 break; 76 77 } 77 78 78 79 // write out data in appropriate format 79 psphotOutput ( imdata, config, sources, psf, sky);80 psphotOutput (readout, header, config, sources, psf, sky); 80 81 psLogMsg ("psphot", 3, "wrote output: %f sec\n", psTimerMark ("psphot")); 81 82 psLogMsg ("psphot", 3, "complete psphot run: %f sec\n", psTimerMark ("complete"));
Note:
See TracChangeset
for help on using the changeset viewer.
