Changeset 12627
- Timestamp:
- Mar 28, 2007, 9:03:59 AM (19 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 1 added
- 4 edited
-
Makefile.am (modified) (1 diff)
-
psphot.h (modified) (1 diff)
-
psphotRadialPlot.c (added)
-
psphotSourcePlots.c (modified) (3 diffs)
-
psphotSummaryPlots.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/Makefile.am
r12587 r12627 49 49 psphotMergeSources.c \ 50 50 psphotReadoutCleanup.c \ 51 psphotAddNoise.c \ 52 psphotSourcePlots.c \ 53 psphotRadialPlot.c \ 51 54 psphotCleanup.c 52 55 -
trunk/psphot/src/psphot.h
r12587 r12627 103 103 psExit psphotGetExitStatus (); 104 104 bool psphotSetHeaderNstars (psMetadata *recipe, psArray *sources); 105 bool psphotAddNoise (pmReadout *readout, psArray *sources, psMetadata *recipe, bool add); 106 bool psphotRadialPlot (const char *filename, pmSource *source); 107 bool psphotSourcePlots (pmReadout *readout, psArray *sources, psMetadata *recipe); -
trunk/psphot/src/psphotSourcePlots.c
r12626 r12627 10 10 PS_ASSERT (status); 11 11 12 int NX = 10*(2*OUTER+1);13 int NY = 0;14 15 12 // examine PSF sources in S/N order (brightest first) 16 13 sources = psArraySort (sources, psphotSortBySN); 17 14 18 bool newRow = true; 15 // counters to track the size of the image and area used in a row 16 int dX = 0; // starting corner of next box 17 int dY = 0; // height of row so far 18 int NX = 10*(2*OUTER+1); // full width of output image 19 int NY = 0; // total height of output image 19 20 20 21 // first, examine the PSF and SAT stars: … … 30 31 if (!keep) continue; 31 32 32 if (newRow) { 33 dX = 0; 34 dY = 0; 35 newRow = false; 33 // how does this subimage get placed into the output image? 34 if (dX + source->pixels->numCols >= NX) { 35 // too wide for the rest of this row 36 if (dX == 0) { 37 // alone on this row 38 NY += source->pixels->numRows; 39 dX = 0; 40 dY = 0; 41 } else { 42 // start the next row 43 NY += dY; 44 dX = source->pixels->numCols; 45 dY = source->pixels->numRows; 46 } 47 } else { 48 // extend this row 49 dX += source->pixels->numCols; 50 dY = PS_MAX (dY, source->pixels->numRows); 36 51 } 37 38 if (dX + source->pixels->numCols > NX) { 39 // go to the next row 40 // but, if we have only this one entry, we will truncate it. 41 } 42 dX += source->pixels->numCols; 43 dY = PS_MAX (dY, source->pixels->numRows); 44 45 // for a new row: 46 NY += dY; 47 48 RadialPlot (source); 52 psphotRadialPlot ("radial.plots.ps", source); 49 53 } 50 54 51 55 // allocate output image 52 psImage *output = psImageAlloc (NX, NY, PS_TYPE_F32); 56 psImage *outpos = psImageAlloc (NX, NY, PS_TYPE_F32); 57 psImage *outsub = psImageAlloc (NX, NY, PS_TYPE_F32); 58 59 int Xo = 0; // starting corner of next box 60 int Yo = 0; // starting corner of next box 61 int dY = 0; // height of row so far 53 62 54 63 // first, examine the PSF and SAT stars: … … 64 73 if (!keep) continue; 65 74 66 // add to image 75 // how does this subimage get placed into the output image? 76 if (Xo + source->pixels->numCols >= NX) { 77 // too wide for the rest of this row 78 if (Xo == 0) { 79 // alone on this row 80 PlaceImage (source, Xo, Yo); 81 Yo += source->pixels->numRows; 82 Xo = 0; 83 dY = 0; 84 } else { 85 // start the next row 86 Yo += dY; 87 Xo = 0; 88 PlaceImage (source, Xo, Yo); 89 Xo = source->pixels->numCols; 90 dY = source->pixels->numRows; 91 } 92 } else { 93 // extend this row 94 PlaceImage (source, Xo, Yo); 95 Xo += source->pixels->numCols; 96 dY = PS_MAX (dY, source->pixels->numRows); 97 } 67 98 } 68 99 69 100 psLogMsg ("psphot", PS_LOG_INFO, "%ld sources, %d moments, %d failed: %f sec\n", sources->n, Nmoments, Nfail, psTimerMark ("psphot")); 70 71 101 return (sources); 72 102 } 73 103 74 // XXX EAM : filter out bad peaks (eg, no valid pixels available for sky) -
trunk/psphot/src/psphotSummaryPlots.c
r10828 r12627 33 33 return false; 34 34 } 35 36 35 37 36 KapaResize (kapa, 500, 500);
Note:
See TracChangeset
for help on using the changeset viewer.
