Changeset 14993
- Timestamp:
- Sep 24, 2007, 9:10:40 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20070921/psphot/src/psphotSourcePlots.c
r13900 r14993 20 20 int dY = 0; // height of row so far 21 21 int NX = 20*DX; // full width of output image 22 int NY = 0; // total height of output image22 int NY = DY; // total height of output image so far 23 23 24 // first, examine the PSF and SAT stars: 25 // - determine bounding boxes for summary image 24 // first, examine the PSF and SAT stars to set output image size: 25 // - add stamp widths until we exceed output image width, 26 // - then start a new row offset by max height 26 27 for (int i = 0; i < sources->n; i++) { 27 28 … … 31 32 keep |= (source->mode & PM_SOURCE_MODE_PSFSTAR); 32 33 keep |= (source->mode & PM_SOURCE_MODE_SATSTAR); 33 if (!keep) continue; 34 if (!keep) { 35 psTrace ("psphot", 4, "not plotting star %d: %x", i, source->mode); 36 continue; 37 } 34 38 35 39 // how does this subimage get placed into the output image? … … 57 61 } 58 62 63 if (NY == 0) { 64 psWarning ("no PSF or SAT stars to plot? skipping.\n"); 65 return false; 66 } 67 59 68 // allocate output image 60 69 psImage *outpos = psImageAlloc (NX, NY, PS_TYPE_F32); 61 70 psImage *outsub = psImageAlloc (NX, NY, PS_TYPE_F32); 71 72 psImageInit (outpos, 0.0); 73 psImageInit (outsub, 0.0); 62 74 63 75 int Xo = 0; // starting corner of next box … … 142 154 psFree (outpos); 143 155 psFree (outsub); 144 return (sources);156 return true; 145 157 } 146 158
Note:
See TracChangeset
for help on using the changeset viewer.
