Changeset 16704
- Timestamp:
- Feb 27, 2008, 5:38:21 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
ippconfig/recipes/ppStack.config (modified) (2 diffs)
-
ppStack/src/ppStackArguments.c (modified) (2 diffs)
-
ppStack/src/ppStackLoop.c (modified) (6 diffs)
-
ppStack/src/ppStackReadout.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippconfig/recipes/ppStack.config
r16683 r16704 3 3 ITER S32 1 # Number of rejection iterations 4 4 COMBINE.REJ F32 2.0 # Rejection threshold in combination (sigma) 5 CONVOLVE.REJ F32 10.0 # Rejection threshold in convolution (sigma)5 CONVOLVE.REJ F32 5.0 # Rejection threshold in convolution (sigma) 6 6 EXTENT F32 3.0 # Extent of Gaussian convolution (sigma) 7 7 MASK.BAD STR BLANK,SAT,BAD # Mask value of bad pixels … … 16 16 PSF.ORDER S32 3 # Order of spatial variation for PSF generation 17 17 PSF.MODEL STR PS_MODEL_RGAUSS # Model for PSF generation 18 19 TEMP.IMAGE STR conv.im.fits # Suffix for convolved images 20 TEMP.MASK STR conv.mk.fits # Suffix for convolved masks 21 TEMP.IMAGE STR conv.wt.fits # Suffix for convolved weight maps 22 TEMP.DELETE BOOL TRUE # Delete temporary files on completion? -
trunk/ppStack/src/ppStackArguments.c
r16622 r16704 124 124 psMetadataAddBool(arguments, PS_LIST_TAIL, "-variance", 0, "Use variance for rejection?", false); 125 125 psMetadataAddBool(arguments, PS_LIST_TAIL, "-safe", 0, "Play safe with small numbers of pixels to combine?", false); 126 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-image", 0, "Suffix for temporary images", NULL); 127 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-mask", 0, "Suffix for temporary masks", NULL); 128 psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-weight", 0, "Suffix for temporary weight maps", NULL); 129 psMetadataAddBool(arguments, PS_LIST_TAIL, "-temp-delete", 0, "Delete temporary files on completion?", false); 126 130 127 131 if (argc == 1 || !psArgumentParse(arguments, &argc, argv) || argc != 3) { … … 188 192 } 189 193 194 valueArgStr(config, arguments, "-temp-image", "TEMP.IMAGE", config->arguments); 195 valueArgStr(config, arguments, "-temp-mask", "TEMP.MASK", config->arguments); 196 valueArgStr(config, arguments, "-temp-weight", "TEMP.WEIGHT", config->arguments); 197 198 if (psMetadataLookupBool(NULL, arguments, "-temp-delete") || 199 psMetadataLookupBool(NULL, recipe, "TEMP.DELETE")) { 200 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "TEMP.DELETE", 0, 201 "Delete temporary files on completion?", true); 202 } 203 204 190 205 psTrace("ppStack", 1, "Done reading command-line arguments\n"); 191 206 psFree(arguments); -
trunk/ppStack/src/ppStackLoop.c
r16693 r16704 4 4 5 5 #include <stdio.h> 6 #include <unistd.h> 6 7 #include <string.h> 7 8 #include <pslib.h> … … 11 12 #include "ppStack.h" 12 13 13 #define TESTING14 //#define TESTING 14 15 15 16 // Here follows lists of files for activation/deactivation at various stages. Each must be NULL-terminated. … … 185 186 assert(config); 186 187 188 bool mdok; // Status of MD lookup 187 189 psMaskType maskBlank = psMetadataLookupU8(NULL, config->arguments, "MASK.BLANK"); // Mask for blank reg. 188 189 bool mdok; // Status of MD lookup 190 bool tempDelete = psMetadataLookupBool(&mdok, config->arguments, "TEMP.DELETE"); // Delete temporary files? 191 const char *tempImage = psMetadataLookupStr(NULL, config->arguments, "TEMP.IMAGE"); // Suffix for temporary images 192 const char *tempMask = psMetadataLookupStr(NULL, config->arguments, "TEMP.MASK"); // Suffix for temporary masks 193 const char *tempWeight = psMetadataLookupStr(NULL, config->arguments, "TEMP.WEIGHT"); // Suffix for temporary weight (variance) maps 194 if (!tempImage || !tempMask || !tempWeight) { 195 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find TEMP.IMAGE, TEMP.MASK and TEMP.WEIGHT"); 196 return false; 197 } 198 190 199 const char *statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS"); // Filename for statistics 191 200 psMetadata *stats = NULL; // Container for statistics … … 286 295 } 287 296 288 const char *suffix = "conv.fits"; // Suffix for convolved images; ultimately this will be from recipe289 297 const char *outName = psMetadataLookupStr(NULL, config->arguments, "OUTPUT"); // Output root 290 298 assert(outName); … … 294 302 for (int i = 0; i < num; i++) { 295 303 psString imageName = NULL, maskName = NULL, weightName = NULL; // Names for convolved images 296 psStringAppend(&imageName, "%s. im-%d.%s", outName, i, suffix);297 psStringAppend(&maskName, "%s. mk-%d.%s", outName, i, suffix);298 psStringAppend(&weightName, "%s. wt-%d.%s", outName, i, suffix);304 psStringAppend(&imageName, "%s.%d.%s", outName, i, tempImage); 305 psStringAppend(&maskName, "%s.%d.%s", outName, i, tempMask); 306 psStringAppend(&weightName, "%s.%d.%s", outName, i, tempWeight); 299 307 imageNames->data[i] = imageName; 300 308 maskNames->data[i] = maskName; … … 508 516 psFitsClose(maskFits->data[i]); 509 517 psFitsClose(weightFits->data[i]); 518 if (tempDelete && (unlink(imageNames->data[i]) || unlink(maskNames->data[i]) || 519 unlink(weightNames->data[i]))) { 520 psWarning("Unable to delete temporary files for image %d", i); 521 } 510 522 } 511 523 -
trunk/ppStack/src/ppStackReadout.c
r16693 r16704 12 12 #define WCS_TOLERANCE 0.001 // Tolerance for WCS 13 13 14 #define REJECTION_FILES // Write rejection mask? 15 #define INSPECTION_FILES // Write inspection mask? 16 #define COMBINED_FILES // Write combined images? 17 14 //#define REJECTION_FILES // Write rejection mask? 15 //#define INSPECTION_FILES // Write inspection mask? 16 //#define COMBINED_FILES // Write combined images? 18 17 19 18
Note:
See TracChangeset
for help on using the changeset viewer.
