Changeset 14834
- Timestamp:
- Sep 13, 2007, 5:39:58 PM (19 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 4 edited
-
ppStackArguments.c (modified) (2 diffs)
-
ppStackCamera.c (modified) (1 diff)
-
ppStackLoop.c (modified) (3 diffs)
-
ppStackReadout.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackArguments.c
r14811 r14834 114 114 psMetadataAddU8(arguments, PS_LIST_TAIL, "-mask-blank", 0, "Mask value for blank region", 0); 115 115 psMetadataAddF32(arguments, PS_LIST_TAIL, "-threshold-mask", 0, "Threshold for mask deconvolution", NAN); 116 117 // XXX I want to get this from the recipe as well. (same for everything else...) 118 psMetadataAddBool(arguments, PS_LIST_TAIL, "-photom", 0, "Mask value for blank region", FALSE); 116 psMetadataAddBool(arguments, PS_LIST_TAIL, "-photometry", 0, "Do photometry on stacked image?", false); 119 117 120 118 if (argc == 1 || !psArgumentParse(arguments, &argc, argv) || argc != 3) { … … 165 163 VALUE_ARG_RECIPE_FLOAT("-threshold-mask", "THRESHOLD.MASK", F32); 166 164 165 if (psMetadataLookupBool(NULL, arguments, "-photometry") || 166 psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) { 167 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PHOTOMETRY", 0, 168 "Do photometry on stacked image?", true); 169 } 170 167 171 psTrace("ppStack", 1, "Done reading command-line arguments\n"); 168 172 psFree(arguments); -
trunk/ppStack/src/ppStackCamera.c
r14811 r14834 229 229 // we create a copy of the mosaicked image for psphot so we can write out a clean image 230 230 bool mdok = false; 231 bool doPhotom = psMetadataLookupBool(&mdok, config->arguments, "PHOTOM "); // perform photometry231 bool doPhotom = psMetadataLookupBool(&mdok, config->arguments, "PHOTOMETRY"); // perform photometry 232 232 if (doPhotom) { 233 // this fileis just used as a carrier; output files (eg, PSPHOT.RESID) are defined by233 // This file, PSPHOT.INPUT, is just used as a carrier; output files (eg, PSPHOT.RESID) are defined by 234 234 // psphotDefineFiles 235 pmFPAfile *psphotInput = pmFPAfileDefineFromFPA (config, output->fpa, 1, 1, "PSPHOT.INPUT"); 236 PS_ASSERT (psphotInput, false); 237 238 // define associated psphot input/output files 239 if (!psphotDefineFiles (config, psphotInput)) { 240 psError(PSPHOT_ERR_CONFIG, false, "Trouble defining the additional input/output files for psphot"); 235 pmFPAfile *psphotInput = pmFPAfileDefineFromFPA(config, output->fpa, 1, 1, "PSPHOT.INPUT"); 236 if (!psphotInput) { 237 psError(PS_ERR_IO, false, _("Unable to generate output file from PSPHOT.INPUT")); 238 return false; 239 } 240 241 // Define associated psphot input/output files 242 if (!psphotDefineFiles(config, psphotInput)) { 243 psError(PSPHOT_ERR_CONFIG, false, 244 "Trouble defining the additional input/output files for psphot"); 241 245 return false; 242 246 } -
trunk/ppStack/src/ppStackLoop.c
r14404 r14834 8 8 #include <psmodules.h> 9 9 #include <ppStats.h> 10 #include <psphot.h>11 10 12 11 #include "ppStack.h" … … 38 37 return false; 39 38 } 40 41 bool doPhotom = psMetadataLookupBool(&mdok, config->arguments, "PHOTOM"); // perform photometry42 39 43 40 pmFPAview *view = pmFPAviewAlloc(0); // Pointer into FPA hierarchy … … 83 80 } 84 81 85 if (doPhotom) {86 if (!psphotReadout (config, view)) {87 psError(psErrorCodeLast(), false, "failure in psphotReadout for stacked image\n");88 return false;89 }90 }91 92 82 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 93 83 return false; -
trunk/ppStack/src/ppStackReadout.c
r14811 r14834 6 6 #include <pslib.h> 7 7 #include <psmodules.h> 8 #include <psphot.h> 8 9 9 10 #include "ppStack.h" … … 18 19 { 19 20 // Get the recipe values 21 bool mdok; // Status of MD lookup 20 22 int iter = psMetadataLookupS32(NULL, config->arguments, "ITER"); // Rejection iterations 21 23 float combineRej = psMetadataLookupF32(NULL, config->arguments, "COMBINE.REJ"); // Combination threshold … … 23 25 psMaskType maskBlank = psMetadataLookupU8(NULL, config->arguments, "MASK.BLANK"); // Mask for blank reg. 24 26 float threshold = psMetadataLookupF32(NULL, config->arguments, "THRESHOLD.MASK"); // Threshold for mask deconvolution 27 bool photometry = psMetadataLookupBool(&mdok, config->arguments, "PHOTOMETRY"); // Perform photometry? 25 28 26 29 // Get the output target … … 317 320 psFree(cellList); 318 321 322 if (photometry && !psphotReadout(config, view)) { 323 psError(psErrorCodeLast(), false, "Unable to perform photometry on stacked image.\n"); 324 return false; 325 } 326 327 328 329 319 330 psFree(stack); 320 331 psFree(outRO); // Drop reference
Note:
See TracChangeset
for help on using the changeset viewer.
