Changeset 24000 for trunk/ppSkycell/src/ppSkycellLoop.c
- Timestamp:
- Apr 29, 2009, 3:29:21 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppSkycell/src/ppSkycellLoop.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSkycell/src/ppSkycellLoop.c
r23996 r24000 44 44 45 45 REGION_RANGE(0, 0); // Lower left 46 psTrace("ppSkycell", 9, "Start: %.0f %.0f", toCoords->x, toCoords->y); 46 47 REGION_RANGE(0, numRows); // Upper left 47 48 REGION_RANGE(numCols, 0); // Lower right 48 49 REGION_RANGE(numCols, numRows); // Upper right 50 psTrace("ppSkycell", 9, "Stop: %.0f %.0f\n", toCoords->x, toCoords->y); 49 51 50 52 return region; … … 185 187 for (int i = 0; i < numProj; i++) { 186 188 psRegion *projRegion = projRegions->data[i]; // Region for skycell projection 189 psTrace("ppSkycell", 2, "Projection %d: [%.0f:%.0f,%.0f:%.0f]\n", 190 i, projRegion->x0, projRegion->x1, projRegion->y0, projRegion->y1); 187 191 int xSize = projRegion->x1 - projRegion->x0 + 1; // Size of unbinned image 188 192 int ySize = projRegion->y1 - projRegion->y0 + 1; // Size of unbinned image … … 218 222 psFree(view); 219 223 224 // Flip images; no idea why this has to be done, but apparently it does 225 { 226 psImage *rot = psImageRotate(NULL, inRO->image, M_PI, NAN, PS_INTERPOLATE_BILINEAR); 227 psFree(inRO->image); 228 inRO->image = rot; 229 } 230 if (inRO->mask) { 231 psImage *rot = psImageRotate(NULL, inRO->mask, M_PI, 0, PS_INTERPOLATE_FLAT); 232 psFree(inRO->mask); 233 inRO->mask = rot; 234 } 235 220 236 pmReadout *bin1RO = pmReadoutAlloc(NULL), *bin2RO = pmReadoutAlloc(NULL); // Binned readouts 221 237 if (!pmReadoutRebin(bin1RO, inRO, data->maskVal, data->bin1, data->bin1)) { … … 246 262 psFree(file->fpa); 247 263 file->fpa = NULL; 264 if (data->masksName) { 265 pmFPAfile *file = pmFPAfileSelectSingle(data->config->files, "PPSKYCELL.MASK", j); 266 psFree(file->fpa); 267 } 248 268 pmFPAfileActivate(data->config->files, false, NULL); 249 250 psTrace("ppSkycell", 10, "Blah blah blah\n"); 251 } 252 269 } 270 271 pmFPAfileActivate(data->config->files, true, "PPSKYCELL.JPEG1"); 272 pmFPAfileActivate(data->config->files, true, "PPSKYCELL.JPEG2"); 273 pmFPAview *view = filesIterateDown(data->config); // View to readout 274 275 pmCell *cell1 = pmFPAfileThisCell(data->config->files, view, "PPSKYCELL.JPEG1"); // Rebinned cell 1 276 pmCell *cell2 = pmFPAfileThisCell(data->config->files, view, "PPSKYCELL.JPEG2"); // Rebinned cell 2 277 psFree(view); 278 pmReadout *ro1 = pmReadoutAlloc(cell1), *ro2 = pmReadoutAlloc(cell2); // Binned readouts 279 280 ro1->image = image1; 281 ro2->image = image2; 282 283 ro1->data_exists = cell1->data_exists = cell1->parent->data_exists = true; 284 ro2->data_exists = cell2->data_exists = cell2->parent->data_exists = true; 285 286 pmFPAfile *file1 = pmFPAfileSelectSingle(data->config->files, "PPSKYCELL.JPEG1", 0); 287 file1->save = true; 288 file1->index = i; 289 pmFPAfile *file2 = pmFPAfileSelectSingle(data->config->files, "PPSKYCELL.JPEG2", 0); 290 file2->save = true; 291 file2->index = i; 292 293 #if 0 253 294 { 254 295 psString filename = NULL; // Filename for image … … 268 309 psFitsClose(fits); 269 310 } 270 271 psFree(image1); 272 psFree(image2); 311 #endif 312 273 313 } 274 314
Note:
See TracChangeset
for help on using the changeset viewer.
