Changeset 34628
- Timestamp:
- Oct 30, 2012, 4:31:12 PM (14 years ago)
- Location:
- branches/czw_branch/20120906
- Files:
-
- 7 edited
-
ippScripts/scripts/skycell_jpeg.pl (modified) (3 diffs)
-
ippconfig/recipes/filerules-mef.mdc (modified) (1 diff)
-
ippconfig/recipes/filerules-simple.mdc (modified) (1 diff)
-
ippconfig/recipes/filerules-split.mdc (modified) (1 diff)
-
ippconfig/recipes/ppBackground.mdc (modified) (1 diff)
-
ppBackground/src/ppBackground.h (modified) (1 diff)
-
ppBackground/src/ppBackgroundRestore.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/ippScripts/scripts/skycell_jpeg.pl
r34491 r34628 269 269 my %tangents = (); 270 270 271 my %products = ('image' => "PPSTACK. OUTPUT",272 'mask' => "PPSTACK. OUTPUT.MASK",273 'variance' => "PPSTACK. OUTPUT.VARIANCE",274 'exp' => "PPSTACK. OUTPUT.EXP",275 'num' => "PPSTACK. OUTPUT.EXPNUM",276 # 'bkg' => "PPSTACK.OUTPUT.BKG"271 my %products = ('image' => "PPSTACK.UNCONV", 272 'mask' => "PPSTACK.UNCONV.MASK", 273 'variance' => "PPSTACK.UNCONV.VARIANCE", 274 'exp' => "PPSTACK.UNCONV.EXP", 275 'num' => "PPSTACK.UNCONV.EXPNUM", 276 'bkg' => "PPSTACK.OUTPUT.BKGMODEL" 277 277 ); 278 278 … … 292 292 unless (exists($tangents{$projection_cell})) { 293 293 # Make a temp file and fill, but be sure to save 294 295 294 foreach my $key (keys %products) { 296 297 295 ($tempFile, $tempName) = tempfile("/tmp/skycell.$projection_cell.$key.XXXX", 298 296 UNLINK => !$save_temps); … … 321 319 $command = "$ppSkycell -images $tangents{$projection_cell}{$key}{NAME}"; 322 320 $command .= " ${outroot}.${projection_cell}.${key} "; 321 if ($key eq 'bkg') { 322 $command .= " -Di BIN1 1 -Di BIN2 1 "; 323 } 324 elsif ($key eq 'image') { 325 $command .= " -masks $tangents{$projection_cell}{mask}{NAME} "; 326 } 327 elsif ($key eq 'mask') { 328 next; # This should be made with the images. 329 } 323 330 print "$command\n"; 324 331 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose); -
branches/czw_branch/20120906/ippconfig/recipes/filerules-mef.mdc
r34531 r34628 342 342 PPSKYCELL.BIN1 OUTPUT {OUTPUT}.{FILE.INDEX}.b1.fits IMAGE NONE FPA TRUE NONE 343 343 PPSKYCELL.BIN2 OUTPUT {OUTPUT}.{FILE.INDEX}.b2.fits IMAGE NONE FPA TRUE NONE 344 PPSKYCELL.BIN1.MASK OUTPUT {OUTPUT}.{FILE.INDEX}.b1.mk.fits MASK COMP_MASK FPA TRUE NONE 345 PPSKYCELL.BIN2.MASK OUTPUT {OUTPUT}.{FILE.INDEX}.b2.mk.fits MASK COMP_MASK FPA TRUE NONE 344 346 345 347 LOG.IMFILE OUTPUT {OUTPUT}.{CHIP.NAME}.log TEXT NONE CHIP TRUE NONE -
branches/czw_branch/20120906/ippconfig/recipes/filerules-simple.mdc
r34531 r34628 321 321 PPSKYCELL.BIN1 OUTPUT {OUTPUT}.{FILE.INDEX}.b1.fits IMAGE NONE FPA TRUE NONE 322 322 PPSKYCELL.BIN2 OUTPUT {OUTPUT}.{FILE.INDEX}.b2.fits IMAGE NONE FPA TRUE NONE 323 PPSKYCELL.BIN1.MASK OUTPUT {OUTPUT}.b1.mk.fits MASK COMP_MASK FPA TRUE NONE 324 PPSKYCELL.BIN2.MASK OUTPUT {OUTPUT}.b2.mk.fits MASK COMP_MASK FPA TRUE NONE 323 325 324 326 LOG.IMFILE OUTPUT {OUTPUT}.imfile.log TEXT NONE FPA TRUE NONE -
branches/czw_branch/20120906/ippconfig/recipes/filerules-split.mdc
r34531 r34628 355 355 PPSKYCELL.BIN1 OUTPUT {OUTPUT}.b1.fits IMAGE COMP_IMG FPA TRUE NONE 356 356 PPSKYCELL.BIN2 OUTPUT {OUTPUT}.b2.fits IMAGE COMP_IMG FPA TRUE NONE 357 PPSKYCELL.BIN1.MASK OUTPUT {OUTPUT}.b1.mk.fits MASK COMP_MASK FPA TRUE NONE 358 PPSKYCELL.BIN2.MASK OUTPUT {OUTPUT}.b2.mk.fits MASK COMP_MASK FPA TRUE NONE 357 359 358 360 LOG.IMFILE OUTPUT {OUTPUT}.{CHIP.NAME}.log TEXT NONE CHIP TRUE NONE -
branches/czw_branch/20120906/ippconfig/recipes/ppBackground.mdc
r28486 r34628 1 1 # Recipe options for ppBackground 2 2 3 BINNING_RECIPE STR PSPHOT 4 BINNING_XNAME STR BACKGROUND.XBIN 5 BINNING_YNAME STR BACKGROUND.YBIN 6 7 DEFAULT METADATA 8 END 9 10 11 STACK METADATA 12 BINNING_RECIPE STR PSWARP 13 BINNING_XNAME STR BKG.XGRID 14 BINNING_YNAME STR BKG.YGRID 15 END 16 3 17 4 18 BACKGROUND METADATA -
branches/czw_branch/20120906/ppBackground/src/ppBackground.h
r28300 r34628 37 37 ); 38 38 39 /// Determine the binning from the recipe if available. 40 psImageBinning *ppBackgroundBinningByRecipe(const psImage *image, // Image for which to generate a bg model 41 const pmConfig *config, // Configuration 42 psString recipe_name, 43 psString Xbin_name, 44 psString Ybin_name 45 ); 46 47 39 48 /// Restore the background to an image 40 49 bool ppBackgroundRestore( -
branches/czw_branch/20120906/ppBackground/src/ppBackgroundRestore.c
r34298 r34628 5 5 6 6 #include "ppBackground.h" 7 8 psImageBinning *ppBackgroundBinningByRecipe(const psImage *image, // Image for which to generate a bg model 9 const pmConfig *config, // Configuration 10 psString recipe_name, 11 psString Xbin_name, 12 psString Ybin_name 13 ) 14 { 15 bool status = true; 16 17 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, recipe_name); 18 assert (recipe); 19 20 // I have the fine image size, I know the binning factor, determine the ruff image size 21 psImageBinning *binning = psImageBinningAlloc(); 22 binning->nXfine = image->numCols; 23 binning->nYfine = image->numRows; 24 binning->nXbin = psMetadataLookupS32(&status, recipe, Xbin_name); 25 binning->nYbin = psMetadataLookupS32(&status, recipe, Ybin_name); 26 27 psImageBinningSetRuffSize(binning, PS_IMAGE_BINNING_CENTER); 28 psImageBinningSetSkip(binning, image); 29 30 return binning; 31 } 32 33 34 7 35 8 36 bool ppBackgroundRestore(pmChip *chip, const pmChip *background, const pmChip *pattern, … … 27 55 if (background) { 28 56 pmReadout *bgRO = pmFPAviewThisReadout(view, background->parent); // Readout with background 29 psImageBinning *binning = psphotBackgroundBinning(image, config); 57 58 psImageBinning *binning; 59 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPBACKGROUND_RECIPE); // Recipe 60 if (!recipe) { 61 binning = psphotBackgroundBinning(image, config); 62 } 63 else { 64 binning = ppBackgroundBinningByRecipe(image,config, 65 psMetadataLookupStr(NULL,recipe,"BINNING_RECIPE"), 66 psMetadataLookupStr(NULL,recipe,"BINNING_XNAME"), 67 psMetadataLookupStr(NULL,recipe,"BINNING_YNAME")); 68 } 69 70 fprintf(stderr,"%d %d %d %d\n",binning->nXfine,binning->nYfine,binning->nXbin,binning->nYbin); 30 71 if (!binning) { 31 72 psError(psErrorCodeLast(), false, "Unable to find background binning"); … … 49 90 for (int y = 0; y < numRows; y++) { 50 91 for (int x = 0; x < numCols; x++) { 92 if ((y % 250 == 0)&&(x % 250 == 0)) { 93 printf("%d %d %g\n",x,y,bgImage->data.F32[y][x]); 94 } 51 95 image->data.F32[y][x] += bgImage->data.F32[y][x]; 96 52 97 } 53 98 }
Note:
See TracChangeset
for help on using the changeset viewer.
