Changeset 26438 for trunk/magic/remove/src/diffedpixels.c
- Timestamp:
- Dec 16, 2009, 12:22:44 PM (16 years ago)
- Location:
- trunk/magic/remove
- Files:
-
- 2 edited
- 1 moved
-
. (modified) (1 prop)
-
src (modified) (1 prop)
-
src/diffedpixels.c (moved) (moved from trunk/magic/remove/src/warpedpixels.c ) (8 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/magic/remove
-
Property svn:ignore
set to
configure
Makefile.in
Doxyfile
config.log
depcomp
config.status
config.guess
ltmain.sh
config.sub
autom4te.cache
libtool
missing
Makefile
aclocal.m4
install-sh
-
Property svn:ignore
set to
-
trunk/magic/remove/src
- Property svn:ignore
-
old new 4 4 streakscompare 5 5 streaksrelease 6 makefile 6 Makefile 7 Makefile.in 8 config.h 9 .deps 10 streaksVersionDefinitions.h 11 config.h.in
-
- Property svn:ignore
-
trunk/magic/remove/src/diffedpixels.c
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/eam_branches/20091113/magic/remove/src/warpedpixels.c 26119-26255
r26406 r26438 9 9 static int xRight(psPlane *pt, int y); 10 10 11 // Examine the set of diff skycells and compute the pixels that were 12 // included in difference processing 11 13 bool 12 compute WarpedPixels(streakFiles *sf)14 computeDiffedPixels(streakFiles *sf) 13 15 { 14 16 bool status; … … 29 31 psFree(bounds); 30 32 31 sf-> warpedPixels = psImageAlloc(width, height, PS_TYPE_U8);32 psImageInit(sf-> warpedPixels, 0);33 sf->diffedPixels = psImageAlloc(width, height, PS_TYPE_U8); 34 psImageInit(sf->diffedPixels, 0); 33 35 34 36 for (int i=0; i<n; i++) { … … 42 44 bool writeTouchedPixels = false; // XXX: make this an argument to the program 43 45 if (writeTouchedPixels) { 44 // write out the warped pixels46 // write out the diffed pixels 45 47 psMetadata * header = psMetadataAlloc(); 46 48 if (sf->inAstrom->fpa->toSky->type != PS_PROJ_DIS) { 47 49 pmAstromWriteWCS(header, sf->inAstrom->fpa, sf->chip, 0.001); 48 50 } 49 psFits *fits = psFitsOpen(" warpedpixels.fits", "w");50 51 psFitsWriteImage(fits, header, sf-> warpedPixels, 0, NULL);51 psFits *fits = psFitsOpen("diffedpixels.fits", "w"); 52 53 psFitsWriteImage(fits, header, sf->diffedPixels, 0, NULL); 52 54 psFitsClose(fits); 53 55 psFree(header); … … 84 86 /* now set up our wrapper to the chip astrometry to apply to the whole chip */ 85 87 sf->astrom = streakSetAstrometry(sf->astrom, sf->stage, sf->inAstrom->fpa, sf->chip, false, NULL, 86 sf-> warpedPixels->numCols, sf->warpedPixels->numRows);88 sf->diffedPixels->numCols, sf->diffedPixels->numRows); 87 89 88 90 // convert corners of skycell to sky coordinates … … 138 140 // Now set the touched pixels 139 141 int ymin = fmax(0, pt[1].y ); 140 int ymax = fmin(pt[3].y + 0.5, sf-> warpedPixels->numRows - 1);142 int ymax = fmin(pt[3].y + 0.5, sf->diffedPixels->numRows - 1); 141 143 #if (DEBUG_PRINT > 1) 142 144 printf("\nymin: %d ymax: %d\n", ymin, ymax); … … 149 151 xleft = 0; 150 152 } 151 if (xleft > sf-> warpedPixels->numCols) {153 if (xleft > sf->diffedPixels->numCols) { 152 154 continue; 153 155 } … … 155 157 continue; 156 158 } 157 if (xright >= sf-> warpedPixels->numCols) {158 xright = sf-> warpedPixels->numCols - 1;159 if (xright >= sf->diffedPixels->numCols) { 160 xright = sf->diffedPixels->numCols - 1; 159 161 } 160 162 #if (DEBUG_PRINT > 1) … … 162 164 #endif 163 165 164 psU8 *rowPixels = sf-> warpedPixels->data.U8[y];166 psU8 *rowPixels = sf->diffedPixels->data.U8[y]; 165 167 166 168 int n = xright - xleft + 1; -
Property svn:mergeinfo
set to (toggle deleted branches)
Note:
See TracChangeset
for help on using the changeset viewer.
