- Timestamp:
- Feb 28, 2012, 11:56:52 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
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/jpeg.mdc (modified) (1 diff)
-
pstamp/src/ppstampArguments.c (modified) (2 diffs)
-
pstamp/src/ppstampOptions.h (modified) (1 diff)
-
pstamp/src/ppstampParseCamera.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippconfig/recipes/filerules-mef.mdc
r32950 r33378 311 311 PPSTAMP.OUTPUT.MASK OUTPUT {OUTPUT}.mk.fits MASK COMP_MASK FPA TRUE NONE 312 312 PPSTAMP.OUTPUT.VARIANCE OUTPUT {OUTPUT}.wt.fits VARIANCE COMP_WT FPA TRUE NONE 313 PPSTAMP.OUTPUT.JPEG OUTPUT {OUTPUT}.jpg JPEG NONE FPA TRUE NONE 314 PPSTAMP.OUTPUT.JPEG.FLIP OUTPUT {OUTPUT}.jpg JPEG NONE FPA TRUE NONE 313 315 PPSTAMP.CHIP.MEF OUTPUT {OUTPUT}.ch.fits IMAGE NONE CHIP FALSE MEF 314 316 -
trunk/ippconfig/recipes/filerules-simple.mdc
r32751 r33378 291 291 PPSTAMP.OUTPUT.MASK OUTPUT {OUTPUT}.mk.fits MASK COMP_MASK FPA TRUE NONE 292 292 PPSTAMP.OUTPUT.VARIANCE OUTPUT {OUTPUT}.wt.fits VARIANCE COMP_WT FPA TRUE NONE 293 PPSTAMP.OUTPUT.JPEG OUTPUT {OUTPUT}.jpg JPEG NONE FPA TRUE NONE 294 PPSTAMP.OUTPUT.JPEG.FLIP OUTPUT {OUTPUT}.jpg JPEG NONE FPA TRUE NONE 293 295 PPSTAMP.CHIP OUTPUT {OUTPUT}.ch.fits IMAGE NONE CHIP FALSE NONE 294 296 -
trunk/ippconfig/recipes/filerules-split.mdc
r32950 r33378 322 322 PPSTAMP.OUTPUT.MASK OUTPUT {OUTPUT}.mk.fits MASK COMP_MASK FPA TRUE NONE 323 323 PPSTAMP.OUTPUT.VARIANCE OUTPUT {OUTPUT}.wt.fits VARIANCE COMP_WT FPA TRUE NONE 324 PPSTAMP.OUTPUT.JPEG OUTPUT {OUTPUT}.jpg JPEG NONE FPA TRUE NONE 325 PPSTAMP.OUTPUT.JPEG.FLIP OUTPUT {OUTPUT}.jpg JPEG NONE FPA TRUE NONE 324 326 # mosaic image used for making stamps of raw images. Not saved. 325 327 PPSTAMP.CHIP OUTPUT {OUTPUT}.ch.fits IMAGE NONE CHIP FALSE MEF 326 PPSTAMP.OUTPUT.JPEG1 OUTPUT {OUTPUT}.jpg JPEG NONE FPA TRUE NONE327 328 328 329 PPSIM.OUTPUT OUTPUT {OUTPUT}.{CHIP.NAME}.fits IMAGE NONE CHIP TRUE SPLIT -
trunk/ippconfig/recipes/jpeg.mdc
r29554 r33378 254 254 END 255 255 256 PPSTAMP.OUTPUT.JPEG METADATA 257 COLORMAP STR greyscale 258 SCALE.MODE STR RANGE 259 SCALE.MIN F32 -5.0 260 SCALE.MAX F32 +10.0 261 OPTIONS STR -SB,+X,+Y 262 END 263 264 PPSTAMP.OUTPUT.JPEG.FLIP METADATA 265 COLORMAP STR greyscale 266 SCALE.MODE STR RANGE 267 SCALE.MIN F32 -5.0 268 SCALE.MAX F32 +10.0 269 OPTIONS STR -SB,-X,+Y 270 END -
trunk/pstamp/src/ppstampArguments.c
r29885 r33378 21 21 fprintf(stderr, "\n"); 22 22 fprintf(stderr, "Optional arguments:\n"); 23 fprintf(stderr, " [-class_id class_id] selects class_id (only used with -pixcenter)\n"); 24 fprintf(stderr, " [-astrom astrom.cmp] : provide an alternative astrometry calibration\n"); 25 fprintf(stderr, " [-mask mk_image] : mask image\n"); 26 fprintf(stderr, " [-variance var_image] : variance image\n"); 27 fprintf(stderr, " [-no_censor_masked] : do not set masked pixels to NAN\n"); 23 fprintf(stderr, " [-class_id class_id] : selects class_id (only used with -pixcenter)\n"); 24 fprintf(stderr, " [-astrom astrom.cmp] : provide an alternative astrometry calibration\n"); 25 fprintf(stderr, " [-mask mk_image] : mask image\n"); 26 fprintf(stderr, " [-variance var_image] : variance image\n"); 27 fprintf(stderr, " [-stage stage] : stage of input image (raw, chip, warp, stack, diff)\n"); 28 fprintf(stderr, " [-write_jpeg] : write a JPEG format of the image stamp\n"); 29 // fprintf(stderr, " [-no_censor_masked] : do not set masked pixels to NAN\n"); 28 30 fprintf(stderr, "\n"); 29 31 … … 84 86 psArgumentRemove(argnum, &argc, argv); 85 87 } 88 if ((argnum = psArgumentGet(argc, argv, "-write_jpeg"))) { 89 psArgumentRemove(argnum, &argc, argv); 90 options->writeJPEG = true; 91 } else { 92 options->writeJPEG = false; 93 } 86 94 87 95 pmConfigFileSetsMD(config->arguments, &argc, argv, "ASTROM", "-astrom", "-astromlist"); -
trunk/pstamp/src/ppstampOptions.h
r29885 r33378 16 16 psRegion roi; // roi in chip coordinates 17 17 bool censorMasked; 18 18 bool writeJPEG; 19 19 } ppstampOptions; 20 20 -
trunk/pstamp/src/ppstampParseCamera.c
r29379 r33378 8 8 9 9 // Set up the ppstamp output Image file 10 bool setupOutput(pmConfig *config, pmFPAfile *input, psString stage, bool doMask, bool doWeight )10 bool setupOutput(pmConfig *config, pmFPAfile *input, psString stage, bool doMask, bool doWeight, pmFPAfile **pOutput) 11 11 { 12 12 pmFPAfile *output; … … 22 22 return false; 23 23 } 24 *pOutput = output; 24 25 25 26 output->save = true; … … 33 34 outWeight->save = true; 34 35 } 36 35 37 36 38 return true; … … 76 78 77 79 78 79 80 // XXX: create a filerule for PPSTAMP.ASTROM 80 81 pmFPAfile *astrom = pmFPAfileDefineFromArgs(&status, config, "PSWARP.ASTROM", "ASTROM"); … … 95 96 96 97 // Set up the output target 97 if (!setupOutput(config, input, options->stage, doMask, doWeight)) { 98 pmFPAfile *output; 99 if (!setupOutput(config, input, options->stage, doMask, doWeight, &output)) { 98 100 psError(PS_ERR_UNKNOWN, false, "Unable to setup output."); 99 101 return false; 100 102 } 101 103 102 pmFPAfile *chipImage = pmFPAfileDefineChipMosaic(config, input->fpa, "PPSTAMP.CHIP");104 pmFPAfile *chipImage = pmFPAfileDefineChipMosaic(config, output->fpa, "PPSTAMP.CHIP"); 103 105 if (!chipImage) { 104 106 psError(PS_ERR_IO, false, _("Unable to generate new file from PPSTAMP.CHIP")); … … 108 110 psError(PS_ERR_IO, true, "PPSTAMP.CHIP is not of type IMAGE"); 109 111 return NULL; 112 } 113 114 if (options->writeJPEG) { 115 char *filerule; 116 // If stage is chip flip the X axis otherwise don't flip. 117 // XXX: is this the right thing to do? 118 // Shouldn't the JPEG match the stamp even for chip stage? 119 if (!options->stage || strcmp(options->stage, "chip")) { 120 filerule = "PPSTAMP.OUTPUT.JPEG"; 121 } else { 122 filerule = "PPSTAMP.OUTPUT.JPEG.FLIP"; 123 } 124 pmFPAfile *jpg = pmFPAfileDefineOutput(config, output->fpa, filerule); 125 if (!jpg) { 126 psError(PS_ERR_IO, false, "Unable to generate new file from %s", filerule); 127 return NULL; 128 } 129 if (jpg->type != PM_FPA_FILE_JPEG) { 130 psError(PS_ERR_IO, true, "%s is not of type JPEG", filerule); 131 return NULL; 132 } 133 jpg->save = true; 110 134 } 111 135
Note:
See TracChangeset
for help on using the changeset viewer.
