Changeset 8246 for trunk/psModules/src/camera
- Timestamp:
- Aug 8, 2006, 4:37:08 PM (20 years ago)
- Location:
- trunk/psModules/src/camera
- Files:
-
- 11 edited
-
pmFPA.c (modified) (9 diffs)
-
pmFPAConstruct.c (modified) (7 diffs)
-
pmFPACopy.c (modified) (3 diffs)
-
pmFPAEnsemble.c (modified) (2 diffs)
-
pmFPAMaskWeight.c (modified) (1 diff)
-
pmFPAMosaic.c (modified) (16 diffs)
-
pmFPARead.c (modified) (3 diffs)
-
pmFPAfileDefine.c (modified) (4 diffs)
-
pmFPAfileIO.c (modified) (13 diffs)
-
pmHDU.c (modified) (5 diffs)
-
pmHDUUtils.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPA.c
r8047 r8246 12 12 * XXX: Should we implement non-linear cell->chip transforms? 13 13 * 14 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $15 * @date $Date: 2006-08-0 2 02:17:11$14 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-08-09 02:37:07 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 38 38 // if this readout has a parent, drop that instance 39 39 if (readout->parent) { 40 psTrace( __func__, 9, "Removing readout %lx from cell %lx...\n", (size_t)readout, (size_t)readout->parent);40 psTrace("psModules.camera", 9, "Removing readout %lx from cell %lx...\n", (size_t)readout, (size_t)readout->parent); 41 41 psArray *readouts = readout->parent->readouts; 42 42 for (int i = 0; i < readouts->n; i++) { … … 46 46 } 47 47 } 48 psTrace( __func__, 9, "Freeing readout %lx\n", (size_t) readout);48 psTrace("psModules.camera", 9, "Freeing readout %lx\n", (size_t) readout); 49 49 psFree(readout->image); 50 50 psFree(readout->mask); … … 59 59 // if this cell has a parent, drop that instance 60 60 if (cell->parent) { 61 psTrace( __func__, 9, "Removing cell %lx from chip %lx...\n", (size_t)cell, (size_t)cell->parent);61 psTrace("psModules.camera", 9, "Removing cell %lx from chip %lx...\n", (size_t)cell, (size_t)cell->parent); 62 62 psArray *cells = cell->parent->cells; 63 63 for (int i = 0; i < cells->n; i++) { … … 67 67 } 68 68 } 69 psTrace( __func__, 9, "Freeing cell %lx\n", (size_t)cell);69 psTrace("psModules.camera", 9, "Freeing cell %lx\n", (size_t)cell); 70 70 pmCellFreeReadouts(cell); 71 71 psFree(cell->readouts); … … 81 81 // if this chip has a parent, drop that instance 82 82 if (chip->parent) { 83 psTrace( __func__, 9, "Removing chip %lx from fpa %lx...\n", (size_t)chip, (size_t)chip->parent);83 psTrace("psModules.camera", 9, "Removing chip %lx from fpa %lx...\n", (size_t)chip, (size_t)chip->parent); 84 84 psArray *chips = chip->parent->chips; 85 85 for (int i = 0; i < chips->n; i++) { … … 90 90 } 91 91 92 psTrace( __func__, 9, "Freeing chip %lx\n", (size_t)chip);92 psTrace("psModules.camera", 9, "Freeing chip %lx\n", (size_t)chip); 93 93 pmChipFreeCells(chip); 94 94 psFree(chip->cells); … … 109 109 static void FPAFree(pmFPA *fpa) 110 110 { 111 psTrace( __func__, 9, "Freeing fpa %lx\n", (size_t)fpa);111 psTrace("psModules.camera", 9, "Freeing fpa %lx\n", (size_t)fpa); 112 112 113 113 // NULL the parent pointers … … 149 149 } 150 150 tmpReadout->parent = NULL; 151 psTrace( __func__, 9, "Will now free readout %lx...\n", (size_t)tmpReadout);151 psTrace("psModules.camera", 9, "Will now free readout %lx...\n", (size_t)tmpReadout); 152 152 } 153 153 cell->readouts = psArrayRealloc(cell->readouts, 0); -
trunk/psModules/src/camera/pmFPAConstruct.c
r7719 r8246 244 244 } 245 245 246 psTrace( __func__, 5, "Looking up %s in the CONTENTS.\n", contentKey);246 psTrace("psModules.camera", 5, "Looking up %s in the CONTENTS.\n", contentKey); 247 247 const char *content = psMetadataLookupStr(&mdok, contents, contentKey); 248 248 if (!mdok || !content || strlen(content) == 0) { … … 593 593 // Need to look up what chip we have. 594 594 psString chipName = phuNameFromHeader("CHIP.NAME", fileInfo, header); 595 psTrace( __func__, 5, "This is chip %s\n", chipName);595 psTrace("psModules.camera", 5, "This is chip %s\n", chipName); 596 596 int chipNum = pmFPAFindChip(fpa, chipName); // Chip number 597 597 if (chipNum == -1) { … … 794 794 PS_ASSERT_PTR_NON_NULL(fpa,); 795 795 796 psTrace( __func__, 1, "FPA:\n");796 psTrace("psModules.camera", 1, "FPA:\n"); 797 797 if (fpa->hdu) { 798 798 pmHDUPrint(fd, fpa->hdu, 2, header); … … 805 805 // Iterate over the FPA 806 806 for (int i = 0; i < chips->n; i++) { 807 psTrace( __func__, 3, "Chip: %d\n", i);807 psTrace("psModules.camera", 3, "Chip: %d\n", i); 808 808 pmChip *chip = chips->data[i]; // The chip 809 809 if (chip->hdu) { … … 817 817 psArray *cells = chip->cells; // Array of cells 818 818 for (int j = 0; j < cells->n; j++) { 819 psTrace( __func__, 5, "Cell: %d\n", j);819 psTrace("psModules.camera", 5, "Cell: %d\n", j); 820 820 pmCell *cell = cells->data[j]; // The cell 821 821 if (cell->hdu) { … … 829 829 for (int k = 0; k < readouts->n; k++) { 830 830 pmReadout *readout = readouts->data[k]; // The readout 831 psTrace( __func__, 6, "Readout %d:\n", k);832 psTrace( __func__, 7, "row0: %d\n", readout->row0);833 psTrace( __func__, 7, "col0: %d\n", readout->col0);831 psTrace("psModules.camera", 6, "Readout %d:\n", k); 832 psTrace("psModules.camera", 7, "row0: %d\n", readout->row0); 833 psTrace("psModules.camera", 7, "col0: %d\n", readout->col0); 834 834 psImage *image = readout->image; // The image 835 835 psList *bias = readout->bias; // The list of bias images 836 836 if (image) { 837 psTrace( __func__, 7, "Image: [%d:%d,%d:%d] (%dx%d)\n", image->col0, image->col0 +837 psTrace("psModules.camera", 7, "Image: [%d:%d,%d:%d] (%dx%d)\n", image->col0, image->col0 + 838 838 image->numCols, image->row0, image->row0 + image->numRows, image->numCols, 839 839 image->numRows); … … 843 843 psImage *biasImage = NULL; // Bias image from iteration 844 844 while ((biasImage = psListGetAndIncrement(biasIter))) { 845 psTrace( __func__, 7, "Bias: [%d:%d,%d:%d] (%dx%d)\n", biasImage->col0,845 psTrace("psModules.camera", 7, "Bias: [%d:%d,%d:%d] (%dx%d)\n", biasImage->col0, 846 846 biasImage->col0 + biasImage->numCols, biasImage->row0, 847 847 biasImage->row0 + biasImage->numRows, biasImage->numCols, biasImage->numRows); -
trunk/psModules/src/camera/pmFPACopy.c
r7834 r8246 92 92 } 93 93 } 94 psTrace( __func__, 3, "xFlip: %d; yFlip: %d\n", xFlip, yFlip);94 psTrace("psModules.camera", 3, "xFlip: %d; yFlip: %d\n", xFlip, yFlip); 95 95 } 96 96 … … 228 228 int xBin = psMetadataLookupS32(NULL, source->concepts, "CELL.XBIN"); // CELL.XBIN from source 229 229 pmReadout *readout = source->readouts->data[0]; // A representative readout 230 psTrace( __func__, 3, "CELL.X0: Before: %d After: %d\n", xZero,230 psTrace("psModules.camera", 3, "CELL.X0: Before: %d After: %d\n", xZero, 231 231 xZero - (readout->image->numCols - 1) * xParity * xBin); 232 psTrace( __func__, 9, "(xParity: %d xBin: %d numCols: %d)\n", xParity, xBin, readout->image->numCols);232 psTrace("psModules.camera", 9, "(xParity: %d xBin: %d numCols: %d)\n", xParity, xBin, readout->image->numCols); 233 233 xZero -= (readout->image->numCols - 1) * xParity * xBin; // Change the parity on the X0 position 234 234 psMetadataItem *newItem = psMetadataLookup(target->concepts, "CELL.X0"); // CELL.X0 from target … … 240 240 int yBin = psMetadataLookupS32(NULL, source->concepts, "CELL.YBIN"); // Parity in y 241 241 pmReadout *readout = source->readouts->data[0]; // A representative readout 242 psTrace( __func__, 3, "CELL.Y0: Before: %d After: %d\n", yZero,242 psTrace("psModules.camera", 3, "CELL.Y0: Before: %d After: %d\n", yZero, 243 243 yZero - (readout->image->numRows - 1) * yParity * yBin); 244 psTrace( __func__, 9, "(yParity: %d yBin: %d numRows: %d)\n", yParity, yBin, readout->image->numRows);244 psTrace("psModules.camera", 9, "(yParity: %d yBin: %d numRows: %d)\n", yParity, yBin, readout->image->numRows); 245 245 yZero -= (readout->image->numRows - 1) * yParity * yBin; // Change the parity on the Y0 position 246 246 psMetadataItem *newItem = psMetadataLookup(target->concepts, "CELL.Y0"); // CELL.Y0 from target -
trunk/psModules/src/camera/pmFPAEnsemble.c
r8048 r8246 238 238 } 239 239 240 psTrace( __func__, 3, "%s --> FPA: %s, chip: %d, cell: %d\n", filename, fpaName,240 psTrace("psModules.camera", 3, "%s --> FPA: %s, chip: %d, cell: %d\n", filename, fpaName, 241 241 view->chip, view->cell); 242 242 … … 245 245 if (!check) { 246 246 // Add in the new FPA 247 psTrace( __func__, 5, "New FPA.\n");247 psTrace("psModules.camera", 5, "New FPA.\n"); 248 248 component = pmFPAComponentAlloc(fpa, view); 249 249 psMetadataAddPtr(fpas, PS_LIST_TAIL, fpaName, PS_DATA_UNKNOWN, NULL, component->fpa); 250 250 } else { 251 251 // Need to put the appropriate element of the new FPA in the old one. 252 psTrace( __func__, 5, "Adding to extant FPA.\n");252 psTrace("psModules.camera", 5, "Adding to extant FPA.\n"); 253 253 pmFPA *oldFPA = check->data.V; // The existing FPA 254 254 component = pmFPAComponentAlloc(oldFPA, view); -
trunk/psModules/src/camera/pmFPAMaskWeight.c
r7946 r8246 110 110 return false; 111 111 } 112 psTrace( __func__, 5, "Saturation: %f, bad: %f\n", saturation, bad);112 psTrace("psModules.camera", 5, "Saturation: %f, bad: %f\n", saturation, bad); 113 113 114 114 -
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)) { -
trunk/psModules/src/camera/pmFPARead.c
r7923 r8246 126 126 } 127 127 128 psTrace( __func__, 5, "Reading section [%.0f:%.0f,%.0f:%.0f]\n",128 psTrace("psModules.camera", 5, "Reading section [%.0f:%.0f,%.0f:%.0f]\n", 129 129 toRead.x0, toRead.x1, toRead.y0, toRead.y1); 130 130 psImage *image = psFitsReadImage(fits, toRead, z); // Desired pixels 131 psTrace( __func__, 7, "Image is %dx%d\n", image->numCols, image->numRows);131 psTrace("psModules.camera", 7, "Image is %dx%d\n", image->numCols, image->numRows); 132 132 133 133 // XXX: We only support F32 for now … … 140 140 if (resize) { 141 141 // For some reason, the region of interest is smaller than the number of pixels we want. 142 psTrace( __func__, 5, "Resizing image to %.0fx%.0f\n",142 psTrace("psModules.camera", 5, "Resizing image to %.0fx%.0f\n", 143 143 fullSize.x1 - fullSize.x0, fullSize.y1 - fullSize.y0); 144 144 psImage *temp = psImageAlloc(fullSize.x1 - fullSize.x0, fullSize.y1 - fullSize.y0, image->type.type); … … 286 286 if (offset >= maxSize) { 287 287 // We've read everything there is 288 psTrace( __func__, 7, "Read everything.\n");288 psTrace("psModules.camera", 7, "Read everything.\n"); 289 289 psFree(readout->image); 290 290 return false; 291 291 } 292 292 int upper = PS_MIN(offset + numScans, maxSize); // The upper limit for the pixel read 293 psTrace( __func__, 7, "offset=%d, upper = %d, image is %dx%d, trimsec [%.0f:%.0f,%.0f:%.0f]\n",293 psTrace("psModules.camera", 7, "offset=%d, upper = %d, image is %dx%d, trimsec [%.0f:%.0f,%.0f:%.0f]\n", 294 294 offset, upper, naxis1, naxis2, trimsec->x0, trimsec->x1, trimsec->y0, trimsec->y1); 295 295 -
trunk/psModules/src/camera/pmFPAfileDefine.c
r7926 r8246 301 301 psArray *infiles = psMetadataLookupPtr(&status, config->arguments, argname); 302 302 if (!status) { 303 psTrace("p mFPAfile", 5, "Failed to find %s in argument list", argname);303 psTrace("psModules.camera", 5, "Failed to find %s in argument list", argname); 304 304 return NULL; 305 305 } … … 429 429 psArray *infiles = psMetadataLookupPtr(&status, config->arguments, argname); 430 430 if (!status) { 431 psTrace("p mFPAfile", 5, "Failed to find %s in argument list", argname);431 psTrace("psModules.camera", 5, "Failed to find %s in argument list", argname); 432 432 return NULL; 433 433 } … … 809 809 pmFPAfile *file = psMetadataLookupPtr (&status, files, name); 810 810 if (!status) { 811 psTrace("p mFPAfile", 6, "Internal File %s not in file list", name);811 psTrace("psModules.camera", 6, "Internal File %s not in file list", name); 812 812 return true; 813 813 } … … 817 817 } 818 818 if (file->mode != PM_FPA_MODE_INTERNAL) { 819 psTrace("p mFPAfile", 6, "FPA File %s not Internal, not dropping", name);819 psTrace("psModules.camera", 6, "FPA File %s not Internal, not dropping", name); 820 820 return true; 821 821 } -
trunk/psModules/src/camera/pmFPAfileIO.c
r7726 r8246 37 37 38 38 if (file->state & PM_FPA_STATE_INACTIVE) { 39 psTrace("p mFPAfile", 6, "skip open for %s, files is inactive", file->name);39 psTrace("psModules.camera", 6, "skip open for %s, files is inactive", file->name); 40 40 return true; 41 41 } … … 214 214 215 215 if (file->state & PM_FPA_STATE_INACTIVE) { 216 psTrace("p mFPAfile", 6, "skip read for %s, files is inactive", file->name);216 psTrace("psModules.camera", 6, "skip read for %s, files is inactive", file->name); 217 217 return true; 218 218 } 219 219 220 220 if (file->mode != PM_FPA_MODE_READ) { 221 psTrace("p mFPAfile", 6, "skip read for %s, mode is not READ", file->name);221 psTrace("psModules.camera", 6, "skip read for %s, mode is not READ", file->name); 222 222 return true; 223 223 } … … 236 236 // do we need to read this file? 237 237 if (level != file->dataLevel) { 238 psTrace("p mFPAfile", 6, "skip reading of %s at this level %s: dataLevel is %s",238 psTrace("psModules.camera", 6, "skip reading of %s at this level %s: dataLevel is %s", 239 239 file->name, pmFPALevelToName(level), pmFPALevelToName(file->dataLevel)); 240 240 return true; … … 281 281 282 282 if (file->state & PM_FPA_STATE_INACTIVE) { 283 psTrace("p mFPAfile", 6, "skip free for %s, files is inactive", file->name);283 psTrace("psModules.camera", 6, "skip free for %s, files is inactive", file->name); 284 284 return true; 285 285 } … … 290 290 // do we need to read this file? 291 291 if (level != file->freeLevel) { 292 psTrace("p mFPAfile", 6, "skip free of %s at this level %s: freeLevel is %s",292 psTrace("psModules.camera", 6, "skip free of %s at this level %s: freeLevel is %s", 293 293 file->name, pmFPALevelToName(level), pmFPALevelToName(file->freeLevel)); 294 294 return true; … … 335 335 336 336 if (file->state & PM_FPA_STATE_INACTIVE) { 337 psTrace("p mFPAfile", 6, "skip write for %s, files is inactive", file->name);337 psTrace("psModules.camera", 6, "skip write for %s, files is inactive", file->name); 338 338 return true; 339 339 } 340 340 341 341 if (file->mode != PM_FPA_MODE_WRITE) { 342 psTrace("p mFPAfile", 6, "skip write for %s, mode is not WRITE", file->name);342 psTrace("psModules.camera", 6, "skip write for %s, mode is not WRITE", file->name); 343 343 return true; 344 344 } 345 345 346 346 if (!file->save) { 347 psTrace("p mFPAfile", 6, "skip write for %s, save is FALSE", file->name);347 psTrace("psModules.camera", 6, "skip write for %s, save is FALSE", file->name); 348 348 return true; 349 349 } … … 354 354 // do we need to write this file? 355 355 if (level != file->dataLevel) { 356 psTrace("p mFPAfile", 6, "skip writing of %s at this level %s: dataLevel is %s",356 psTrace("psModules.camera", 6, "skip writing of %s at this level %s: dataLevel is %s", 357 357 file->name, pmFPALevelToName(level), pmFPALevelToName(file->dataLevel)); 358 358 return true; … … 411 411 // these are not error conditions; these are state tests 412 412 if (file->state & PM_FPA_STATE_INACTIVE) { 413 psTrace("p mFPAfile", 6, "skip create for inactive file %s", file->name);413 psTrace("psModules.camera", 6, "skip create for inactive file %s", file->name); 414 414 return true; 415 415 } 416 416 if (file->mode != PM_FPA_MODE_WRITE) { 417 psTrace("p mFPAfile", 6, "skip create for non-write file %s", file->name);417 psTrace("psModules.camera", 6, "skip create for non-write file %s", file->name); 418 418 return true; 419 419 } … … 424 424 // don't create the file if the src (FPA) is not defined 425 425 if (file->src == NULL) { 426 psTrace("p mFPAfile", 6, "skip create for FPA without src FPA for %s", file->name);426 psTrace("psModules.camera", 6, "skip create for FPA without src FPA for %s", file->name); 427 427 return true; 428 428 } … … 430 430 // do we need to write this file? 431 431 if (level != file->fileLevel) { 432 psTrace("p mFPAfile", 6, "skip creation of %s at this level %s: fileLevel is %s",432 psTrace("psModules.camera", 6, "skip creation of %s at this level %s: fileLevel is %s", 433 433 file->name, pmFPALevelToName(level), pmFPALevelToName(file->fileLevel)); 434 434 return true; … … 465 465 466 466 if (file->state & PM_FPA_STATE_INACTIVE) { 467 psTrace("p mFPAfile", 6, "skip close for %s, files is inactive", file->name);467 psTrace("psModules.camera", 6, "skip close for %s, files is inactive", file->name); 468 468 return true; 469 469 } … … 475 475 pmFPALevel level = pmFPAviewLevel (view); 476 476 if (file->fileLevel != level) { 477 psTrace("p mFPAfile", 6, "skip closing of %s at this level %s: dataLevel is %s",477 psTrace("psModules.camera", 6, "skip closing of %s at this level %s: dataLevel is %s", 478 478 file->name, pmFPALevelToName(level), pmFPALevelToName(file->dataLevel)); 479 479 return true; … … 533 533 pmFPAfile *file = psMetadataLookupPtr (&status, files, name); 534 534 if (!status) { 535 psTrace("p mFPAfile", 6, "%s is not a defined IO file", name);535 psTrace("psModules.camera", 6, "%s is not a defined IO file", name); 536 536 return false; 537 537 } -
trunk/psModules/src/camera/pmHDU.c
r7720 r8246 78 78 79 79 // Move to the appropriate extension 80 psTrace( __func__, 5, "Moving to extension %s...\n", hdu->extname);80 psTrace("psModules.camera", 5, "Moving to extension %s...\n", hdu->extname); 81 81 if (!hduMove(hdu, fits)) { 82 82 return false; … … 84 84 85 85 if (!hdu->header) { 86 psTrace( __func__, 5, "Reading the header...\n");86 psTrace("psModules.camera", 5, "Reading the header...\n"); 87 87 hdu->header = psFitsReadHeader(NULL, fits); 88 88 if (! hdu->header) { … … 122 122 psFree(hdu->images); // Blow away anything existing 123 123 } 124 psTrace( __func__, 5, "Reading the pixels...\n");124 psTrace("psModules.camera", 5, "Reading the pixels...\n"); 125 125 hdu->images = psFitsReadImageCube(fits, psRegionSet(0,0,0,0)); 126 126 if (! hdu->images) { … … 155 155 PS_ASSERT_PTR_NON_NULL(fits, false); 156 156 157 psTrace( __func__, 7, "Writing HDU %s\n", hdu->extname);157 psTrace("psModules.camera", 7, "Writing HDU %s\n", hdu->extname); 158 158 159 159 if (hdu->images && hdu->table && !hdu->header) { … … 199 199 200 200 if (hdu->images) { 201 psTrace( __func__, 9, "Writing pixels for %s\n", hdu->extname);201 psTrace("psModules.camera", 9, "Writing pixels for %s\n", hdu->extname); 202 202 if (!psFitsWriteImageCube(fits, hdu->header, hdu->images, extname)) { 203 203 psError(PS_ERR_IO, false, "Unable to write image to extension %s\n", hdu->extname); -
trunk/psModules/src/camera/pmHDUUtils.c
r7867 r8246 97 97 98 98 if (hdu->blankPHU) { 99 psTrace( __func__, level, "HDU: (PHU)\n");99 psTrace("psModules.camera", level, "HDU: (PHU)\n"); 100 100 } else { 101 psTrace( __func__, level, "HDU: %s\n", hdu->extname);101 psTrace("psModules.camera", level, "HDU: %s\n", hdu->extname); 102 102 } 103 103 104 psTrace( __func__, level + 1, "Format: %x\n", hdu->format);104 psTrace("psModules.camera", level + 1, "Format: %x\n", hdu->format); 105 105 if (header) { 106 106 if (hdu->header) { 107 psTrace( __func__, level + 1, "Header:\n");107 psTrace("psModules.camera", level + 1, "Header:\n"); 108 108 psMetadataPrint(fd, hdu->header, level + 2); 109 109 } else { 110 psTrace( __func__, level + 1, "No header.\n");110 psTrace("psModules.camera", level + 1, "No header.\n"); 111 111 } 112 112 } 113 113 114 114 if (hdu->images) { 115 psTrace( __func__, level + 1, "Images:\n");115 psTrace("psModules.camera", level + 1, "Images:\n"); 116 116 for (long i = 0; i < hdu->images->n; i++) { 117 117 psImage *image = hdu->images->data[i]; // Image of interest 118 psTrace( __func__, level + 2, "%ld: %dx%d\n", i, image->numCols, image->numRows);118 psTrace("psModules.camera", level + 2, "%ld: %dx%d\n", i, image->numCols, image->numRows); 119 119 } 120 120 } else { 121 psTrace( __func__, level + 1, "NO images.\n");121 psTrace("psModules.camera", level + 1, "NO images.\n"); 122 122 } 123 123 124 124 if (hdu->masks) { 125 psTrace( __func__, level + 1, "Masks:\n");125 psTrace("psModules.camera", level + 1, "Masks:\n"); 126 126 for (long i = 0; i < hdu->masks->n; i++) { 127 127 psImage *mask = hdu->masks->data[i]; // Mask of interest 128 psTrace( __func__, level + 2, "%ld: %dx%d\n", i, mask->numCols, mask->numRows);128 psTrace("psModules.camera", level + 2, "%ld: %dx%d\n", i, mask->numCols, mask->numRows); 129 129 } 130 130 } else { 131 psTrace( __func__, level + 1, "NO masks.\n");131 psTrace("psModules.camera", level + 1, "NO masks.\n"); 132 132 } 133 133 134 134 if (hdu->weights) { 135 psTrace( __func__, level + 1, "Weights:\n");135 psTrace("psModules.camera", level + 1, "Weights:\n"); 136 136 for (long i = 0; i < hdu->masks->n; i++) { 137 137 psImage *weight = hdu->weights->data[i]; // Weight image of interest 138 psTrace( __func__, level + 2, "%ld: %dx%d\n", i, weight->numCols, weight->numRows);138 psTrace("psModules.camera", level + 2, "%ld: %dx%d\n", i, weight->numCols, weight->numRows); 139 139 } 140 140 } else { 141 psTrace( __func__, level + 1, "NO weights.\n");141 psTrace("psModules.camera", level + 1, "NO weights.\n"); 142 142 } 143 143 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
