Changeset 8246 for trunk/psModules/src/camera/pmFPAMosaic.c
- Timestamp:
- Aug 8, 2006, 4:37:08 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAMosaic.c (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAMosaic.c
r7851 r8246 243 243 if (x0 != readout->col0 + readout->image->col0 - (int)imageBounds->x0 || 244 244 y0 != readout->row0 + readout->image->row0 - (int)imageBounds->y0) { 245 psTrace( __func__, 5, "CELL.X0,Y0 don't match: %d,%d vs %d,%d\n", x0, y0,245 psTrace("psModules.camera", 5, "CELL.X0,Y0 don't match: %d,%d vs %d,%d\n", x0, y0, 246 246 readout->col0 + readout->image->col0 - (int)imageBounds->x0, 247 247 readout->row0 + readout->image->row0 - (int)imageBounds->y0); … … 280 280 psRegion *imageBounds = psRegionAlloc(INFINITY, 0, INFINITY, 0); // Bound of image on HDU 281 281 if (!chipBounds(imageBounds, chip) || !chipContiguousBiassec(imageBounds, chip)) { 282 psTrace( __func__, 5, "Image isn't contiguous.\n");282 psTrace("psModules.camera", 5, "Image isn't contiguous.\n"); 283 283 psFree(imageBounds); 284 284 return NULL; … … 286 286 287 287 psString region = psRegionToString(*imageBounds); 288 psTrace( __func__, 7, "Image bounds: %s\n", region);288 psTrace("psModules.camera", 7, "Image bounds: %s\n", region); 289 289 psFree(region); 290 290 … … 309 309 if (!chipContiguousTrimsec(imageBounds, testChip) || 310 310 !chipContiguousBiassec(imageBounds, testChip)) { 311 psTrace( __func__, 5, "Image isn't contiguous.\n");311 psTrace("psModules.camera", 5, "Image isn't contiguous.\n"); 312 312 psFree(imageBounds); 313 313 return NULL; … … 349 349 psRegion *imageBounds = psRegionAlloc(0, 0, 0, 0); // Bound of image on HDU 350 350 if (!fpaContiguous(imageBounds, fpa)) { 351 psTrace( __func__, 5, "Image isn't contiguous.\n");351 psTrace("psModules.camera", 5, "Image isn't contiguous.\n"); 352 352 psFree(imageBounds); 353 353 return NULL; … … 355 355 356 356 psString region = psRegionToString(*imageBounds); 357 psTrace( __func__, 7, "Image bounds: %s\n", region);357 psTrace("psModules.camera", 7, "Image bounds: %s\n", region); 358 358 psFree(region); 359 359 … … 406 406 psElemType type = 0; 407 407 int numImages = 0; // Number of images 408 psTrace( __func__, 3, "Mosaicking %ld cells.\n", source->n);408 psTrace("psModules.camera", 3, "Mosaicking %ld cells.\n", source->n); 409 409 for (int i = 0; i < source->n; i++) { 410 410 psImage *image = source->data[i]; // The image of interest … … 425 425 int xParity = xFlip->data.U8[i] ? -1 : 1; 426 426 int yParity = yFlip->data.U8[i] ? -1 : 1; 427 psTrace( __func__, 5, "Extent of cell %d: %d -> %d , %d -> %d\n", i, x0->data.S32[i],427 psTrace("psModules.camera", 5, "Extent of cell %d: %d -> %d , %d -> %d\n", i, x0->data.S32[i], 428 428 x0->data.S32[i] + xParity * xBinSource->data.S32[i] * image->numCols, y0->data.S32[i], 429 429 y0->data.S32[i] + yParity * yBinSource->data.S32[i] * image->numRows); … … 450 450 } 451 451 452 psTrace( __func__, 3, "Spliced image will be %dx%d\n", (int)xSize, (int)ySize);452 psTrace("psModules.camera", 3, "Spliced image will be %dx%d\n", (int)xSize, (int)ySize); 453 453 psImage *mosaic = psImageAlloc((int)xSize, (int)ySize, type); // The mosaic image 454 454 psImageInit(mosaic, 0); … … 586 586 good = false; 587 587 } 588 psTrace( __func__, 5, "Cell %d: x0=%d y0=%d\n", index, x0Cell, y0Cell);588 psTrace("psModules.camera", 5, "Cell %d: x0=%d y0=%d\n", index, x0Cell, y0Cell); 589 589 590 590 // Offset of the chip on the FPA … … 682 682 masks->data[index] = psMemIncrRefCounter(readout->mask); 683 683 684 psTrace( __func__, 9, "Added cell (%x) %ld: %d,%d; %d,%d, %d,%d.\n", cell, index,684 psTrace("psModules.camera", 9, "Added cell (%x) %ld: %d,%d; %d,%d, %d,%d.\n", cell, index, 685 685 x0->data.S32[index], y0->data.S32[index], xBin->data.S32[index], yBin->data.S32[index], 686 686 xFlip->data.U8[index], yFlip->data.U8[index]); … … 970 970 if ((chipRegion = niceChip(&xBin, &yBin, source))) { 971 971 // Case 1 --- we need only cut out the region 972 psTrace( __func__, 1, "Case 1 mosaicking: simple cut-out.\n");972 psTrace("psModules.camera", 1, "Case 1 mosaicking: simple cut-out.\n"); 973 973 pmHDU *hdu = source->hdu; // The HDU that has the pixels 974 974 if (!hdu || !hdu->images) { … … 984 984 } else { 985 985 // Case 2 --- we need to mosaic by cut and paste 986 psTrace( __func__, 1, "Case 2 mosaicking: cut and paste.\n");986 psTrace("psModules.camera", 1, "Case 2 mosaicking: cut and paste.\n"); 987 987 if (!chipMosaic(&mosaicImage, &mosaicMask, &mosaicWeights, &xBin, &yBin, source, targetCell)) { 988 988 psError(PS_ERR_UNKNOWN, false, "Unable to mosaic cells.\n"); … … 991 991 chipRegion = psRegionAlloc(NAN, NAN, NAN, NAN); // We've cut and paste, so there's no valid trimsec 992 992 } 993 psTrace( __func__, 1, "xBin,yBin: %d,%d\n", xBin, yBin);993 psTrace("psModules.camera", 1, "xBin,yBin: %d,%d\n", xBin, yBin); 994 994 995 995 // Set the concepts for the target cell … … 1066 1066 if ((fpaRegion = niceFPA(&xBin, &yBin, source))) { 1067 1067 // Case 1 --- we need only cut out the region 1068 psTrace( __func__, 1, "Case 1 mosaicking: simple cut-out.\n");1068 psTrace("psModules.camera", 1, "Case 1 mosaicking: simple cut-out.\n"); 1069 1069 pmHDU *hdu = source->hdu; // The HDU that has the pixels 1070 1070 mosaicImage = psMemIncrRefCounter(psImageSubset(hdu->images->data[0], *fpaRegion)); … … 1077 1077 } else { 1078 1078 // Case 2 --- we need to mosaic by cut and paste 1079 psTrace( __func__, 1, "Case 2 mosaicking: cut and paste.\n");1079 psTrace("psModules.camera", 1, "Case 2 mosaicking: cut and paste.\n"); 1080 1080 if (!fpaMosaic(&mosaicImage, &mosaicMask, &mosaicWeights, &xBin, &yBin, source, 1081 1081 targetChip, targetCell)) {
Note:
See TracChangeset
for help on using the changeset viewer.
