Changeset 10270
- Timestamp:
- Nov 28, 2006, 5:06:41 PM (19 years ago)
- Location:
- trunk/ppMerge/src
- Files:
-
- 2 edited
-
ppMergeCombine.c (modified) (1 diff)
-
ppMergeOptions.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/src/ppMergeCombine.c
r9996 r10270 151 151 // Only reading and writing the first readout in each cell (plane 0) 152 152 if (pmReadoutReadNext(stack->data[i], fits, 0, options->rows)) { 153 // For anything except BIAS and DARK, we wanta mask154 if (options-> scale || options->zero || options->shutter) {153 // If the mask value is set, we want to generate a mask 154 if (options->combine->maskVal) { 155 155 pmReadoutSetMask(stack->data[i]); 156 156 } 157 if (options->shutter) { 158 pmReadoutSetWeight(stack->data[i]); 157 158 // If we're combining with weights, we want to generate weights. 159 if (options->combine->weights) { 160 161 // If it's a bias or dark, set the gain to zero: noise only contributed by read 162 if ((!options->zero && !options->scale) || options->darktime) { 163 pmReadoutSetWeight(stack->data[i], false); 164 } else { 165 pmReadoutSetWeight(stack->data[i], true); 166 } 159 167 } 160 168 -
trunk/ppMerge/src/ppMergeOptions.c
r9996 r10270 58 58 options->combine->nKeep = 1; 59 59 options->combine->maskVal = 0xff; 60 options->combine->weights = false; 60 61 61 62 return options; … … 67 68 68 69 // Parse a recipe option according to its type 69 #define OPTION_PARSE(OPTION,MD,NAME,TYPE) \ 70 { \ 71 psMetadataItem *item = psMetadataLookup(MD, NAME); \ 72 if (item) { \ 73 OPTION = psMetadataItemParse##TYPE(item); \ 74 } \ 70 #define OPTION_PARSE(OPTION,MD,NAME,TYPE) \ 71 { \ 72 psMetadataItem *item = psMetadataLookup(MD, NAME); \ 73 if (item) { \ 74 OPTION = psMetadataItemParse##TYPE(item); \ 75 } else { \ 76 psWarning("Recipe option %s isn't specified; using default.\n", NAME); \ 77 } \ 75 78 } 76 79 … … 139 142 OPTION_PARSE(options->combine->nKeep, recipe, "NKEEP", S32); 140 143 OPTION_PARSE(options->combine->maskVal, recipe, "MASKVAL", S32); 144 OPTION_PARSE(options->combine->weights, recipe, "WEIGHTS", Bool); 141 145 OPTION_PARSE(options->fringeNum, recipe, "FRINGE.NUM", S32); 142 146 OPTION_PARSE(options->fringeSize, recipe, "FRINGE.SIZE", S32);
Note:
See TracChangeset
for help on using the changeset viewer.
