Changeset 21183 for trunk/psModules/src/camera
- Timestamp:
- Jan 26, 2009, 8:40:07 PM (17 years ago)
- Location:
- trunk/psModules/src/camera
- Files:
-
- 13 edited
-
pmCellSquish.c (modified) (3 diffs)
-
pmCellSquish.h (modified) (1 diff)
-
pmFPABin.c (modified) (2 diffs)
-
pmFPABin.h (modified) (1 diff)
-
pmFPAMaskWeight.c (modified) (23 diffs)
-
pmFPAMaskWeight.h (modified) (11 diffs)
-
pmFPAMosaic.c (modified) (7 diffs)
-
pmFPAMosaic.h (modified) (3 diffs)
-
pmFPARead.c (modified) (1 diff)
-
pmFPA_JPEG.c (modified) (2 diffs)
-
pmHDU.c (modified) (3 diffs)
-
pmReadoutStack.c (modified) (4 diffs)
-
pmReadoutStack.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmCellSquish.c
r12696 r21183 12 12 13 13 14 bool pmCellSquish(pmCell *cell, ps MaskType maskVal, bool useShifts)14 bool pmCellSquish(pmCell *cell, psImageMaskType maskVal, bool useShifts) 15 15 { 16 16 PS_ASSERT_PTR_NON_NULL(cell, false); … … 116 116 psImage *squishImage = psImageAlloc(numCols, numRows, PS_TYPE_F32); // Squished image 117 117 psImageInit(squishImage, 0.0); 118 psImage *squishMask = psImageAlloc(numCols, numRows, PS_TYPE_ MASK); // Squished mask118 psImage *squishMask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK); // Squished mask 119 119 psImageInit(squishMask, 0); 120 120 … … 159 159 squishImage->data.F32[ySquish][xSquish] += image->data.F32[y][x]; 160 160 if (mask) { 161 squishMask->data.PS_TYPE_ MASK_DATA[ySquish][xSquish] |= mask->data.U8[y][x] & maskVal;161 squishMask->data.PS_TYPE_IMAGE_MASK_DATA[ySquish][xSquish] |= mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal; 162 162 } 163 163 } -
trunk/psModules/src/camera/pmCellSquish.h
r12696 r21183 7 7 /// already have been read) and masks. 8 8 bool pmCellSquish(pmCell *cell, ///< Cell to have readouts combined 9 ps MaskType maskVal, ///< Value to be masked9 psImageMaskType maskVal, ///< Value to be masked 10 10 bool useShifts ///< Use the shifts when squishing? 11 11 ); -
trunk/psModules/src/camera/pmFPABin.c
r20442 r21183 9 9 #include "pmFPABin.h" 10 10 11 bool pmReadoutRebin(pmReadout *out, const pmReadout *in, ps MaskType maskVal, int xBin, int yBin)11 bool pmReadoutRebin(pmReadout *out, const pmReadout *in, psImageMaskType maskVal, int xBin, int yBin) 12 12 { 13 13 PM_ASSERT_READOUT_NON_NULL(out, false); … … 50 50 for (int y = yStart; y < yStop; y++) { 51 51 for (int x = xStart; x < xStop; x++) { 52 if (inMask && (inMask->data.PS_TYPE_ MASK_DATA[y][x] & maskVal)) {52 if (inMask && (inMask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal)) { 53 53 continue; 54 54 } -
trunk/psModules/src/camera/pmFPABin.h
r19695 r21183 9 9 bool pmReadoutRebin(pmReadout *out, ///< Output readout 10 10 const pmReadout *in,///< Input readout 11 ps MaskType maskVal, ///< Value to mask11 psImageMaskType maskVal, ///< Value to mask 12 12 int xBin, int yBin ///< Binning factors in x and y 13 13 ); -
trunk/psModules/src/camera/pmFPAMaskWeight.c
r20749 r21183 42 42 continue; 43 43 } 44 masks->data[i] = psImageAlloc(image->numCols, image->numRows, PS_TYPE_ U8);44 masks->data[i] = psImageAlloc(image->numCols, image->numRows, PS_TYPE_IMAGE_MASK); 45 45 psImageInit(masks->data[i], 0); 46 46 } … … 98 98 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 99 99 100 bool pmReadoutSetMask(pmReadout *readout, ps MaskType satMask, psMaskType badMask)100 bool pmReadoutSetMask(pmReadout *readout, psImageMaskType satMask, psImageMaskType badMask) 101 101 { 102 102 PS_ASSERT_PTR_NON_NULL(readout, false); … … 124 124 if (!readout->mask) { 125 125 // Generate a (throwaway) mask image, if required 126 readout->mask = psImageAlloc(image->numCols, image->numRows, PS_TYPE_ U8);126 readout->mask = psImageAlloc(image->numCols, image->numRows, PS_TYPE_IMAGE_MASK); 127 127 } 128 128 psImage *mask = readout->mask; // The mask pixels … … 131 131 // Dereference pointers for speed 132 132 psF32 **imageData = image->data.F32;// The image 133 ps U8 **maskData = mask->data.U8; // The mask133 psImageMaskType **maskData = mask->data.PS_TYPE_IMAGE_MASK_DATA; // The mask 134 134 135 135 for (int i = 0; i < image->numRows; i++) { … … 153 153 // pixels. currently, it will set mask bits if (value <= BAD) or (value >= SATURATION) 154 154 // should we optionally ignore these tests? 155 bool pmReadoutGenerateMask(pmReadout *readout, ps MaskType satMask, psMaskType badMask)155 bool pmReadoutGenerateMask(pmReadout *readout, psImageMaskType satMask, psImageMaskType badMask) 156 156 { 157 157 PS_ASSERT_PTR_NON_NULL(readout, false); … … 294 294 } 295 295 296 bool pmReadoutGenerateMaskWeight(pmReadout *readout, ps MaskType satMask, psMaskType badMask, bool poisson)296 bool pmReadoutGenerateMaskWeight(pmReadout *readout, psImageMaskType satMask, psImageMaskType badMask, bool poisson) 297 297 { 298 298 PS_ASSERT_PTR_NON_NULL(readout, false); … … 306 306 } 307 307 308 bool pmCellGenerateMaskWeight(pmCell *cell, ps MaskType satMask, psMaskType badMask, bool poisson)308 bool pmCellGenerateMaskWeight(pmCell *cell, psImageMaskType satMask, psImageMaskType badMask, bool poisson) 309 309 { 310 310 PS_ASSERT_PTR_NON_NULL(cell, false); … … 321 321 322 322 323 bool pmReadoutWeightRenormPixels(const pmReadout *readout, ps MaskType maskVal,323 bool pmReadoutWeightRenormPixels(const pmReadout *readout, psImageMaskType maskVal, 324 324 psStatsOptions meanStat, psStatsOptions stdevStat, psRandom *rng) 325 325 { … … 363 363 364 364 365 bool pmReadoutWeightRenormPhot(const pmReadout *readout, ps MaskType maskVal, int num, float width,365 bool pmReadoutWeightRenormPhot(const pmReadout *readout, psImageMaskType maskVal, int num, float width, 366 366 psStatsOptions meanStat, psStatsOptions stdevStat, psRandom *rng) 367 367 { … … 411 411 psVector *source = psVectorAlloc(num, PS_TYPE_F32); // Measurements of fake sources 412 412 psVector *guess = psVectorAlloc(num, PS_TYPE_F32); // Guess at significance 413 psVector *photMask = psVectorAlloc(num, PS_TYPE_ MASK); // Mask for fluxes413 psVector *photMask = psVectorAlloc(num, PS_TYPE_VECTOR_MASK); // Mask for fluxes 414 414 for (int i = 0; i < num; i++) { 415 415 // Coordinates of interest … … 433 433 float yGauss = gauss->data.F32[v]; // Value of Gaussian in y 434 434 for (int u = 0, x = xPix - size; u < fullSize; u++, x++) { 435 if (mask && mask->data.PS_TYPE_ MASK_DATA[y][x] & maskVal) {435 if (mask && mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal) { 436 436 continue; 437 437 } … … 453 453 } 454 454 455 photMask->data.PS_TYPE_ MASK_DATA[i] = ((isfinite(sumNoise) && isfinite(sumSource) &&455 photMask->data.PS_TYPE_VECTOR_MASK_DATA[i] = ((isfinite(sumNoise) && isfinite(sumSource) && 456 456 isfinite(sumWeight) && sumGauss > 0 && sumGauss2 > 0) ? 457 457 0 : 0xFF); … … 493 493 ratio->data.F32[i] = measuredSig / guess->data.F32[i]; 494 494 if (guess->data.F32[i] <= 0.0 || source->data.F32[i] <= 0.0 || !isfinite(ratio->data.F32[i])) { 495 photMask->data.PS_TYPE_ MASK_DATA[i] = 0xFF;495 photMask->data.PS_TYPE_VECTOR_MASK_DATA[i] = 0xFF; 496 496 } 497 497 psTrace("psModules.camera", 9, "Ratio %d: %f, %f, %f\n", … … 523 523 524 524 525 bool pmReadoutWeightRenorm(const pmReadout *readout, ps MaskType maskVal, psStatsOptions meanStat,525 bool pmReadoutWeightRenorm(const pmReadout *readout, psImageMaskType maskVal, psStatsOptions meanStat, 526 526 psStatsOptions stdevStat, int width, psRandom *rng) 527 527 { … … 591 591 592 592 593 bool pmReadoutMaskNonfinite(pmReadout *readout, ps MaskType maskVal)593 bool pmReadoutMaskNonfinite(pmReadout *readout, psImageMaskType maskVal) 594 594 { 595 595 PM_ASSERT_READOUT_NON_NULL(readout, false); … … 601 601 602 602 if (!readout->mask) { 603 readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_ MASK);603 readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK); 604 604 } 605 605 psImage *mask = readout->mask; // Readout's mask … … 608 608 for (int x = 0; x < numCols; x++) { 609 609 if (!isfinite(image->data.F32[y][x]) || (weight && !isfinite(weight->data.F32[y][x]))) { 610 mask->data.PS_TYPE_ MASK_DATA[y][x] |= maskVal;610 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= maskVal; 611 611 } 612 612 } … … 618 618 619 619 620 bool pmReadoutMaskApply(pmReadout *readout, ps MaskType maskVal)620 bool pmReadoutMaskApply(pmReadout *readout, psImageMaskType maskVal) 621 621 { 622 622 PM_ASSERT_READOUT_NON_NULL(readout, false); … … 625 625 626 626 int numCols = readout->image->numCols, numRows = readout->image->numRows; // Size of image 627 ps MaskType **maskData = readout->mask->data.PS_TYPE_MASK_DATA; // Dereference mask627 psImageMaskType **maskData = readout->mask->data.PS_TYPE_IMAGE_MASK_DATA; // Dereference mask 628 628 psF32 **imageData = readout->image->data.F32;// Dereference image 629 629 psF32 **weightData = readout->weight ? readout->weight->data.F32 : NULL; // Dereference weight map … … 644 644 645 645 646 bool pmReadoutInterpolateBadPixels(pmReadout *readout, ps MaskType maskVal, psImageInterpolateMode mode,647 float poorFrac, ps MaskType maskPoor, psMaskType maskBad)646 bool pmReadoutInterpolateBadPixels(pmReadout *readout, psImageMaskType maskVal, psImageInterpolateMode mode, 647 float poorFrac, psImageMaskType maskPoor, psImageMaskType maskBad) 648 648 { 649 649 PM_ASSERT_READOUT_NON_NULL(readout, false); … … 667 667 psVector *imagePix = psVectorAllocEmpty(PIXELS_BUFFER, PS_TYPE_F32); // Corresponding values for image 668 668 psVector *weightPix = psVectorAllocEmpty(PIXELS_BUFFER, PS_TYPE_F32); // Corresponding values for weight 669 psVector *maskPix = psVectorAllocEmpty(PIXELS_BUFFER, PS_TYPE_MASK); // Corresponding values for mask 669 psVector *maskPix = psVectorAllocEmpty(PIXELS_BUFFER, PS_TYPE_IMAGE_MASK); // Corresponding values for mask 670 // NOTE: maskPix carries the actual image mask values -- do NOT use 671 // PS_TYPE_VECTOR_MASK here; it is storage, and is not treated as a vector mask 670 672 671 673 long numBad = 0; // Number of bad pixels interpolated 672 674 for (int y = 0; y < numRows; y++) { 673 675 for (int x = 0; x < numCols; x++) { 674 if (mask->data.PS_TYPE_ MASK_DATA[y][x] & maskVal) {676 if (mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal) { 675 677 double imageValue, weightValue; // Image and weight value from interpolation 676 psMaskType maskValue = 0; // Mask value from interpolation 677 psImageInterpolateStatus status = psImageInterpolate(&imageValue, &weightValue, &maskValue, 678 x, y, interp); 678 psImageMaskType maskValue = 0; // Mask value from interpolation 679 psImageInterpolateStatus status = psImageInterpolate(&imageValue, &weightValue, &maskValue, x, y, interp); 679 680 if (status == PS_INTERPOLATE_STATUS_ERROR || status == PS_INTERPOLATE_STATUS_OFF) { 680 681 psError(PS_ERR_UNKNOWN, false, "Unable to interpolate readout at %d,%d", x, y); … … 697 698 imagePix->data.F32[numBad] = imageValue; 698 699 weightPix->data.F32[numBad] = weightValue; 699 maskPix->data.PS_TYPE_ MASK_DATA[numBad] = maskValue;700 maskPix->data.PS_TYPE_IMAGE_MASK_DATA[numBad] = maskValue; 700 701 numBad++; 701 702 } … … 709 710 image->data.F32[y][x] = imagePix->data.F32[i]; 710 711 weight->data.F32[y][x] = weightPix->data.F32[i]; 711 mask->data.PS_TYPE_ MASK_DATA[y][x] = maskPix->data.PS_TYPE_MASK_DATA[i];712 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = maskPix->data.PS_TYPE_IMAGE_MASK_DATA[i]; 712 713 } 713 714 -
trunk/psModules/src/camera/pmFPAMaskWeight.h
r20486 r21183 5 5 * @author Eugene Magnier, IfA 6 6 * 7 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $8 * @date $Date: 200 8-10-31 21:50:16$7 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2009-01-27 06:39:38 $ 9 9 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 10 10 */ … … 42 42 /// iterating using pmReadoutReadNext, in which case the HDU can't be generated. 43 43 bool pmReadoutSetMask(pmReadout *readout, ///< Readout for which to set mask 44 ps MaskType satMask, ///< Mask value to give saturated pixels45 ps MaskType badMask ///< Mask value to give bad (low) pixels44 psImageMaskType satMask, ///< Mask value to give saturated pixels 45 psImageMaskType badMask ///< Mask value to give bad (low) pixels 46 46 ); 47 47 … … 62 62 /// is suitable for output (complete with HDU entry). This is intended for most operations. 63 63 bool pmReadoutGenerateMask(pmReadout *readout, ///< Readout for which to generate mask 64 ps MaskType sat, ///< Mask value to give saturated pixels65 ps MaskType bad ///< Mask value to give bad (low) pixels64 psImageMaskType sat, ///< Mask value to give saturated pixels 65 psImageMaskType bad ///< Mask value to give bad (low) pixels 66 66 ); 67 67 … … 79 79 /// Calls pmReadoutGenerateMask and pmReadoutGenerateWeight for the readout 80 80 bool pmReadoutGenerateMaskWeight(pmReadout *readout, ///< Readout for which to generate mask and weights 81 ps MaskType sat, ///< Mask value to give saturated pixels82 ps MaskType bad, ///< Mask value to give bad (low) pixels81 psImageMaskType sat, ///< Mask value to give saturated pixels 82 psImageMaskType bad, ///< Mask value to give bad (low) pixels 83 83 bool poisson ///< Use poisson weights (in addition to read noise)? 84 84 ); … … 88 88 /// Calls pmReadoutGenerateMaskWeight for each readout within the cell. 89 89 bool pmCellGenerateMaskWeight(pmCell *cell, ///< Cell for which to generate mask and weights 90 ps MaskType sat, ///< Mask value to give saturated pixels91 ps MaskType bad, ///< Mask value to give bad (low) pixels90 psImageMaskType sat, ///< Mask value to give saturated pixels 91 psImageMaskType bad, ///< Mask value to give bad (low) pixels 92 92 bool poisson ///< Use poisson weights (in addition to read noise)? 93 93 ); … … 98 98 bool pmReadoutWeightRenormPixels( 99 99 const pmReadout *readout, ///< Readout to normalise 100 ps MaskType maskVal, ///< Value to mask100 psImageMaskType maskVal, ///< Value to mask 101 101 psStatsOptions meanStat, ///< Statistic to measure the mean (of the variance map) 102 102 psStatsOptions stdevStat, ///< Statistic to measure the stdev (of the image) … … 110 110 bool pmReadoutWeightRenormPhot( 111 111 const pmReadout *readout, ///< Readout to normalise 112 ps MaskType maskVal, ///< Value to mask112 psImageMaskType maskVal, ///< Value to mask 113 113 int num, ///< Number of instances to measure over the image 114 114 float width, ///< Photometry width … … 123 123 /// that patch corresponds. 124 124 bool pmReadoutWeightRenorm(const pmReadout *readout, // Readout to normalise 125 ps MaskType maskVal, // Value to mask125 psImageMaskType maskVal, // Value to mask 126 126 psStatsOptions meanStat, // Statistic to measure the mean (of the variance map) 127 127 psStatsOptions stdevStat, // Statistic to measure the stdev (of the image) … … 136 136 /// the provided value. 137 137 bool pmReadoutMaskNonfinite(pmReadout *readout, ///< Readout to mask 138 ps MaskType maskVal ///< Mask value to give non-finite pixels138 psImageMaskType maskVal ///< Mask value to give non-finite pixels 139 139 ); 140 140 … … 145 145 /// sets masked areas to NAN in the image and weight. 146 146 bool pmReadoutMaskApply(pmReadout *readout, ///< Readout to mask 147 ps MaskType maskVal ///< Mask value for which to apply mask147 psImageMaskType maskVal ///< Mask value for which to apply mask 148 148 ); 149 149 … … 152 152 /// Scan the mask image for bad pixels, and interpolate over them using the nominated options 153 153 bool pmReadoutInterpolateBadPixels(pmReadout *readout, ///< Readout to work on 154 ps MaskType maskVal, ///< Value to mask154 psImageMaskType maskVal, ///< Value to mask 155 155 psImageInterpolateMode mode, ///< Interpolation mode 156 156 float poorFrac, ///< Maximum bad fraction of kernel for "poor" status 157 ps MaskType maskPoor, ///< Mask value to give poor pixels158 ps MaskType maskBad ///< Mask value to give bad pixels157 psImageMaskType maskPoor, ///< Mask value to give poor pixels 158 psImageMaskType maskBad ///< Mask value to give bad pixels 159 159 ); 160 160 -
trunk/psModules/src/camera/pmFPAMosaic.c
r19073 r21183 471 471 numImages++; 472 472 473 // Only implemented for F32 and U8 images so far.474 assert(image->type.type == PS_TYPE_F32 || image->type.type == PS_TYPE_U8);475 473 // All input types must be the same 476 474 if (type == 0) { … … 537 535 if (xBinSource->data.S32[i] == xBinTarget && yBinSource->data.S32[i] == yBinTarget) { 538 536 switch (type) { 537 COPY_WITH_PARITY_DIFFERENCE(U8); 538 COPY_WITH_PARITY_DIFFERENCE(U16); 539 COPY_WITH_PARITY_DIFFERENCE(U32); 540 COPY_WITH_PARITY_DIFFERENCE(U64); 541 COPY_WITH_PARITY_DIFFERENCE(S8); 542 COPY_WITH_PARITY_DIFFERENCE(S16); 543 COPY_WITH_PARITY_DIFFERENCE(S32); 544 COPY_WITH_PARITY_DIFFERENCE(S64); 539 545 COPY_WITH_PARITY_DIFFERENCE(F32); 540 COPY_WITH_PARITY_DIFFERENCE( U8);546 COPY_WITH_PARITY_DIFFERENCE(F64); 541 547 default: 542 548 psAbort("Should never get here.\n"); … … 548 554 // We have to do all of the hard work ourselves 549 555 switch (type) { 550 FILL_IN(F32); 551 FILL_IN(U8); 556 FILL_IN(U8); 557 FILL_IN(U16); 558 FILL_IN(U32); 559 FILL_IN(U64); 560 FILL_IN(S8); 561 FILL_IN(S16); 562 FILL_IN(S32); 563 FILL_IN(S64); 564 FILL_IN(F32); 565 FILL_IN(F64); 552 566 default: 553 567 psAbort("Should never get here.\n"); … … 730 744 const pmChip *chip, // Chip to mosaic 731 745 const pmCell *targetCell, // Cell to which to mosaic 732 ps MaskType blank // Mask value to give blank pixels746 psImageMaskType blank // Mask value to give blank pixels 733 747 ) 734 748 { … … 838 852 const pmChip *targetChip, // Chip to which to mosaic 839 853 const pmCell *targetCell, // Cell to which to mosaic 840 ps MaskType blank // Mask value to give blank pixels854 psImageMaskType blank // Mask value to give blank pixels 841 855 ) 842 856 { … … 994 1008 // the mosaic image. 995 1009 996 bool pmChipMosaic(pmChip *target, const pmChip *source, bool deepCopy, ps MaskType blank)1010 bool pmChipMosaic(pmChip *target, const pmChip *source, bool deepCopy, psImageMaskType blank) 997 1011 { 998 1012 // Target exists, and has only a single cell … … 1225 1239 1226 1240 1227 bool pmFPAMosaic(pmFPA *target, const pmFPA *source, bool deepCopy, ps MaskType blank)1241 bool pmFPAMosaic(pmFPA *target, const pmFPA *source, bool deepCopy, psImageMaskType blank) 1228 1242 { 1229 1243 // Target exists, and has only a single chip with single cell -
trunk/psModules/src/camera/pmFPAMosaic.h
r13898 r21183 4 4 * @author Paul Price, IfA 5 5 * 6 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $7 * @date $Date: 200 7-06-20 02:22:26$6 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2009-01-27 06:39:38 $ 8 8 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 9 9 */ … … 24 24 const pmChip *source, ///< Source chip whose cells will be mosaicked 25 25 bool deepCopy, ///< Require a deep copy (disregard 'nice' chip) 26 ps MaskType blank ///< Mask value to give blank pixels26 psImageMaskType blank ///< Mask value to give blank pixels 27 27 ); 28 28 … … 36 36 const pmFPA *source, ///< FPA whose chips and cells will be mosaicked 37 37 bool deepCopy, ///< Require a deep copy (disregard 'nice' chip) 38 ps MaskType blank ///< Mask value to give blank pixels38 psImageMaskType blank ///< Mask value to give blank pixels 39 39 ); 40 40 /// @} -
trunk/psModules/src/camera/pmFPARead.c
r19246 r21183 35 35 static psElemType pixelTypes[] = { 36 36 PS_TYPE_F32, 37 PS_TYPE_ MASK,37 PS_TYPE_IMAGE_MASK, 38 38 PS_TYPE_F32, 39 39 0 -
trunk/psModules/src/camera/pmFPA_JPEG.c
r19653 r21183 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1.2 6$ $Name: not supported by cvs2svn $8 * @date $Date: 200 8-09-23 02:00:36$7 * @version $Revision: 1.27 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2009-01-27 06:39:38 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 157 157 psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN); 158 158 stats->nSubsample = 10000; 159 ps MaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask159 psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask 160 160 float mean = 0, delta = 0; // 161 161 if (!psImageBackground(stats, NULL, readout->image, readout->mask, maskVal, rng)) { -
trunk/psModules/src/camera/pmHDU.c
r19385 r21183 167 167 const psArray *images, // Images to write 168 168 const psArray *masks, // Masks to use when writing 169 ps MaskType maskVal,// Value to mask169 psImageMaskType maskVal,// Value to mask 170 170 psFits *fits // FITS file to which to write 171 171 ) … … 222 222 PS_ASSERT_PTR_NON_NULL(fits, false); 223 223 224 ps MaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask224 psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask 225 225 return hduWrite(hdu, hdu->images, hdu->masks, maskVal, fits); 226 226 } … … 240 240 PS_ASSERT_PTR_NON_NULL(fits, false); 241 241 242 ps MaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask242 psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask 243 243 return hduWrite(hdu, hdu->weights, hdu->masks, maskVal, fits); 244 244 } -
trunk/psModules/src/camera/pmReadoutStack.c
r18830 r21183 78 78 79 79 // XXX for the moment, use col0, row0, numCols, numRows supplied from the outside 80 bool pmReadoutStackDefineOutput(pmReadout *readout, int col0, int row0, int numCols, int numRows, bool mask, bool weight, ps MaskType blank)80 bool pmReadoutStackDefineOutput(pmReadout *readout, int col0, int row0, int numCols, int numRows, bool mask, bool weight, psImageMaskType blank) 81 81 { 82 82 PS_ASSERT_PTR_NON_NULL(readout, false); … … 94 94 // XXX is this an error? 95 95 if (readout->mask) return false; 96 readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_ MASK);96 readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK); 97 97 psImageInit(readout->mask, blank); 98 98 } … … 163 163 bool pmReadoutUpdateSize(pmReadout *readout, int minCols, int minRows, 164 164 int numCols, int numRows, bool mask, bool weight, 165 ps MaskType blank)165 psImageMaskType blank) 166 166 { 167 167 PS_ASSERT_PTR_NON_NULL(readout, false); … … 191 191 if (mask) { 192 192 if (!readout->mask) { 193 readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_ MASK);193 readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK); 194 194 psImageInit(readout->mask, blank); 195 195 } 196 196 if (readout->mask->numCols < numCols || readout->mask->numRows < numRows) { 197 psImage *newMask = psImageAlloc(numCols, numRows, PS_TYPE_ MASK);197 psImage *newMask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK); 198 198 psImageInit(newMask, blank); 199 199 psImageOverlaySection(newMask, readout->mask, readout->col0, readout->row0, "="); -
trunk/psModules/src/camera/pmReadoutStack.h
r18830 r21183 14 14 bool mask, ///< Worry about the mask? 15 15 bool weight, ///< Worry about the weight? 16 ps MaskType blank ///< Mask value to give to blank pixels16 psImageMaskType blank ///< Mask value to give to blank pixels 17 17 ); 18 18 … … 47 47 48 48 // XXX for the moment, use col0, row0, numCols, numRows supplied from the outside 49 bool pmReadoutStackDefineOutput(pmReadout *readout, int col0, int row0, int numCols, int numRows, bool mask, bool weight, ps MaskType blank);49 bool pmReadoutStackDefineOutput(pmReadout *readout, int col0, int row0, int numCols, int numRows, bool mask, bool weight, psImageMaskType blank); 50 50 51 51 bool pmReadoutStackSetOutputSize(int *col0, int *row0, int *numCols, int *numRows, const psArray *inputs);
Note:
See TracChangeset
for help on using the changeset viewer.
