Changeset 6319
- Timestamp:
- Feb 3, 2006, 8:48:32 AM (20 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 3 edited
-
psphotBasicDeblend.c (modified) (3 diffs)
-
psphotImageBackground.c (modified) (2 diffs)
-
psphotReadout.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotBasicDeblend.c
r5993 r6319 1 1 # include "psphot.h" 2 2 3 // 2006.02.02 : no leaks? (creates source->blend entries) 4 // XXX if I free sources, I still have 54 leaks? 3 5 bool psphotBasicDeblend (psArray *sources, psMetadata *config, psStats *sky) { 4 6 … … 109 111 } 110 112 } 113 psFree (contour); 111 114 } 112 115 } … … 116 119 if (!strcasecmp (breakPt, "DEBLEND")) exit (0); 117 120 121 psFree (SN); 122 psFree (index); 123 psFree (overlap); 124 118 125 return true; 119 126 } -
trunk/psphot/src/psphotImageBackground.c
r6311 r6319 1 1 # include "psphot.h" 2 2 3 // 2006.02.02 : no leaks 3 4 psPolynomial2D *psphotImageBackground (pmReadout *readout, psMetadata *config, psStats *sky) 4 5 { … … 61 62 sky->sampleMean = 0.0; 62 63 64 psFree (x); 65 psFree (y); 66 psFree (z); 67 psFree (rnd); // XXX should this be made available at a higher level? 68 63 69 psLogMsg ("psphot", 3, "fit background model: %f sec\n", psTimerMark ("psphot")); 64 70 return (skyModel); -
trunk/psphot/src/psphotReadout.c
r6311 r6319 1 1 # include "psphot.h" 2 3 # define MEM_0 psMemId ID = psMemGetId (); 4 # define MEM_1(A) \ 5 psTimerStop ();\ 6 if (A != NULL) { psFree (A); } \ 7 fprintf (stderr, "found %d leaks\n", psMemCheckLeaks (ID, NULL, NULL, false));\ 8 exit (1); 2 9 3 10 bool psphotReadout (pmReadout *readout, psMetadata *config) { … … 8 15 psStats *sky = NULL; 9 16 bool status; 17 psPolynomial2D *model = NULL; 10 18 11 19 psphotSaveImage (NULL, readout->mask, "mask.fits"); … … 18 26 // generate a background model (currently, 2D polynomial) 19 27 // XXX this should be available to be re-added to the original image 20 psphotImageBackground (readout, config, sky);28 model = psphotImageBackground (readout, config, sky); 21 29 22 30 // find the peaks in the image … … 33 41 34 42 // use bright stellar objects to measure PSF 43 MEM_0; 35 44 psf = psphotChoosePSF (config, sources, sky); 45 MEM_1(psf); 36 46 37 47 // XXX change FITMODE to a string
Note:
See TracChangeset
for help on using the changeset viewer.
