- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
magic (modified) (1 prop)
-
magic/remove (modified) (1 prop)
-
magic/remove/src (modified) (1 prop)
-
magic/remove/src/streaksrelease.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/magic
- Property svn:ignore
-
old new 1 1 magic 2 2 ssa-core-cpp 3 Makefile4 3 Makefile.bak
-
- Property svn:ignore
-
branches/simtest_nebulous_branches/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
-
branches/simtest_nebulous_branches/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 12 stamp-h1
-
- Property svn:ignore
-
branches/simtest_nebulous_branches/magic/remove/src/streaksrelease.c
r24853 r27840 3 3 static pmConfig *parseArguments(int argc, char **argv); 4 4 static bool readAndCopyToOutput(streakFiles *sf, bool exciseAll); 5 static StreakPixels * getStreakPixels(streakFiles *sfiles, Streaks *streaks);6 static void exciseNonWarpedPixels(streakFiles *sfiles, double newMaskValue);7 static bool warpedPixel(streakFiles *sfiles, PixelPos *cellCoord);8 static void excisePixel(streakFiles *sfiles, unsigned int x, unsigned int y, bool streak, double newMaskValue);9 5 static void writeImages(streakFiles *sf, bool exciseImageCube); 6 7 char *streaksProgram = "streaksrelease"; 10 8 11 9 int 12 10 main(int argc, char *argv[]) 13 11 { 14 bool status;15 16 12 psLibInit(NULL); 17 13 psTimerStart("STREAKSREMOVE"); … … 22 18 return PS_EXIT_CONFIG_ERROR; 23 19 } 24 25 // Values to set for masked pixels26 psU32 maskStreak = 0; // for the image and weight (usually NAN, MAXINT for integer images)27 psU32 maskMask = 0; // value looked up for MASK.STREAK28 20 29 21 // Does true work here? … … 56 48 57 49 // now that we've read the input files, lookup the mask values that we read 58 if (maskStreak == 0) {59 strkGetMaskValues(sfiles, &maskStreak, &maskMask); 60 }61 62 setMaskedToNAN(sfiles, maskMask, true);50 strkGetMaskValues(sfiles); 51 52 if (!sfiles->inImage->imagecube) { 53 setMaskedToNAN(sfiles, sfiles->maskMask, true); 54 } 63 55 64 56 // write out the destreaked temporary images and the recovery images … … 216 208 // image data directly from psFits 217 209 readImage(sf->inImage, sf->extnum, sf->stage, false); 218 210 219 211 // astrom struct is only needed for raw stage, and only the chip to cell parameters are used 220 212 sf->astrom = streakSetAstrometry(sf->astrom, sf->stage, NULL, NULL, false, … … 232 224 if (sf->inImage->image) { 233 225 setupImageRefs(sf->outImage, sf->recImage, sf->inImage, sf->extnum, exciseAll); 234 } else if (sf->inImage->imagecube) {235 // Image cubes should have been excised in the destreaking process236 streaksExit("unexpected imagecube found", PS_EXIT_CONFIG_ERROR);237 226 } else { 238 return false;227 // image cubes are handled specially 239 228 } 240 229 … … 284 273 285 274 275 // XXXX: why isn't this in streaksio.c ?? See also streakremove.c 286 276 static void 287 277 writeImages(streakFiles *sf, bool exciseImageCube) … … 304 294 initValue = NAN; 305 295 } else { 306 // otherwise write it to the output 296 // otherwise write it to the output 307 297 writeImageCube(sf->outImage, sf->inImage->imagecube, extname, sf->extnum); 308 298 initValue = 0; 309 299 } 310 300 311 // borrow one of the images from the imagecube and set it to init value312 psImage *image = psArrayGet (sf->inImage->imagecube, 0);313 psMemIncrRefCounter(image);314 psImageInit(image, initValue);315 if (exciseImageCube) {316 sf->outImage->image = image;317 writeImage(sf->outImage, extname, sf->extnum);318 } else {319 // write zero valued image to reccovery320 if (sf->recImage) {321 sf->recImage->image = image;322 writeImage(sf->recImage, extname, sf->extnum);323 }324 }325 301 // Assumption: there are no mask and weight images for video cells 326 302 return;
Note:
See TracChangeset
for help on using the changeset viewer.
