Changeset 8246
- Timestamp:
- Aug 8, 2006, 4:37:08 PM (20 years ago)
- Location:
- trunk/psModules/src
- Files:
-
- 30 edited
-
camera/pmFPA.c (modified) (9 diffs)
-
camera/pmFPAConstruct.c (modified) (7 diffs)
-
camera/pmFPACopy.c (modified) (3 diffs)
-
camera/pmFPAEnsemble.c (modified) (2 diffs)
-
camera/pmFPAMaskWeight.c (modified) (1 diff)
-
camera/pmFPAMosaic.c (modified) (16 diffs)
-
camera/pmFPARead.c (modified) (3 diffs)
-
camera/pmFPAfileDefine.c (modified) (4 diffs)
-
camera/pmFPAfileIO.c (modified) (13 diffs)
-
camera/pmHDU.c (modified) (5 diffs)
-
camera/pmHDUUtils.c (modified) (1 diff)
-
concepts/pmConcepts.c (modified) (11 diffs)
-
concepts/pmConceptsRead.c (modified) (3 diffs)
-
concepts/pmConceptsWrite.c (modified) (4 diffs)
-
config/pmConfig.c (modified) (11 diffs)
-
detrend/pmFlatNormalize.c (modified) (3 diffs)
-
detrend/pmFringeStats.c (modified) (8 diffs)
-
detrend/pmSubtractBias.c (modified) (2 diffs)
-
detrend/pmSubtractSky.c (modified) (20 diffs)
-
imcombine/pmImageCombine.c (modified) (11 diffs)
-
imcombine/pmImageSubtract.c (modified) (32 diffs)
-
imcombine/pmReadoutCombine.c (modified) (5 diffs)
-
objects/pmModel.c (modified) (10 diffs)
-
objects/pmModelGroup.c (modified) (3 diffs)
-
objects/pmMoments.c (modified) (3 diffs)
-
objects/pmPeaks.c (modified) (22 diffs)
-
objects/pmSource.c (modified) (13 diffs)
-
objects/pmSourceContour.c (modified) (21 diffs)
-
objects/pmSourceFitModel.c (modified) (8 diffs)
-
objects/pmSourceSky.c (modified) (7 diffs)
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 -
trunk/psModules/src/concepts/pmConcepts.c
r7752 r8246 89 89 psMetadataItem *specItem = NULL; // Item from the specs metadata 90 90 while ((specItem = psMetadataGetAndIncrement(specsIter))) { 91 psTrace( __func__, 9, "Blanking %s...\n", specItem->name);91 psTrace("psModules.concepts", 9, "Blanking %s...\n", specItem->name); 92 92 pmConceptSpec *spec = specItem->data.V; // The specification 93 93 psMetadataItem *blank = spec->blank; // The concept … … 189 189 } 190 190 191 psTrace( __func__, 3, "Writing concepts (%x %x %x): %x\n", fpa, chip, cell, source);191 psTrace("psModules.concepts", 3, "Writing concepts (%x %x %x): %x\n", fpa, chip, cell, source); 192 192 193 193 if (source & PM_CONCEPT_SOURCE_CAMERA) { … … 212 212 { 213 213 PS_ASSERT_PTR_NON_NULL(fpa, false); 214 psTrace("psModule .concepts", 5, "Blanking FPA concepts: %x %x\n", conceptsFPA, fpa->concepts);214 psTrace("psModules.concepts", 5, "Blanking FPA concepts: %x %x\n", conceptsFPA, fpa->concepts); 215 215 return conceptsBlank(&conceptsFPA, fpa->concepts); 216 216 } … … 225 225 { 226 226 PS_ASSERT_PTR_NON_NULL(fpa, false); 227 psTrace("psModule .concepts", 5, "Reading FPA concepts: %x %x\n", conceptsFPA, fpa->concepts);227 psTrace("psModules.concepts", 5, "Reading FPA concepts: %x %x\n", conceptsFPA, fpa->concepts); 228 228 bool success = conceptsRead(&conceptsFPA, fpa, NULL, NULL, &fpa->conceptsRead, source, db, fpa->concepts); 229 229 if (propagateDown) { … … 248 248 { 249 249 PS_ASSERT_PTR_NON_NULL(fpa, false); 250 psTrace("psModule .concepts", 5, "Writing FPA concepts: %x %x\n", conceptsFPA, fpa->concepts);250 psTrace("psModules.concepts", 5, "Writing FPA concepts: %x %x\n", conceptsFPA, fpa->concepts); 251 251 bool success = conceptsWrite(&conceptsFPA, fpa, NULL, NULL, source, db, fpa->concepts); 252 252 if (propagateDown) { … … 267 267 { 268 268 PS_ASSERT_PTR_NON_NULL(chip, false); 269 psTrace("psModule .concepts", 5, "Blanking chip concepts: %x %x\n", conceptsChip, chip->concepts);269 psTrace("psModules.concepts", 5, "Blanking chip concepts: %x %x\n", conceptsChip, chip->concepts); 270 270 return conceptsBlank(&conceptsChip, chip->concepts); 271 271 } … … 280 280 { 281 281 PS_ASSERT_PTR_NON_NULL(chip, false); 282 psTrace("psModule .concepts", 5, "Reading chip concepts: %x %x\n", conceptsChip, chip->concepts);282 psTrace("psModules.concepts", 5, "Reading chip concepts: %x %x\n", conceptsChip, chip->concepts); 283 283 pmFPA *fpa = chip->parent; // FPA to which the chip belongs 284 284 bool success = conceptsRead(&conceptsChip, fpa, chip, NULL, &chip->conceptsRead, source, db, … … 308 308 { 309 309 PS_ASSERT_PTR_NON_NULL(chip, false); 310 psTrace("psModule .concepts", 5, "Writing chip concepts: %x %x\n", conceptsChip, chip->concepts);310 psTrace("psModules.concepts", 5, "Writing chip concepts: %x %x\n", conceptsChip, chip->concepts); 311 311 pmFPA *fpa = chip->parent; // FPA to which the chip belongs 312 312 bool success = conceptsWrite(&conceptsChip, fpa, chip, NULL, source, db, chip->concepts); … … 331 331 { 332 332 PS_ASSERT_PTR_NON_NULL(cell, false); 333 psTrace("psModule .concepts", 5, "Blanking cell concepts: %x %x\n", conceptsCell, cell->concepts);333 psTrace("psModules.concepts", 5, "Blanking cell concepts: %x %x\n", conceptsCell, cell->concepts); 334 334 return conceptsBlank(&conceptsCell, cell->concepts); 335 335 } … … 343 343 { 344 344 PS_ASSERT_PTR_NON_NULL(cell, false); 345 psTrace("psModule .concepts", 5, "Reading cell concepts: %x %x\n", conceptsCell, cell->concepts);345 psTrace("psModules.concepts", 5, "Reading cell concepts: %x %x\n", conceptsCell, cell->concepts); 346 346 pmChip *chip = cell->parent; // Chip to which the cell belongs 347 347 pmFPA *fpa = chip->parent; // FPA to which the chip belongs … … 371 371 { 372 372 PS_ASSERT_PTR_NON_NULL(cell, false); 373 psTrace("psModule .concepts", 5, "Writing cell concepts: %x %x\n", conceptsCell, cell->concepts);373 psTrace("psModules.concepts", 5, "Writing cell concepts: %x %x\n", conceptsCell, cell->concepts); 374 374 pmChip *chip = cell->parent; // Chip to which the cell belongs 375 375 pmFPA *fpa = chip->parent; // FPA to which the chip belongs -
trunk/psModules/src/concepts/pmConceptsRead.c
r7923 r8246 177 177 PS_ASSERT_PTR_NON_NULL(target, false); 178 178 179 psTrace( __func__, 3, "Reading concepts from defaults...\n");179 psTrace("psModules.concepts", 3, "Reading concepts from defaults...\n"); 180 180 181 181 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // The HDU at the lowest level … … 199 199 psString name = specItem->name; // The concept name 200 200 psMetadataItem *conceptItem = psMetadataLookup(defaults, name); // The concept, or NULL 201 psTrace( __func__, 10, "%s: %x\n", name, conceptItem);201 psTrace("psModules.concepts", 10, "%s: %x\n", name, conceptItem); 202 202 if (conceptItem && conceptItem->type == PS_DATA_METADATA) { 203 psTrace( __func__, 5, "%s is of type METADATA.\n", name);203 psTrace("psModules.concepts", 5, "%s is of type METADATA.\n", name); 204 204 // Check for DEPEND 205 205 psMetadata *dependMenu = conceptItem->data.V; // The DEPEND menu … … 236 236 } 237 237 const char *dependKey = dependValue->data.V; // The key to the DEPEND menu 238 psTrace( __func__, 7, "%s.DEPEND resolves to %s....\n", name, dependKey);238 psTrace("psModules.concepts", 7, "%s.DEPEND resolves to %s....\n", name, dependKey); 239 239 240 240 conceptItem = psMetadataLookup(dependMenu, dependKey); -
trunk/psModules/src/concepts/pmConceptsWrite.c
r7835 r8246 140 140 switch (item->type) { 141 141 case PS_DATA_STRING: 142 psTrace( __func__, 9, "Writing header %s: %s\n", keyword, item->data.V);142 psTrace("psModules.concepts", 9, "Writing header %s: %s\n", keyword, item->data.V); 143 143 return psMetadataAddStr(hdu->header, PS_LIST_TAIL, keyword, PS_META_REPLACE, item->comment, 144 144 item->data.V); 145 145 case PS_DATA_S32: 146 psTrace( __func__, 9, "Writing header %s: %d\n", keyword, item->data.S32);146 psTrace("psModules.concepts", 9, "Writing header %s: %d\n", keyword, item->data.S32); 147 147 return psMetadataAddS32(hdu->header, PS_LIST_TAIL, keyword, PS_META_REPLACE, item->comment, 148 148 item->data.S32); 149 149 case PS_DATA_F32: 150 psTrace( __func__, 9, "Writing header %s: %f\n", keyword, item->data.F32);150 psTrace("psModules.concepts", 9, "Writing header %s: %f\n", keyword, item->data.F32); 151 151 return psMetadataAddF32(hdu->header, PS_LIST_TAIL, keyword, PS_META_REPLACE, item->comment, 152 152 item->data.F32); 153 153 case PS_DATA_F64: 154 psTrace( __func__, 9, "Writing header %s: %f\n", keyword, item->data.F64);154 psTrace("psModules.concepts", 9, "Writing header %s: %f\n", keyword, item->data.F64); 155 155 return psMetadataAddF64(hdu->header, PS_LIST_TAIL, keyword, PS_META_REPLACE, item->comment, 156 156 item->data.F64); 157 157 case PS_DATA_REGION: { 158 158 psString region = psRegionToString(*(psRegion*)item->data.V); 159 psTrace( __func__, 9, "Writing header %s: %s\n", keyword, region);159 psTrace("psModules.concepts", 9, "Writing header %s: %s\n", keyword, region); 160 160 bool result = psMetadataAddStr(hdu->header, PS_LIST_TAIL, keyword, PS_META_REPLACE, item->comment, 161 161 region); … … 252 252 psString source = psMetadataLookupStr(&mdok, cell->config, nameSource); // The source 253 253 if (mdok && strlen(source) > 0) { 254 psTrace( __func__, 8, "%s is %s\n", nameSource, source);254 psTrace("psModules.concepts", 8, "%s is %s\n", nameSource, source); 255 255 if (strcasecmp(source, "HEADER") == 0) { 256 256 if (cameraItem->type != PS_DATA_STRING) { … … 259 259 continue; 260 260 } 261 psTrace( __func__, 8, "Writing %s to header %s\n", name, cameraItem->data.V);261 psTrace("psModules.concepts", 8, "Writing %s to header %s\n", name, cameraItem->data.V); 262 262 writeHeader(hdu, cameraItem->data.V, formatted); 263 263 } else if (strcasecmp(source, "VALUE") == 0) { 264 psTrace( __func__, 8, "Checking %s against camera format.\n", name);264 psTrace("psModules.concepts", 8, "Checking %s against camera format.\n", name); 265 265 if (! compareConcepts(formatted, cameraItem)) { 266 266 psLogMsg(__func__, PS_LOG_WARN, "Concept %s is specified by value in the camera " … … 384 384 continue; 385 385 } 386 psTrace( __func__, 3, "Writing %s to header %s\n", name, headerItem->data.V);386 psTrace("psModules.concepts", 3, "Writing %s to header %s\n", name, headerItem->data.V); 387 387 psMetadataItem *conceptItem = psMetadataLookup(concepts, name); // The item from the concepts 388 388 psMetadataItem *formatted = conceptFormat(spec, conceptItem, cameraFormat, fpa, chip, cell); -
trunk/psModules/src/config/pmConfig.c
r8065 r8246 3 3 * @author PAP, IfA 4 4 * 5 * @version $Revision: 1.3 6$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-08-0 2 19:33:29$5 * @version $Revision: 1.37 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-08-09 02:37:07 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 92 92 struct stat filestat; 93 93 94 psTrace( __func__, 3, "Loading %s configuration from file %s\n",94 psTrace("psModules.config", 3, "Loading %s configuration from file %s\n", 95 95 description, name); 96 96 … … 307 307 psString timeName = psMetadataLookupStr(&mdok, config->site, "TIME"); 308 308 if (mdok && timeName) { 309 psTrace( __func__, 7, "Initialising psTime with file %s\n", timeName);309 psTrace("psModules.config", 7, "Initialising psTime with file %s\n", timeName); 310 310 // XXX: PAP had a call to psLibInit is PRODUCTION not set. Why? 311 311 psTimeInitialize(timeName); … … 319 319 int logLevel = psMetadataLookupS32(&mdok, config->site, "LOGLEVEL"); 320 320 if (mdok && logLevel >= 0) { 321 psTrace( __func__, 7, "Setting log level to %d\n", logLevel);321 psTrace("psModules.config", 7, "Setting log level to %d\n", logLevel); 322 322 psLogSetLevel(logLevel); 323 323 } … … 330 330 psString logFormat = psMetadataLookupStr(&mdok, config->site, "LOGFORMAT"); 331 331 if (mdok && logFormat) { 332 psTrace( __func__, 7, "Setting log format to %s\n", logFormat);332 psTrace("psModules.config", 7, "Setting log format to %s\n", logFormat); 333 333 psLogSetFormat(logFormat); 334 334 } … … 380 380 continue; 381 381 } 382 psTrace( __func__, 7, "Setting trace level for %s to %d\n", traceItem->name, traceItem->data.S32);382 psTrace("psModules.config", 7, "Setting trace level for %s to %d\n", traceItem->name, traceItem->data.S32); 383 383 psTraceSetLevel(traceItem->name, traceItem->data.S32); 384 384 } … … 429 429 // It doesn't have a required header keyword, so it's not it 430 430 psFree(ruleIter); 431 psTrace( __func__, 5, "Can't find %s\n", ruleItem->name);431 psTrace("psModules.config", 5, "Can't find %s\n", ruleItem->name); 432 432 return false; 433 433 } … … 435 435 // Check to see if the rule works 436 436 if (! psMetadataItemCompare(headerItem, ruleItem)) { 437 psTrace( __func__, 5, "%s doesn't match.\n", ruleItem->name);437 psTrace("psModules.config", 5, "%s doesn't match.\n", ruleItem->name); 438 438 psFree(ruleIter); 439 439 return false; … … 476 476 continue; 477 477 } 478 psTrace( __func__, 5, "Reading camera format for %s...\n", formatsItem->name);478 psTrace("psModules.config", 5, "Reading camera format for %s...\n", formatsItem->name); 479 479 psMetadata *testFormat = NULL; // Format to test against what we've got 480 480 if (!readConfig(&testFormat, formatsItem->data.V, formatsItem->name)) { … … 529 529 while ((camerasItem = psMetadataGetAndIncrement(camerasIter))) { 530 530 // Open the camera information 531 psTrace( __func__, 3, "Inspecting camera %s (%s)\n", camerasItem->name, camerasItem->comment);531 psTrace("psModules.config", 3, "Inspecting camera %s (%s)\n", camerasItem->name, camerasItem->comment); 532 532 if (camerasItem->type != PS_DATA_STRING) { 533 533 psLogMsg(__func__, PS_LOG_WARN, "Camera configuration for %s in CAMERAS is not of type STR " … … 536 536 } 537 537 538 psTrace( __func__, 5, "Reading camera configuration for %s...\n", camerasItem->name);538 psTrace("psModules.config", 5, "Reading camera configuration for %s...\n", camerasItem->name); 539 539 psMetadata *testCamera = NULL; // Camera to test against what we've got: 540 540 -
trunk/psModules/src/detrend/pmFlatNormalize.c
r7860 r8246 71 71 for (int i = 0; i < numSources; i++) { 72 72 if (sourceMask->data.U8[i]) { 73 psTrace( __func__, 7, "Flux for exposure %d is masked.\n", i);73 psTrace("psModules.detrend", 7, "Flux for exposure %d is masked.\n", i); 74 74 continue; 75 75 } … … 89 89 sourceFlux->data.F32[i] = NAN; 90 90 } 91 psTrace( __func__, 7, "Flux for exposure %d is %lf\n", i, exp(sourceFlux->data.F32[i]));91 psTrace("psModules.detrend", 7, "Flux for exposure %d is %lf\n", i, exp(sourceFlux->data.F32[i])); 92 92 } 93 93 … … 117 117 chipGains->data.F32[i] = NAN; 118 118 } 119 psTrace( __func__, 7, "Gain for chip %d is %lf\n", i, exp(-chipGains->data.F32[i]));119 psTrace("psModules.detrend", 7, "Gain for chip %d is %lf\n", i, exp(-chipGains->data.F32[i])); 120 120 } 121 121 122 psTrace( __func__, 2, "Iteration %d: difference is %e\n", iter, diff);122 psTrace("psModules.detrend", 2, "Iteration %d: difference is %e\n", iter, diff); 123 123 124 124 // Switch the old and new -
trunk/psModules/src/detrend/pmFringeStats.c
r7887 r8246 3 3 * @author Eugene Magnier, IfA 4 4 * 5 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-0 7-13 02:21:25$5 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-08-09 02:37:07 $ 7 7 * 8 8 * Copyright 2004 IfA … … 327 327 dfPt[i] = 1.0 / medianSd->sampleStdev; 328 328 329 psTrace( __func__, 7, "[%d:%d,%d:%d]: %f %f\n", (int)region.x0, (int)region.x1,329 psTrace("psModules.detrend", 7, "[%d:%d,%d:%d]: %f %f\n", (int)region.x0, (int)region.x1, 330 330 (int)region.y0, (int)region.y1, fPt[i], dfPt[i]); 331 331 } … … 671 671 int numClipped = 0; // Number clipped 672 672 for (int i = 0; i < diffs->n; i++) { 673 psTrace( __func__, 10, "Region %d (%d): %f\n", i, mask->data.U8[i], diffs->data.F32[i]);673 psTrace("psModules.detrend", 10, "Region %d (%d): %f\n", i, mask->data.U8[i], diffs->data.F32[i]); 674 674 if (!mask->data.U8[i] && fabs(diffs->data.F32[i]) > middle + thresh) { 675 psTrace( __func__, 5, "Masking %d: %f\n", i, diffs->data.F32[i]);675 psTrace("psModules.detrend", 5, "Masking %d: %f\n", i, diffs->data.F32[i]); 676 676 mask->data.U8[i] = 1; 677 677 numClipped++; … … 732 732 if (!finite(fringe->f->data.F32[j])) { 733 733 mask->data.U8[j] = 1; 734 psTrace( __func__, 9, "Masking region %d because not finite in fringe %d.\n", j, i);734 psTrace("psModules.detrend", 9, "Masking region %d because not finite in fringe %d.\n", j, i); 735 735 } 736 736 } … … 749 749 fringeScaleDiffs(diff, science, fringes, scale); 750 750 numClipped = clipRegions(diff, mask, 3.0*rej); 751 psTrace( __func__, 4, "%d regions clipped in initial pass.\n", numClipped);751 psTrace("psModules.detrend", 4, "%d regions clipped in initial pass.\n", numClipped); 752 752 753 753 unsigned int iter = 0; // Iteration number … … 756 756 iter++; 757 757 scaleMeasure(scale, science, fringes); // The scales 758 psTrace( __func__, 1, "Fringe scales after iteration %d:\n", iter);759 psTrace( __func__, 1, "Background: %f %f\n", scale->coeff->data.F32[0], scale->coeffErr->data.F32[0]);758 psTrace("psModules.detrend", 1, "Fringe scales after iteration %d:\n", iter); 759 psTrace("psModules.detrend", 1, "Background: %f %f\n", scale->coeff->data.F32[0], scale->coeffErr->data.F32[0]); 760 760 for (int i = 0; i < scale->nFringeFrames; i++) { 761 psTrace( __func__, 1, "%d: %f %f\n", i, scale->coeff->data.F32[i + 1],761 psTrace("psModules.detrend", 1, "%d: %f %f\n", i, scale->coeff->data.F32[i + 1], 762 762 scale->coeffErr->data.F32[i + 1]); 763 763 } … … 766 766 iterClip = clipRegions(diff, mask, rej); // Number clipped 767 767 numClipped += iterClip; 768 psTrace( __func__, 9, "Clipped: %d\tFrac: %f\n", iterClip, (float)numClipped/(float)numRegions);768 psTrace("psModules.detrend", 9, "Clipped: %d\tFrac: %f\n", iterClip, (float)numClipped/(float)numRegions); 769 769 } while (iterClip > 0 && iter < nIter && (float)numClipped/(float)numRegions <= 1.0 - keepFrac); 770 770 psFree(diff); … … 811 811 psFree(scienceStats); 812 812 813 psTrace( __func__, 7, "Fringe solution:\n");813 psTrace("psModules.detrend", 7, "Fringe solution:\n"); 814 814 for (int i = 0; i < fringeImages->n + 1; i++) { 815 psTrace( __func__, 7, "%d: %f %f\n", i, scale->coeff->data.F32[i],815 psTrace("psModules.detrend", 7, "%d: %f %f\n", i, scale->coeff->data.F32[i], 816 816 scale->coeffErr->data.F32[i]); 817 817 } -
trunk/psModules/src/detrend/pmSubtractBias.c
r8108 r8246 11 11 * @author GLG, MHPCC 12 12 * 13 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $14 * @date $Date: 2006-08-0 3 19:37:55$13 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2006-08-09 02:37:07 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 259 259 const pmReadout *bias, const pmReadout *dark) 260 260 { 261 psTrace(" .psModule.pmSubtracBias.pmSubtractBias", 4,261 psTrace("psModules.detrend", 4, 262 262 "---- pmSubtractBias() begin ----\n"); 263 263 PS_ASSERT_PTR_NON_NULL(in, NULL); -
trunk/psModules/src/detrend/pmSubtractSky.c
r8004 r8246 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 7-28 03:21:19$8 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-09 02:37:07 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 static psS32 DetermineNumBits(psStatsOptions data) 34 34 { 35 psTrace(" SubtractSky.DetermineNumBits", 4, "Calling DetermineNumBits(0x%x)\n", data);35 psTrace("psModules.detrend", 4, "Calling DetermineNumBits(0x%x)\n", data); 36 36 37 37 psS32 i; … … 46 46 } 47 47 48 psTrace(" SubtractSky.DetermineNumBits", 4,48 psTrace("psModules.detrend", 4, 49 49 "Calling DetermineNumBits(0x%x) -> %d\n", data, numBits); 50 50 return(numBits); … … 58 58 static psU64 getHighestPriorityStatOption(psU64 statOptions) 59 59 { 60 psTrace(" SubtractSky.getHighestPriorityStatOption", 4,60 psTrace("psModules.detrend", 4, 61 61 "Calling getHighestPriorityStatOption(0x%x)\n", statOptions); 62 62 … … 95 95 psStatsOptions statOptions) 96 96 { 97 psTrace(" SubtractSky.binImage", 4, "Calling binImage(%d)\n", binFactor);97 psTrace("psModules.detrend", 4, "Calling binImage(%d)\n", binFactor); 98 98 99 99 if (binFactor <= 0) { … … 148 148 psFree(myStats); 149 149 150 psTrace(" SubtractSky.binImage", 4, "Exiting binImage(%d)\n", binFactor);150 psTrace("psModules.detrend", 4, "Exiting binImage(%d)\n", binFactor); 151 151 return(origImage); 152 152 } … … 163 163 static psS32 CalculatePolyTerms(psS32 xOrder, psS32 yOrder) 164 164 { 165 psTrace(" SubtractSky.CalculatePolyTerms", 4,165 psTrace("psModules.detrend", 4, 166 166 "Calling CalculatePolyTerms(%d, %d)\n", xOrder, yOrder); 167 167 … … 178 178 } 179 179 } 180 psTrace(" SubtractSky.CalculatePolyTerms", 4,180 psTrace("psModules.detrend", 4, 181 181 "Exiting CalculatePolyTerms(%d, %d) -> %d\n", xOrder, yOrder, localPolyTerms); 182 182 return(localPolyTerms); … … 198 198 static psS32 **buildPolyTerms(psS32 xOrder, psS32 yOrder) 199 199 { 200 psTrace(" SubtractSky.buildPolyTerms", 4,200 psTrace("psModules.detrend", 4, 201 201 "Calling buildPolyTerms(%d, %d)\n", xOrder, yOrder); 202 202 … … 233 233 } 234 234 235 psTrace(" SubtractSky.buildPolyTerms", 4,235 psTrace("psModules.detrend", 4, 236 236 "Exiting buildPolyTerms(%d, %d)\n", xOrder, yOrder); 237 237 return(polyTerms); … … 258 258 psS32 yOrder) 259 259 { 260 psTrace(" SubtractSky.buildPolyTerms", 4,260 psTrace("psModules.detrend", 4, 261 261 "Calling buildPolyTerms(%d, %d)\n", xOrder, yOrder); 262 262 … … 276 276 xSum*= x; 277 277 } 278 psTrace(" SubtractSky.buildPolyTerms", 4,278 psTrace("psModules.detrend", 4, 279 279 "Exiting buildPolyTerms(%d, %d)\n", xOrder, yOrder); 280 280 } … … 297 297 psImage *maskImage) 298 298 { 299 psTrace(" SubtractSky.ImageFitPolynomial", 4,299 psTrace("psModules.detrend", 4, 300 300 "Calling ImageFitPolynomial()\n"); 301 301 PS_ASSERT_POLY_NON_NULL(myPoly, NULL); … … 416 416 for (i=0;i<localPolyTerms;i++) { 417 417 myPoly->coeff[ polyTerms[i][0] ][ polyTerms[i][1] ] = C->data.F64[i]; 418 psTrace(" .psModule.pmSubtractSky.ImageFitPolynomial", 6,418 psTrace("psModules.detrend", 6, 419 419 "myPoly->coeff[%d][%d] is %f\n", polyTerms[i][0], polyTerms[i][1], myPoly->coeff[ polyTerms[i][0] ][ polyTerms[i][1] ]); 420 420 } … … 456 456 } 457 457 458 psTrace(" SubtractSky.ImageFitPolynomial", 4,458 psTrace("psModules.detrend", 4, 459 459 "Exiting ImageFitPolynomial()\n"); 460 // psTrace(" .psModule.pmSubtractSky.ImageFitPolynomial", 4,460 // psTrace("psModules.detrend", 4, 461 461 // "---- ImageFitPolynomial() end successfully ----\n"); 462 462 return(myPoly); … … 487 487 PS_WARN_PTR_NON_NULL(in->parent->concepts); 488 488 } 489 psTrace(" .psModule.pmSubtractSky", 4,489 psTrace("psModules.detrend", 4, 490 490 "---- pmSubtractSky() begin ----\n"); 491 491 … … 590 590 psImageInit(binnedMaskImage, 0); 591 591 } 592 psTrace(" .psModule.pmSubtractSky", 4,592 psTrace("psModules.detrend", 4, 593 593 "binnedImage size is (%d, %d)\n", binnedImage->numRows, binnedImage->numCols); 594 594 … … 609 609 psF64 binnedStdev = myStats->sampleStdev; 610 610 psFree(myStats); 611 psTrace(" .psModule.pmSubtractSky", 6,611 psTrace("psModules.detrend", 6, 612 612 "binned StDev is %f\n", binnedStdev); 613 613 614 614 // Clip all pixels which are more than clipSD sigmas from the mean. 615 psTrace(" .psModule.pmSubtractSky", 6,615 psTrace("psModules.detrend", 6, 616 616 "clipSD is %f\n", clipSD); 617 617 … … 705 705 trimmedImg->data.F32[row][col]-= binPixel; 706 706 707 psTrace(" .psModule.pmSubtractSky", 8,707 psTrace("psModules.detrend", 8, 708 708 "image[%d][%d] <--> binnedImage[%.2f][%.2f]: %f\n", 709 709 row, col, binRowF64-0.5, binColF64-0.5, binPixel); … … 718 718 } 719 719 720 psTrace(" .psModule.pmSubtractSky", 4,720 psTrace("psModules.detrend", 4, 721 721 "---- pmSubtractSky() exit successfully ----\n"); 722 722 return(in); -
trunk/psModules/src/imcombine/pmImageCombine.c
r8004 r8246 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 7-28 03:21:19$10 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-08-09 02:37:07 $ 12 12 * 13 13 * XXX: pmRejectPixels() has a known bug with the pmImageTransform() call. … … 50 50 PS_ASSERT_PTR_NON_NULL(images, combine); 51 51 psU32 numImages = images->n; 52 psTrace(" ImageCombine.pmCombineImages", 3, "Calling pmCombineImages(%d)\n", images->n);52 psTrace("psModules.imcombine", 3, "Calling pmCombineImages(%d)\n", images->n); 53 53 54 54 if (errors != NULL) { … … 297 297 psFree(qpPtr); 298 298 299 psTrace(" ImageCombine.pmCombineImages", 3, "Exiting pmCombineImages(%d)\n", images->n);299 psTrace("psModules.imcombine", 3, "Exiting pmCombineImages(%d)\n", images->n); 300 300 return(combine); 301 301 } … … 312 312 ) 313 313 { 314 psTrace(" ImageCombine.CalcGradient", 4, "Calling CalcGradient(%d, %d)\n", x, y);314 psTrace("psModules.imcombine", 4, "Calling CalcGradient(%d, %d)\n", x, y); 315 315 int num = 0; 316 316 psVector *pixels = psVectorAlloc(8, PS_TYPE_F32); // Array of pixels … … 365 365 psFree(mask); 366 366 367 psTrace(" ImageCombine.CalcGradient", 4, "Exiting CalcGradient(%d, %d)\n", x, y);367 psTrace("psModules.imcombine", 4, "Exiting CalcGradient(%d, %d)\n", x, y); 368 368 return(median / image->data.F32[y][x]); 369 369 } … … 382 382 psPlaneTransform *myOutToIn) 383 383 { 384 psTrace(" ImageCombine.DetermineRegion", 4, "Calling DetermineRegion()\n");384 psTrace("psModules.imcombine", 4, "Calling DetermineRegion()\n"); 385 385 psRegion myRegion; 386 386 myRegion.x0 = PS_MAX_F32; … … 457 457 } 458 458 459 psTrace(" ImageCombine.DetermineRegion", 4, "Exiting DetermineRegion()\n");459 psTrace("psModules.imcombine", 4, "Exiting DetermineRegion()\n"); 460 460 return(myRegion); 461 461 } … … 466 466 static psImage *ImageConvertF32(psImage *image) 467 467 { 468 psTrace(" ImageCombine.ImageConvertF32", 4, "Calling ImageConvertF32()\n");468 psTrace("psModules.imcombine", 4, "Calling ImageConvertF32()\n"); 469 469 psImage *imgF32 = psImageAlloc(image->numCols, image->numRows, PS_TYPE_F32); 470 470 … … 475 475 } 476 476 477 psTrace(" ImageCombine.ImageConvertF32", 4, "Exiting ImageConvertF32()\n");477 psTrace("psModules.imcombine", 4, "Exiting ImageConvertF32()\n"); 478 478 return(imgF32); 479 479 } … … 504 504 ) 505 505 { 506 psTrace(" ImageCombine.pmRejectPixels", 3, "Calling pmRejectPixels()\n");506 psTrace("psModules.imcombine", 3, "Calling pmRejectPixels()\n"); 507 507 PS_ASSERT_PTR_NON_NULL(images, NULL); 508 508 for (psS32 im = 0 ; im < images->n ; im++) { … … 663 663 psFree(inCoords); 664 664 psFree(outCoords); 665 psTrace(" ImageCombine.pmRejectPixels", 3, "Exiting pmRejectPixels()\n");665 psTrace("psModules.imcombine", 3, "Exiting pmRejectPixels()\n"); 666 666 return(rejects); 667 667 } -
trunk/psModules/src/imcombine/pmImageSubtract.c
r7769 r8246 7 7 * @author GLG, MHPCC 8 8 * 9 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-0 6-30 23:59:49$9 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-08-09 02:37:07 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 97 97 int spatialOrder) 98 98 { 99 psTrace(" ImageSubtract.pmSubtractionKernelsAllocPOIS", 3,99 psTrace("psModules.imcombine", 3, 100 100 "Calling pmSubtractionKernelsAllocPOIS(%d, %d)\n", size, spatialOrder); 101 101 PS_ASSERT_INT_POSITIVE(size, NULL); … … 173 173 } 174 174 175 psTrace(" ImageSubtract.pmSubtractionKernelsAllocPOIS", 3,175 psTrace("psModules.imcombine", 3, 176 176 "Exiting pmSubtractionKernelsAllocPOIS(%d, %d)\n", size, spatialOrder); 177 177 return(tmp); … … 190 190 PS_ASSERT_VECTOR_NON_NULL(sigmas, NULL); 191 191 PS_ASSERT_VECTOR_NON_NULL(orders, NULL); 192 psTrace(" ImageSubtract.pmSubtractionKernelsAllocISIS", 3,192 psTrace("psModules.imcombine", 3, 193 193 "Calling pmSubtractionKernelsAllocISIS(%d, %d, %d, %d)\n", 194 194 sigmas->n, orders->n, size, spatialOrder); … … 306 306 } 307 307 308 psTrace(" ImageSubtract.pmSubtractionKernelsAllocISIS", 3,308 psTrace("psModules.imcombine", 3, 309 309 "Exiting pmSubtractionKernelsAllocISIS(%d, %d, %d, %d)\n", 310 310 sigmas->n, orders->n, size, spatialOrder); … … 333 333 ) 334 334 { 335 psTrace(" ImageSubtract.pmSubtractionFindStamps", 3,335 psTrace("psModules.imcombine", 3, 336 336 "Calling pmSubtractionFindStamps(%d, %f, %d, %d, %d)\n", 337 337 maskVal, threshold, xNum, yNum, border); … … 456 456 } 457 457 } 458 psTrace(" ImageSubtract.pmSubtractionFindStamps", 3,458 psTrace("psModules.imcombine", 3, 459 459 "Exiting pmSubtractionFindStamps(%d, %f, %d, %d, %d)\n", 460 460 maskVal, threshold, xNum, yNum, border); … … 474 474 psF32 y) 475 475 { 476 psTrace(" ImageSubtract.GenSpatialOrder", 4,476 psTrace("psModules.imcombine", 4, 477 477 "Calling GenSpatialOrder(%d, %f, %f)\n", spatialOrder, x, y); 478 478 … … 490 490 } 491 491 492 psTrace(" ImageSubtract.GenSpatialOrder", 4,492 psTrace("psModules.imcombine", 4, 493 493 "Exiting GenSpatialOrder(%d, %f, %f)\n", spatialOrder, x, y); 494 494 … … 509 509 510 510 511 psTrace(" ImageSubtract.IsisKernelConvolve", 4,511 psTrace("psModules.imcombine", 4, 512 512 "Calling IsisKernelConvolve(%d, %d, %d)\n", kernelID, col, row); 513 513 psS32 spatialOrder = kernels->spatialOrder; … … 541 541 psFree(polyValues); 542 542 543 psTrace(" ImageSubtract.IsisKernelConvolve", 4,543 psTrace("psModules.imcombine", 4, 544 544 "Exiting IsisKernelConvolve(%d, %d, %d)\n", kernelID, col, row); 545 545 return(conv); … … 563 563 psS32 row) 564 564 { 565 psTrace(" ImageSubtract.ConvolvePixelPois", 4,565 psTrace("psModules.imcombine", 4, 566 566 "Calling ConvolvePixelPois(%d, %d)\n", col, row); 567 567 psS32 nBF = kernels->u->n; … … 604 604 } 605 605 606 psTrace(" ImageSubtract.ConvolvePixelPois", 4,606 psTrace("psModules.imcombine", 4, 607 607 "Exiting ConvolvePixelPois(%d, %d)\n", col, row); 608 608 return(conv); … … 628 628 psS32 row) 629 629 { 630 psTrace(" ImageSubtract.ConvolvePixelIsis", 4,630 psTrace("psModules.imcombine", 4, 631 631 "Calling ConvolvePixelIsis(%d, %d)\n", col, row); 632 632 psF32 background = solution->data.F64[solution->n-1]; … … 640 640 } 641 641 642 psTrace(" ImageSubtract.ConvolvePixelIsis", 4,642 psTrace("psModules.imcombine", 4, 643 643 "Exiting ConvolvePixelIsis(%d, %d)\n", col, row); 644 644 return(conv); … … 655 655 const psSubtractionKernels *kernels) 656 656 { 657 psTrace(" ImageSubtract.ConvolveImage", 4, "Calling ConvolveImage()\n");657 psTrace("psModules.imcombine", 4, "Calling ConvolveImage()\n"); 658 658 PS_ASSERT_IMAGE_NON_NULL(input, NULL); 659 659 PS_ASSERT_IMAGE_NON_EMPTY(input, NULL); … … 724 724 } 725 725 726 psTrace(" ImageSubtract.ConvolveImage", 4, "Exiting ConvolveImage()\n");726 psTrace("psModules.imcombine", 4, "Exiting ConvolveImage()\n"); 727 727 return convolved; 728 728 } … … 743 743 ) 744 744 { 745 psTrace(" ImageSubtract.pmSubtractionCalculateEquation", 3,745 psTrace("psModules.imcombine", 3, 746 746 "Calling pmSubtractionCalculateEquation()\n"); 747 747 PS_ASSERT_PTR_NON_NULL(stamps, false); … … 805 805 for (psS32 s = 0; s < stamps->n; s++) { 806 806 pmStamp *stamp = (pmStamp *) stamps->data[s]; 807 psTrace("p mSubtractionCalculateEquation", 6, "subCalcEqn(): stamp %d\n", s);807 psTrace("psModules.imcombine", 6, "subCalcEqn(): stamp %d\n", s); 808 808 if (stamp->status == PM_STAMP_RECALC) { 809 psTrace("p mSubtractionCalculateEquation", 6, "subCalcEqn(): stamp %d: status is PM_STAMP_RECALC.\n", s);809 psTrace("psModules.imcombine", 6, "subCalcEqn(): stamp %d: status is PM_STAMP_RECALC.\n", s); 810 810 psImage *stampMatrix = stamp->matrix; 811 811 psVector *stampVector = stamp->vector; … … 829 829 } 830 830 psVectorInit(stampVector, 0.0); 831 psTrace("p mSubtractionCalculateEquation", 6, "subCalcEqn(): stamp %d: allocate matrix and vector.\n", s);831 psTrace("psModules.imcombine", 6, "subCalcEqn(): stamp %d: allocate matrix and vector.\n", s); 832 832 833 833 // … … 840 840 ((psF64) (stamp->y - numHalfRows)) / ((psF64) numHalfRows)); 841 841 842 psTrace("p mSubtractionCalculateEquation", 6, "subCalcEqn(): stamp %d: generated spatial order terms.\n", s);842 psTrace("psModules.imcombine", 6, "subCalcEqn(): stamp %d: generated spatial order terms.\n", s); 843 843 844 844 if (kernels->type == PM_SUBTRACTION_KERNEL_POIS) { … … 848 848 for (psS32 y = stamp->y - footprint; y < stamp->y + footprint; y++) { 849 849 for (psS32 x = stamp->x - footprint; x < stamp->x + footprint; x++) { 850 psTrace("p mSubtractionCalculateEquation", 6, "subCalcEqn(): pixel (%d, %d).\n", y, x);850 psTrace("psModules.imcombine", 6, "subCalcEqn(): pixel (%d, %d).\n", y, x); 851 851 852 852 // The inverse of the noise, squared. … … 932 932 for (psS32 y = stamp->y - footprint; y < stamp->y + footprint; y++) { 933 933 for (psS32 x = stamp->x - footprint; x < stamp->x + footprint; x++) { 934 psTrace("p mSubtractionCalculateEquation", 6, "subCalcEqn(): pixel (%d, %d).\n", y, x);934 psTrace("psModules.imcombine", 6, "subCalcEqn(): pixel (%d, %d).\n", y, x); 935 935 psF32 invNoise2 = 1.0/reference->data.F32[y][x]; // The inverse of the noise, squared. 936 936 … … 998 998 } 999 999 } 1000 psTrace(" ImageSubtract.pmSubtractionCalculateEquation", 3,1000 psTrace("psModules.imcombine", 3, 1001 1001 "Exiting pmSubtractionCalculateEquation()\n"); 1002 1002 return(true); … … 1012 1012 ) 1013 1013 { 1014 psTrace(" ImageSubtract.pmSubtractionSolveEquation", 3,1014 psTrace("psModules.imcombine", 3, 1015 1015 "Calling pmSubtractionSolveEquation()\n"); 1016 1016 PS_ASSERT_PTR_NON_NULL(stamps, NULL); … … 1120 1120 psFree(permutation); 1121 1121 1122 psTrace(" ImageSubtract.pmSubtractionSolveEquation", 3,1122 psTrace("psModules.imcombine", 3, 1123 1123 "Exiting pmSubtractionSolveEquation()\n"); 1124 1124 return(solution); … … 1138 1138 const psVector *solution) 1139 1139 { 1140 psTrace(" ImageSubtract.CalculateDeviations", 4,1140 psTrace("psModules.imcombine", 4, 1141 1141 "Calling CalculateDeviations()\n"); 1142 1142 PS_ASSERT_PTR_NON_NULL(stamps, NULL); … … 1220 1220 psFree(subStamp); 1221 1221 1222 psTrace(" ImageSubtract.CalculateDeviations", 4,1222 psTrace("psModules.imcombine", 4, 1223 1223 "Exiting CalculateDeviations()\n"); 1224 1224 return deviations; … … 1238 1238 ) 1239 1239 { 1240 psTrace(" ImageSubtract.pmSubtractionRejectStamps", 3,1240 psTrace("psModules.imcombine", 3, 1241 1241 "Calling pmSubtractionRejectStamps()\n"); 1242 1242 PS_ASSERT_PTR_NON_NULL(stamps, false); … … 1313 1313 1314 1314 psFree(deviations); 1315 psTrace(" ImageSubtract.pmSubtractionRejectStamps", 3,1315 psTrace("psModules.imcombine", 3, 1316 1316 "Exiting pmSubtractionRejectStamps()\n"); 1317 1317 return(true); … … 1327 1327 ) 1328 1328 { 1329 psTrace(" ImageSubtract.pmSubtractionKernelImage", 3,1329 psTrace("psModules.imcombine", 3, 1330 1330 "Calling pmSubtractionKernelImage()\n"); 1331 1331 PS_ASSERT_VECTOR_NON_NULL(solution, NULL); … … 1401 1401 psFree(polyValues); 1402 1402 1403 psTrace(" ImageSubtract.pmSubtractionKernelImage", 3,1403 psTrace("psModules.imcombine", 3, 1404 1404 "Exiting pmSubtractionKernelImage()\n"); 1405 1405 return(out); -
trunk/psModules/src/imcombine/pmReadoutCombine.c
r7868 r8246 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1.2 2$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-0 7-12 03:30:53$7 * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-08-09 02:37:07 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 168 168 minInputCols = PS_MIN(minInputCols, readout->col0); 169 169 maxInputCols = PS_MAX(maxInputCols, readout->col0 + readout->image->numCols); 170 psTrace( __func__, 7, "Readout %d: offset %d,%d; size %dx%d\n", i,170 psTrace("psModules.imcombine", 7, "Readout %d: offset %d,%d; size %dx%d\n", i, 171 171 readout->col0, readout->row0, readout->image->numCols, readout->image->numRows); 172 172 } … … 184 184 *(psS32 *) &(output->row0) = minInputRows; 185 185 } 186 psTrace( __func__, 7, "Output minimum: %d,%d\n", output->col0, output->row0);186 psTrace("psModules.imcombine", 7, "Output minimum: %d,%d\n", output->col0, output->row0); 187 187 188 188 // Allocate the output products … … 274 274 #ifndef PS_NO_TRACE 275 275 276 psTrace( __func__, 3, "Iterating output: %d --> %d, %d --> %d\n",276 psTrace("psModules.imcombine", 3, "Iterating output: %d --> %d, %d --> %d\n", 277 277 minInputCols - output->col0, maxInputCols - output->col0, 278 278 minInputRows - output->row0, maxInputRows - output->row0); … … 280 280 for (int r = 0; r < inputs->n; r++) { 281 281 pmReadout *readout = inputs->data[r]; // Input readout 282 psTrace( __func__, 3, "Iterating input %d: %d --> %d, %d --> %d\n", r,282 psTrace("psModules.imcombine", 3, "Iterating input %d: %d --> %d, %d --> %d\n", r, 283 283 minInputCols - readout->col0, maxInputCols - readout->col0, 284 284 minInputRows - readout->row0, maxInputRows - readout->row0); -
trunk/psModules/src/objects/pmModel.c
r7604 r8246 6 6 * @author EAM, IfA 7 7 * 8 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 6-21 03:21:16$8 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-09 02:37:07 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 31 31 static void modelFree(pmModel *tmp) 32 32 { 33 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);33 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 34 34 psFree(tmp->params); 35 35 psFree(tmp->dparams); 36 psTrace( __func__, 4, "---- %s() end ----\n", __func__);36 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 37 37 } 38 38 … … 44 44 pmModel *pmModelAlloc(pmModelType type) 45 45 { 46 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);46 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 47 47 pmModel *tmp = (pmModel *) psAlloc(sizeof(pmModel)); 48 48 … … 69 69 70 70 psMemSetDeallocator(tmp, (psFreeFunc) modelFree); 71 psTrace( __func__, 3, "---- %s() end ----\n", __func__);71 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 72 72 return(tmp); 73 73 } … … 102 102 psF32 pmModelEval(pmModel *model, psImage *image, psS32 col, psS32 row) 103 103 { 104 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);104 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 105 105 PS_ASSERT_PTR_NON_NULL(image, false); 106 106 PS_ASSERT_PTR_NON_NULL(model, false); … … 119 119 tmpF = modelFunc (NULL, model->params, x); 120 120 psFree(x); 121 psTrace( __func__, 3, "---- %s() end ----\n", __func__);121 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 122 122 return(tmpF); 123 123 } … … 131 131 ) 132 132 { 133 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);133 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 134 134 135 135 PS_ASSERT_PTR_NON_NULL(model, false); … … 183 183 } 184 184 psFree(x); 185 psTrace( __func__, 3, "---- %s(true) end ----\n", __func__);185 psTrace("psModules.objects", 3, "---- %s(true) end ----\n", __func__); 186 186 return(true); 187 187 } … … 195 195 bool sky) 196 196 { 197 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);197 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 198 198 psBool rc = AddOrSubModel(image, mask, model, center, sky, true); 199 psTrace( __func__, 3, "---- %s(%d) end ----\n", __func__, rc);199 psTrace("psModules.objects", 3, "---- %s(%d) end ----\n", __func__, rc); 200 200 return(rc); 201 201 } … … 209 209 bool sky) 210 210 { 211 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);211 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 212 212 psBool rc = AddOrSubModel(image, mask, model, center, sky, false); 213 psTrace( __func__, 3, "---- %s(%d) end ----\n", __func__, rc);213 psTrace("psModules.objects", 3, "---- %s(%d) end ----\n", __func__, rc); 214 214 return(rc); 215 215 } -
trunk/psModules/src/objects/pmModelGroup.c
r7604 r8246 6 6 * @author EAM, IfA 7 7 * 8 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 6-21 03:21:16$8 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-09 02:37:07 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 203 203 pmModelType modelType) 204 204 { 205 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);205 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 206 206 PS_ASSERT_PTR_NON_NULL(source->moments, false); 207 207 PS_ASSERT_PTR_NON_NULL(source->peak, false); … … 211 211 pmModelGuessFunc modelGuessFunc = pmModelGuessFunc_GetFunction(modelType); 212 212 modelGuessFunc(model, source); 213 psTrace( __func__, 3, "---- %s() end ----\n", __func__);213 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 214 214 return(model); 215 215 } -
trunk/psModules/src/objects/pmMoments.c
r7604 r8246 6 6 * @author EAM, IfA 7 7 * 8 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 6-21 03:21:16$8 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-09 02:37:07 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 23 23 pmMoments *pmMomentsAlloc() 24 24 { 25 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);25 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 26 26 pmMoments *tmp = (pmMoments *) psAlloc(sizeof(pmMoments)); 27 27 tmp->x = 0.0; … … 35 35 tmp->nPixels = 0; 36 36 37 psTrace( __func__, 3, "---- %s() end ----\n", __func__);37 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 38 38 return(tmp); 39 39 } -
trunk/psModules/src/objects/pmPeaks.c
r7604 r8246 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 6-21 03:21:16$8 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-09 02:37:07 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 32 32 pmPeakType type) 33 33 { 34 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);34 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 35 35 pmPeak *tmpPeak = pmPeakAlloc(col, row, counts, type); 36 36 … … 43 43 // XXX EAM : is this free appropriate? (does psArrayAdd increment memory counter?) 44 44 45 psTrace( __func__, 4, "---- %s() end ----\n", __func__);45 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 46 46 return(list); 47 47 } … … 57 57 psU32 row) 58 58 { 59 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);59 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 60 60 PS_ASSERT_IMAGE_NON_NULL(image, NULL); 61 61 PS_ASSERT_IMAGE_TYPE(image, PS_TYPE_F32, NULL); … … 66 66 } 67 67 tmpVector->n = image->numCols; 68 psTrace( __func__, 4, "---- %s() end ----\n", __func__);68 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 69 69 return(tmpVector); 70 70 } … … 79 79 psS32 y) 80 80 { 81 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);81 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 82 82 if ((x >= valid.x0) && 83 83 (x <= valid.x1) && 84 84 (y >= valid.y0) && 85 85 (y <= valid.y1)) { 86 psTrace( __func__, 4, "---- %s(true) end ----\n", __func__);86 psTrace("psModules.objects", 4, "---- %s(true) end ----\n", __func__); 87 87 return(true); 88 88 } 89 psTrace( __func__, 4, "---- %s(false) end ----\n", __func__);89 psTrace("psModules.objects", 4, "---- %s(false) end ----\n", __func__); 90 90 return(false); 91 91 } … … 102 102 pmPeakType type) 103 103 { 104 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);104 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 105 105 static int id = 1; 106 106 pmPeak *tmp = (pmPeak *) psAlloc(sizeof(pmPeak)); … … 113 113 psMemSetDeallocator(tmp, (psFreeFunc) peakFree); 114 114 115 psTrace( __func__, 3, "---- %s() end ----\n", __func__);115 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 116 116 return(tmp); 117 117 } … … 125 125 int pmPeaksCompareAscend (const void **a, const void **b) 126 126 { 127 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);127 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 128 128 pmPeak *A = *(pmPeak **)a; 129 129 pmPeak *B = *(pmPeak **)b; … … 133 133 diff = A->counts - B->counts; 134 134 if (diff < FLT_EPSILON) { 135 psTrace( __func__, 3, "---- %s(-1) end ----\n", __func__);135 psTrace("psModules.objects", 3, "---- %s(-1) end ----\n", __func__); 136 136 return (-1); 137 137 } else if (diff > FLT_EPSILON) { 138 psTrace( __func__, 3, "---- %s(+1) end ----\n", __func__);138 psTrace("psModules.objects", 3, "---- %s(+1) end ----\n", __func__); 139 139 return (+1); 140 140 } 141 psTrace( __func__, 3, "---- %s(0) end ----\n", __func__);141 psTrace("psModules.objects", 3, "---- %s(0) end ----\n", __func__); 142 142 return (0); 143 143 } … … 146 146 int pmPeaksCompareDescend (const void **a, const void **b) 147 147 { 148 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);148 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 149 149 pmPeak *A = *(pmPeak **)a; 150 150 pmPeak *B = *(pmPeak **)b; … … 154 154 diff = A->counts - B->counts; 155 155 if (diff < FLT_EPSILON) { 156 psTrace( __func__, 3, "---- %s(+1) end ----\n", __func__);156 psTrace("psModules.objects", 3, "---- %s(+1) end ----\n", __func__); 157 157 return (+1); 158 158 } else if (diff > FLT_EPSILON) { 159 psTrace( __func__, 3, "---- %s(-1) end ----\n", __func__);159 psTrace("psModules.objects", 3, "---- %s(-1) end ----\n", __func__); 160 160 return (-1); 161 161 } 162 psTrace( __func__, 3, "---- %s(0) end ----\n", __func__);162 psTrace("psModules.objects", 3, "---- %s(0) end ----\n", __func__); 163 163 return (0); 164 164 } … … 178 178 psF32 threshold) 179 179 { 180 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);180 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 181 181 PS_ASSERT_VECTOR_NON_NULL(vector, NULL); 182 182 PS_ASSERT_VECTOR_NON_EMPTY(vector, NULL); … … 198 198 tmpVector = psVectorAlloc(0, PS_TYPE_U32); 199 199 } 200 psTrace( __func__, 3, "---- %s() end ----\n", __func__);200 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 201 201 return(tmpVector); 202 202 } … … 264 264 } 265 265 266 psTrace( __func__, 3, "---- %s() end ----\n", __func__);266 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 267 267 return(tmpVector); 268 268 } … … 292 292 psF32 threshold) 293 293 { 294 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);294 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 295 295 PS_ASSERT_IMAGE_NON_NULL(image, NULL); 296 296 PS_ASSERT_IMAGE_TYPE(image, PS_TYPE_F32, NULL); 297 297 if ((image->numRows == 1) || (image->numCols == 1)) { 298 298 psError(PS_ERR_UNKNOWN, true, "Currently, input image must have at least 2 rows and 2 columns."); 299 psTrace( __func__, 3, "---- %s(NULL) end ----\n", __func__);299 psTrace("psModules.objects", 3, "---- %s(NULL) end ----\n", __func__); 300 300 return(NULL); 301 301 } … … 361 361 // 362 362 if (image->numRows == 1) { 363 psTrace( __func__, 3, "---- %s() end ----\n", __func__);363 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 364 364 return(list); 365 365 } … … 484 484 psFree (tmpRow); 485 485 psFree (row1); 486 psTrace( __func__, 3, "---- %s() end ----\n", __func__);486 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 487 487 return(list); 488 488 } … … 507 507 const psRegion valid) 508 508 { 509 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);509 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 510 510 PS_ASSERT_PTR_NON_NULL(peaks, NULL); 511 511 … … 525 525 } 526 526 527 psTrace( __func__, 3, "---- %s() end ----\n", __func__);527 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 528 528 return(peaks); 529 529 } … … 537 537 const psRegion valid) 538 538 { 539 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);539 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 540 540 PS_ASSERT_PTR_NON_NULL(peaks, NULL); 541 541 … … 553 553 psArrayAdd (output, 200, tmpPeak); 554 554 } 555 psTrace( __func__, 3, "---- %s() end ----\n", __func__);555 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 556 556 return(output); 557 557 } -
trunk/psModules/src/objects/pmSource.c
r7631 r8246 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 6-22 20:04:13$8 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-09 02:37:08 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 27 27 static void sourceFree(pmSource *tmp) 28 28 { 29 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);29 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 30 30 psFree(tmp->peak); 31 31 psFree(tmp->pixels); … … 36 36 psFree(tmp->modelEXT); 37 37 psFree(tmp->blends); 38 psTrace( __func__, 4, "---- %s() end ----\n", __func__);38 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 39 39 } 40 40 … … 61 61 pmSource *pmSourceAlloc() 62 62 { 63 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);63 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 64 64 static int id = 1; 65 65 pmSource *tmp = (pmSource *) psAlloc(sizeof(pmSource)); … … 83 83 tmp->pixWeight = 0.0; 84 84 85 psTrace( __func__, 3, "---- %s() end ----\n", __func__);85 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 86 86 return(tmp); 87 87 } … … 163 163 pmPSFClump pmSourcePSFClump(psArray *sources, psMetadata *metadata) 164 164 { 165 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);165 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 166 166 167 167 # define NPIX 10 … … 328 328 } 329 329 330 psTrace( __func__, 3, "---- %s() end ----\n", __func__);330 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 331 331 return (psfClump); 332 332 } … … 345 345 bool pmSourceRoughClass(psArray *sources, psMetadata *metadata, pmPSFClump clump) 346 346 { 347 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);347 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 348 348 349 349 psBool rc = true; … … 455 455 psTrace (".pmObjects.pmSourceRoughClass", 2, "Ncr: %3d\n", Ncr); 456 456 457 psTrace( __func__, 3, "---- %s(%d) end ----\n", __func__, rc);457 psTrace("psModules.objects", 3, "---- %s(%d) end ----\n", __func__, rc); 458 458 return(rc); 459 459 } … … 481 481 psF32 radius) 482 482 { 483 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);483 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 484 484 PS_ASSERT_PTR_NON_NULL(source, false); 485 485 PS_ASSERT_PTR_NON_NULL(source->peak, false); … … 588 588 if ((numPixels < 0.75*R2) || (Sum <= 0)) { 589 589 psTrace (".psModules.pmSourceMoments", 3, "no valid pixels for source\n"); 590 psTrace( __func__, 3, "---- %s(false) end ----\n", __func__);590 psTrace("psModules.objects", 3, "---- %s(false) end ----\n", __func__); 591 591 return (false); 592 592 } … … 607 607 "large centroid swing; invalid peak %d, %d\n", 608 608 source->peak->x, source->peak->y); 609 psTrace( __func__, 3, "---- %s(false) end ----\n", __func__);609 psTrace("psModules.objects", 3, "---- %s(false) end ----\n", __func__); 610 610 return (false); 611 611 } … … 630 630 source->moments->Sx, source->moments->Sy, source->moments->Sxy); 631 631 632 psTrace( __func__, 3, "---- %s(true) end ----\n", __func__);632 psTrace("psModules.objects", 3, "---- %s(true) end ----\n", __func__); 633 633 return(true); 634 634 } -
trunk/psModules/src/objects/pmSourceContour.c
r6943 r8246 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 4-21 21:27:04$8 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-09 02:37:08 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 49 49 { 50 50 51 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);51 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 52 52 53 53 // We define variables incr and lastColumn so that we can use the same loop … … 70 70 float value = image->data.F32[y][subCol]; 71 71 if (value <= threshold) { 72 psTrace( __func__, 4, "---- %s() end ----\n", __func__);72 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 73 73 return (subCol); 74 74 } 75 75 subCol += incr; 76 76 } 77 psTrace( __func__, 4, "---- %s() end ----\n", __func__);77 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 78 78 return (lastColumn); 79 79 } … … 89 89 { 90 90 91 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);91 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 92 92 93 93 // We define variables incr and lastColumn so that we can use the same loop … … 109 109 float value = image->data.F32[y][subCol]; 110 110 if (value >= threshold) { 111 psTrace( __func__, 4, "---- %s() end ----\n", __func__);111 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 112 112 if (subCol == x) { 113 113 return (subCol); … … 117 117 subCol += incr; 118 118 } 119 psTrace( __func__, 4, "---- %s() end ----\n", __func__);119 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 120 120 return (lastColumn); 121 121 } … … 139 139 psU32 dir) 140 140 { 141 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);141 psTrace("psModules.objects", 4, "---- %s() begin ----\n", __func__); 142 142 // 143 143 // Convert coords to subImage space. … … 149 149 if (!((0 <= subCol) && (subCol < source->pixels->numCols))) { 150 150 psError(PS_ERR_UNKNOWN, true, "Starting column outside subImage range"); 151 psTrace( __func__, 4, "---- %s(NAN) end ----\n", __func__);151 psTrace("psModules.objects", 4, "---- %s(NAN) end ----\n", __func__); 152 152 return(NAN); 153 153 } 154 154 if (!((0 <= subRow) && (subRow < source->pixels->numRows))) { 155 psTrace( __func__, 4, "---- %s(NAN) end ----\n", __func__);155 psTrace("psModules.objects", 4, "---- %s(NAN) end ----\n", __func__); 156 156 psError(PS_ERR_UNKNOWN, true, "Starting row outside subImage range"); 157 157 return(NAN); … … 162 162 psF32 oldValue = pmModelEval(source->modelEXT, source->pixels, subCol, subRow); 163 163 if (oldValue == level) { 164 psTrace( __func__, 4, "---- %s() end ----\n", __func__);164 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 165 165 return(((psF32) (subCol + source->pixels->col0))); 166 166 } … … 184 184 psF32 newValue = pmModelEval(source->modelEXT, source->pixels, subCol, subRow); 185 185 if (oldValue == level) { 186 psTrace( __func__, 4, "---- %s() end ----\n", __func__);186 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 187 187 return((psF32) (subCol + source->pixels->col0)); 188 188 } … … 190 190 if ((newValue <= level) && (level <= oldValue)) { 191 191 // This is simple linear interpolation. 192 psTrace( __func__, 4, "---- %s() end ----\n", __func__);192 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 193 193 return( ((psF32) (subCol + source->pixels->col0)) + ((psF32) incr) * ((level - newValue) / (oldValue - newValue)) ); 194 194 } … … 196 196 if ((oldValue <= level) && (level <= newValue)) { 197 197 // This is simple linear interpolation. 198 psTrace( __func__, 4, "---- %s() end ----\n", __func__);198 psTrace("psModules.objects", 4, "---- %s() end ----\n", __func__); 199 199 return( ((psF32) (subCol + source->pixels->col0)) + ((psF32) incr) * ((level - oldValue) / (newValue - oldValue)) ); 200 200 } … … 203 203 } 204 204 205 psTrace( __func__, 4, "---- %s(NAN) end ----\n", __func__);205 psTrace("psModules.objects", 4, "---- %s(NAN) end ----\n", __func__); 206 206 return(NAN); 207 207 } … … 215 215 int xR, yR, x0, x1, x0s, x1s; 216 216 217 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);217 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 218 218 PS_ASSERT_PTR_NON_NULL(image, false); 219 219 … … 327 327 tmpArray->data[0] = (psPtr *) xVec; 328 328 tmpArray->data[1] = (psPtr *) yVec; 329 psTrace( __func__, 3, "---- %s() end ----\n", __func__);329 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 330 330 return(tmpArray); 331 331 } … … 348 348 psF32 level) 349 349 { 350 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);350 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 351 351 PS_ASSERT_PTR_NON_NULL(source, false); 352 352 PS_ASSERT_PTR_NON_NULL(image, false); … … 379 379 psFree(xVec); 380 380 psFree(yVec); 381 psTrace( __func__, 3, "---- %s(NULL) end ----\n", __func__);381 psTrace("psModules.objects", 3, "---- %s(NULL) end ----\n", __func__); 382 382 return(NULL); 383 383 //psLogMsg(__func__, PS_LOG_WARN, "WARNING: Could not find contour edge (NAN)\n"); … … 392 392 psFree(xVec); 393 393 psFree(yVec); 394 psTrace( __func__, 3, "---- %s(NULL) end ----\n", __func__);394 psTrace("psModules.objects", 3, "---- %s(NULL) end ----\n", __func__); 395 395 return(NULL); 396 396 //psLogMsg(__func__, PS_LOG_WARN, "WARNING: Could not find contour edge (NAN)\n"); 397 397 } 398 psTrace( __func__, 4, "The intercepts are (%.2f, %.2f)\n", leftIntercept, rightIntercept);398 psTrace("psModules.objects", 4, "The intercepts are (%.2f, %.2f)\n", leftIntercept, rightIntercept); 399 399 xVec->data.F32[row+xVec->n] = ((psF32) source->pixels->col0) + rightIntercept; 400 400 … … 417 417 psFree(xVec); 418 418 psFree(yVec); 419 psTrace( __func__, 3, "---- %s(NULL) end ----\n", __func__);419 psTrace("psModules.objects", 3, "---- %s(NULL) end ----\n", __func__); 420 420 return(NULL); 421 421 //psLogMsg(__func__, PS_LOG_WARN, "WARNING: Could not find contour edge (NAN)\n"); … … 429 429 psFree(xVec); 430 430 psFree(yVec); 431 psTrace( __func__, 3, "---- %s(NULL) end ----\n", __func__);431 psTrace("psModules.objects", 3, "---- %s(NULL) end ----\n", __func__); 432 432 return(NULL); 433 433 //psLogMsg(__func__, PS_LOG_WARN, "WARNING: Could not find contour edge (NAN)\n"); … … 447 447 tmpArray->data[0] = (psPtr *) yVec; 448 448 tmpArray->data[1] = (psPtr *) xVec; 449 psTrace( __func__, 3, "---- %s() end ----\n", __func__);449 psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__); 450 450 return(tmpArray); 451 451 } -
trunk/psModules/src/objects/pmSourceFitModel.c
r7604 r8246 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 6-21 03:21:16$8 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-09 02:37:08 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 47 47 pmSourceFitMode mode) 48 48 { 49 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);49 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 50 50 PS_ASSERT_PTR_NON_NULL(source, false); 51 51 PS_ASSERT_PTR_NON_NULL(source->moments, false); … … 162 162 if (nPix < nParams + 1) { 163 163 psTrace (".pmObjects.pmSourceFitModel", 4, "insufficient valid pixels\n"); 164 psTrace( __func__, 3, "---- %s(false) end ----\n", __func__);164 psTrace("psModules.objects", 3, "---- %s(false) end ----\n", __func__); 165 165 model->status = PM_MODEL_BADARGS; 166 166 psFree (x); … … 244 244 245 245 rc = (onPic && fitStatus); 246 psTrace( __func__, 3, "---- %s(%d) end ----\n", __func__, rc);246 psTrace("psModules.objects", 3, "---- %s(%d) end ----\n", __func__, rc); 247 247 return(rc); 248 248 } … … 329 329 pmSourceFitMode mode) 330 330 { 331 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);331 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 332 332 PS_ASSERT_PTR_NON_NULL(source, false); 333 333 PS_ASSERT_PTR_NON_NULL(source->moments, false); … … 489 489 if (nPix < nParams + 1) { 490 490 psTrace (__func__, 4, "insufficient valid pixels\n"); 491 psTrace( __func__, 3, "---- %s() end : fail pixels ----\n", __func__);491 psTrace("psModules.objects", 3, "---- %s() end : fail pixels ----\n", __func__); 492 492 model->status = PM_MODEL_BADARGS; 493 493 psFree (x); … … 517 517 if (!fitStatus) { 518 518 // psError(PS_ERR_UNKNOWN, false, "Failed to fit model (%d)\n", nSrc); 519 psTrace( __func__, 4, "Failed to fit model (%d)\n", nSrc);519 psTrace("psModules.objects", 4, "Failed to fit model (%d)\n", nSrc); 520 520 } 521 521 … … 587 587 rc = (onPic && fitStatus); 588 588 psTrace (__func__, 5, "onPic: %d, fitStatus: %d, nIter: %d, chisq: %f, nDof: %d\n", onPic, fitStatus, model->nIter, model->chisq, model->nDOF); 589 psTrace( __func__, 3, "---- %s end : status %d ----\n", __func__, rc);589 psTrace("psModules.objects", 3, "---- %s end : status %d ----\n", __func__, rc); 590 590 return(rc); 591 591 } -
trunk/psModules/src/objects/pmSourceSky.c
r8004 r8246 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-0 7-28 03:21:19$8 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-08-09 02:37:08 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 41 41 psF32 Radius) 42 42 { 43 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);43 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 44 44 PS_ASSERT_PTR_NON_NULL(source, false); 45 45 PS_ASSERT_IMAGE_NON_NULL(source->pixels, false); … … 71 71 72 72 if (isnan(value)) { 73 psTrace( __func__, 3, "---- %s(false) end ----\n", __func__);73 psTrace("psModules.objects", 3, "---- %s(false) end ----\n", __func__); 74 74 return(false); 75 75 } … … 78 78 } 79 79 source->moments->Sky = value; 80 psTrace( __func__, 3, "---- %s(true) end ----\n", __func__);80 psTrace("psModules.objects", 3, "---- %s(true) end ----\n", __func__); 81 81 return (true); 82 82 } … … 88 88 psF32 Radius) 89 89 { 90 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);90 psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__); 91 91 PS_ASSERT_PTR_NON_NULL(source, false); 92 92 PS_ASSERT_IMAGE_NON_NULL(source->weight, false); … … 118 118 119 119 if (isnan(value)) { 120 psTrace( __func__, 3, "---- %s(false) end ----\n", __func__);120 psTrace("psModules.objects", 3, "---- %s(false) end ----\n", __func__); 121 121 return(false); 122 122 } … … 125 125 } 126 126 source->moments->dSky = value; 127 psTrace( __func__, 3, "---- %s(true) end ----\n", __func__);127 psTrace("psModules.objects", 3, "---- %s(true) end ----\n", __func__); 128 128 return (true); 129 129 }
Note:
See TracChangeset
for help on using the changeset viewer.
