Changeset 16686 for trunk/ppStack/src/ppStackReadout.c
- Timestamp:
- Feb 27, 2008, 11:17:39 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackReadout.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackReadout.c
r16682 r16686 14 14 #define REJECTION_FILES // Write rejection mask? 15 15 #define INSPECTION_FILES // Write inspection mask? 16 #define COMBINED_FILES // Write combined images? 16 17 17 18 static int sectionNum = 0; // Section number; for debugging outputs … … 39 40 bool useVariance = psMetadataLookupBool(&mdok, config->arguments, "VARIANCE"); // Use variance for rejection? 40 41 bool safe = psMetadataLookupBool(&mdok, config->arguments, "SAFE"); // Play safe when combining small numbers of pixels? 42 psMetadata *ppsub = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe 43 int kernelSize = psMetadataLookupS32(NULL, ppsub, "KERNEL.SIZE"); // Kernel half-size 44 41 45 42 46 int num = readouts->n; // Number of inputs … … 109 113 } 110 114 111 if (!pmStackCombine(outRO, stack, maskBad, maskBlank, iter, combineRej, useVariance, safe)) {115 if (!pmStackCombine(outRO, stack, maskBad, maskBlank, kernelSize, iter, combineRej, useVariance, safe)) { 112 116 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts with rejection."); 113 117 psFree(fpaList); … … 117 121 } 118 122 123 #ifdef COMBINED_FILES 124 { 125 psString name = NULL; // Name of image 126 psStringAppend(&name, "combined1_%03d.fits", sectionNum); 127 psFits *fits = psFitsOpen(name, "w"); 128 psFree(name); 129 psFitsWriteImage(fits, NULL, outRO->image, 0, NULL); 130 psFitsClose(fits); 131 } 132 #endif 119 133 #ifdef INSPECTION_FILES 120 {121 psString name = NULL; // Name of image122 psStringAppend(&name, "combined_%03d.fits", sectionNum);123 psFits *fits = psFitsOpen(name, "w");124 psFree(name);125 psFitsWriteImage(fits, NULL, outRO->image, 0, NULL);126 psFitsClose(fits);127 }128 129 134 for (int i = 0; i < stack->n; i++) { 130 135 pmStackData *data = stack->data[i]; // Data for this image … … 178 183 #endif 179 184 180 if (!pmStackCombine(outRO, stack, maskBad, maskBlank, 0, combineRej, useVariance, false)) {185 if (!pmStackCombine(outRO, stack, maskBad, maskBlank, kernelSize, 0, combineRej, useVariance, false)) { 181 186 psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts."); 182 187 psFree(fpaList); … … 186 191 } 187 192 193 #ifdef COMBINED_FILES 194 { 195 psString name = NULL; // Name of image 196 psStringAppend(&name, "combined2_%03d.fits", sectionNum); 197 psFits *fits = psFitsOpen(name, "w"); 198 psFree(name); 199 psFitsWriteImage(fits, NULL, outRO->image, 0, NULL); 200 psFitsClose(fits); 201 } 202 #endif 203 188 204 psMetadataAddF32(outCell->concepts, PS_LIST_TAIL, "CELL.EXPOSURE", PS_META_REPLACE, 189 205 "Summed exposure time (sec)", totExposure);
Note:
See TracChangeset
for help on using the changeset viewer.
