Changeset 16602 for branches/pap_branch_080207/ppStack/src/ppStackReadout.c
- Timestamp:
- Feb 22, 2008, 9:20:13 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap_branch_080207/ppStack/src/ppStackReadout.c
r16424 r16602 10 10 #include "ppStack.h" 11 11 12 13 12 #define WCS_TOLERANCE 0.001 // Tolerance for WCS 14 13 15 14 //#define REJECTION_FILES // Write rejection mask? 16 15 //#define INSPECTION_FILES // Write inspection mask? 16 17 static int sectionNum = 0; // Section number; for debugging outputs 18 17 19 18 20 bool ppStackReadout(const pmConfig *config, pmReadout *outRO, const psArray *readouts, … … 26 28 assert(readouts->n == regions->n); 27 29 assert(regions->n == kernels->n); 30 28 31 29 32 // Get the recipe values … … 113 116 #ifdef INSPECTION_FILES 114 117 { 115 psFits *fits = psFitsOpen("combined.fits", "w"); 118 psString name = NULL; // Name of image 119 psStringAppend(&name, "combined_%03d.fits", sectionNum); 120 psFits *fits = psFitsOpen(name, "w"); 121 psFree(name); 116 122 psFitsWriteImage(fits, NULL, outRO->image, 0, NULL); 117 123 psFitsClose(fits); … … 121 127 pmStackData *data = stack->data[i]; // Data for this image 122 128 psImage *inspected = psPixelsToMask(NULL, data->pixels, 123 psRegionSet(0, data->readout->image->numCols ,124 0, data->readout->image->numRows ),129 psRegionSet(0, data->readout->image->numCols - 1, 130 0, data->readout->image->numRows - 1), 125 131 maskBlank); 126 132 psString name = NULL; // Name of image 127 psStringAppend(&name, "inspect %03d.fits", i);133 psStringAppend(&name, "inspect_%03d_%03d.fits", sectionNum, i); 128 134 psFits *fits = psFitsOpen(name, "w"); 129 135 psFree(name); … … 156 162 } 157 163 psImage *rejected = psPixelsToMask(NULL, data->pixels, 158 psRegionSet(0, data->readout->image->numCols ,159 0, data->readout->image->numRows ),164 psRegionSet(0, data->readout->image->numCols - 1, 165 0, data->readout->image->numRows - 1), 160 166 maskBlank); 161 167 psString name = NULL; // Name of image 162 psStringAppend(&name, "reject %03d.fits", i);168 psStringAppend(&name, "reject_%03d_%03d.fits", sectionNum, i); 163 169 psFits *fits = psFitsOpen(name, "w"); 164 170 psFree(name); … … 194 200 psFree(stack); 195 201 202 sectionNum++; 203 196 204 return true; 197 205 }
Note:
See TracChangeset
for help on using the changeset viewer.
