IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 26, 2009, 8:40:07 PM (17 years ago)
Author:
eugene
Message:

incorporating changes from 16bit mask upgrades (eam_branch_20081230)

Location:
trunk/psModules/src/camera
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmCellSquish.c

    r12696 r21183  
    1212
    1313
    14 bool pmCellSquish(pmCell *cell, psMaskType maskVal, bool useShifts)
     14bool pmCellSquish(pmCell *cell, psImageMaskType maskVal, bool useShifts)
    1515{
    1616    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    116116    psImage *squishImage = psImageAlloc(numCols, numRows, PS_TYPE_F32); // Squished image
    117117    psImageInit(squishImage, 0.0);
    118     psImage *squishMask = psImageAlloc(numCols, numRows, PS_TYPE_MASK); // Squished mask
     118    psImage *squishMask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK); // Squished mask
    119119    psImageInit(squishMask, 0);
    120120
     
    159159                squishImage->data.F32[ySquish][xSquish] += image->data.F32[y][x];
    160160                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;
    162162                }
    163163            }
  • trunk/psModules/src/camera/pmCellSquish.h

    r12696 r21183  
    77/// already have been read) and masks.
    88bool pmCellSquish(pmCell *cell,         ///< Cell to have readouts combined
    9                   psMaskType maskVal,   ///< Value to be masked
     9                  psImageMaskType maskVal,   ///< Value to be masked
    1010                  bool useShifts        ///< Use the shifts when squishing?
    1111    );
  • trunk/psModules/src/camera/pmFPABin.c

    r20442 r21183  
    99#include "pmFPABin.h"
    1010
    11 bool pmReadoutRebin(pmReadout *out, const pmReadout *in, psMaskType maskVal, int xBin, int yBin)
     11bool pmReadoutRebin(pmReadout *out, const pmReadout *in, psImageMaskType maskVal, int xBin, int yBin)
    1212{
    1313    PM_ASSERT_READOUT_NON_NULL(out, false);
     
    5050            for (int y = yStart; y < yStop; y++) {
    5151                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)) {
    5353                        continue;
    5454                    }
  • trunk/psModules/src/camera/pmFPABin.h

    r19695 r21183  
    99bool pmReadoutRebin(pmReadout *out,     ///< Output readout
    1010                    const pmReadout *in,///< Input readout
    11                     psMaskType maskVal, ///< Value to mask
     11                    psImageMaskType maskVal, ///< Value to mask
    1212                    int xBin, int yBin  ///< Binning factors in x and y
    1313    );
  • trunk/psModules/src/camera/pmFPAMaskWeight.c

    r20749 r21183  
    4242            continue;
    4343        }
    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);
    4545        psImageInit(masks->data[i], 0);
    4646    }
     
    9898//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    9999
    100 bool pmReadoutSetMask(pmReadout *readout, psMaskType satMask, psMaskType badMask)
     100bool pmReadoutSetMask(pmReadout *readout, psImageMaskType satMask, psImageMaskType badMask)
    101101{
    102102    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    124124    if (!readout->mask) {
    125125        // 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);
    127127    }
    128128    psImage *mask = readout->mask;      // The mask pixels
     
    131131    // Dereference pointers for speed
    132132    psF32 **imageData = image->data.F32;// The image
    133     psU8  **maskData  = mask->data.U8;  // The mask
     133    psImageMaskType **maskData = mask->data.PS_TYPE_IMAGE_MASK_DATA;  // The mask
    134134
    135135    for (int i = 0; i < image->numRows; i++) {
     
    153153// pixels.  currently, it will set mask bits if (value <= BAD) or (value >= SATURATION)
    154154// should we optionally ignore these tests?
    155 bool pmReadoutGenerateMask(pmReadout *readout, psMaskType satMask, psMaskType badMask)
     155bool pmReadoutGenerateMask(pmReadout *readout, psImageMaskType satMask, psImageMaskType badMask)
    156156{
    157157    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    294294}
    295295
    296 bool pmReadoutGenerateMaskWeight(pmReadout *readout, psMaskType satMask, psMaskType badMask, bool poisson)
     296bool pmReadoutGenerateMaskWeight(pmReadout *readout, psImageMaskType satMask, psImageMaskType badMask, bool poisson)
    297297{
    298298    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    306306}
    307307
    308 bool pmCellGenerateMaskWeight(pmCell *cell, psMaskType satMask, psMaskType badMask, bool poisson)
     308bool pmCellGenerateMaskWeight(pmCell *cell, psImageMaskType satMask, psImageMaskType badMask, bool poisson)
    309309{
    310310    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    321321
    322322
    323 bool pmReadoutWeightRenormPixels(const pmReadout *readout, psMaskType maskVal,
     323bool pmReadoutWeightRenormPixels(const pmReadout *readout, psImageMaskType maskVal,
    324324                                 psStatsOptions meanStat, psStatsOptions stdevStat, psRandom *rng)
    325325{
     
    363363
    364364
    365 bool pmReadoutWeightRenormPhot(const pmReadout *readout, psMaskType maskVal, int num, float width,
     365bool pmReadoutWeightRenormPhot(const pmReadout *readout, psImageMaskType maskVal, int num, float width,
    366366                               psStatsOptions meanStat, psStatsOptions stdevStat, psRandom *rng)
    367367{
     
    411411    psVector *source = psVectorAlloc(num, PS_TYPE_F32); // Measurements of fake sources
    412412    psVector *guess = psVectorAlloc(num, PS_TYPE_F32); // Guess at significance
    413     psVector *photMask = psVectorAlloc(num, PS_TYPE_MASK); // Mask for fluxes
     413    psVector *photMask = psVectorAlloc(num, PS_TYPE_VECTOR_MASK); // Mask for fluxes
    414414    for (int i = 0; i < num; i++) {
    415415        // Coordinates of interest
     
    433433            float yGauss = gauss->data.F32[v]; // Value of Gaussian in y
    434434            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) {
    436436                    continue;
    437437                }
     
    453453        }
    454454
    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) &&
    456456                                                isfinite(sumWeight) && sumGauss > 0 && sumGauss2 > 0) ?
    457457                                               0 : 0xFF);
     
    493493        ratio->data.F32[i] = measuredSig / guess->data.F32[i];
    494494        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;
    496496        }
    497497        psTrace("psModules.camera", 9, "Ratio %d: %f, %f, %f\n",
     
    523523
    524524
    525 bool pmReadoutWeightRenorm(const pmReadout *readout, psMaskType maskVal, psStatsOptions meanStat,
     525bool pmReadoutWeightRenorm(const pmReadout *readout, psImageMaskType maskVal, psStatsOptions meanStat,
    526526                           psStatsOptions stdevStat, int width, psRandom *rng)
    527527{
     
    591591
    592592
    593 bool pmReadoutMaskNonfinite(pmReadout *readout, psMaskType maskVal)
     593bool pmReadoutMaskNonfinite(pmReadout *readout, psImageMaskType maskVal)
    594594{
    595595    PM_ASSERT_READOUT_NON_NULL(readout, false);
     
    601601
    602602    if (!readout->mask) {
    603         readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
     603        readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK);
    604604    }
    605605    psImage *mask = readout->mask;      // Readout's mask
     
    608608        for (int x = 0; x < numCols; x++) {
    609609            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;
    611611            }
    612612        }
     
    618618
    619619
    620 bool pmReadoutMaskApply(pmReadout *readout, psMaskType maskVal)
     620bool pmReadoutMaskApply(pmReadout *readout, psImageMaskType maskVal)
    621621{
    622622    PM_ASSERT_READOUT_NON_NULL(readout, false);
     
    625625
    626626    int numCols = readout->image->numCols, numRows = readout->image->numRows; // Size of image
    627     psMaskType **maskData = readout->mask->data.PS_TYPE_MASK_DATA; // Dereference mask
     627    psImageMaskType **maskData = readout->mask->data.PS_TYPE_IMAGE_MASK_DATA; // Dereference mask
    628628    psF32 **imageData = readout->image->data.F32;// Dereference image
    629629    psF32 **weightData = readout->weight ? readout->weight->data.F32 : NULL; // Dereference weight map
     
    644644
    645645
    646 bool pmReadoutInterpolateBadPixels(pmReadout *readout, psMaskType maskVal, psImageInterpolateMode mode,
    647                                    float poorFrac, psMaskType maskPoor, psMaskType maskBad)
     646bool pmReadoutInterpolateBadPixels(pmReadout *readout, psImageMaskType maskVal, psImageInterpolateMode mode,
     647                                   float poorFrac, psImageMaskType maskPoor, psImageMaskType maskBad)
    648648{
    649649    PM_ASSERT_READOUT_NON_NULL(readout, false);
     
    667667    psVector *imagePix = psVectorAllocEmpty(PIXELS_BUFFER, PS_TYPE_F32); // Corresponding values for image
    668668    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
    670672
    671673    long numBad = 0;                    // Number of bad pixels interpolated
    672674    for (int y = 0; y < numRows; y++) {
    673675        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) {
    675677                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);
    679680                if (status == PS_INTERPOLATE_STATUS_ERROR || status == PS_INTERPOLATE_STATUS_OFF) {
    680681                    psError(PS_ERR_UNKNOWN, false, "Unable to interpolate readout at %d,%d", x, y);
     
    697698                imagePix->data.F32[numBad] = imageValue;
    698699                weightPix->data.F32[numBad] = weightValue;
    699                 maskPix->data.PS_TYPE_MASK_DATA[numBad] = maskValue;
     700                maskPix->data.PS_TYPE_IMAGE_MASK_DATA[numBad] = maskValue;
    700701                numBad++;
    701702            }
     
    709710        image->data.F32[y][x] = imagePix->data.F32[i];
    710711        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];
    712713    }
    713714
  • trunk/psModules/src/camera/pmFPAMaskWeight.h

    r20486 r21183  
    55 * @author Eugene Magnier, IfA
    66 *
    7  * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    8  * @date $Date: 2008-10-31 21:50:16 $
     7 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     8 * @date $Date: 2009-01-27 06:39:38 $
    99 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    1010 */
     
    4242/// iterating using pmReadoutReadNext, in which case the HDU can't be generated.
    4343bool pmReadoutSetMask(pmReadout *readout, ///< Readout for which to set mask
    44                       psMaskType satMask, ///< Mask value to give saturated pixels
    45                       psMaskType badMask  ///< Mask value to give bad (low) pixels
     44                      psImageMaskType satMask, ///< Mask value to give saturated pixels
     45                      psImageMaskType badMask  ///< Mask value to give bad (low) pixels
    4646    );
    4747
     
    6262/// is suitable for output (complete with HDU entry).  This is intended for most operations.
    6363bool pmReadoutGenerateMask(pmReadout *readout, ///< Readout for which to generate mask
    64                            psMaskType sat, ///< Mask value to give saturated pixels
    65                            psMaskType bad ///< Mask value to give bad (low) pixels
     64                           psImageMaskType sat, ///< Mask value to give saturated pixels
     65                           psImageMaskType bad ///< Mask value to give bad (low) pixels
    6666    );
    6767
     
    7979/// Calls pmReadoutGenerateMask and pmReadoutGenerateWeight for the readout
    8080bool pmReadoutGenerateMaskWeight(pmReadout *readout, ///< Readout for which to generate mask and weights
    81                                  psMaskType sat, ///< Mask value to give saturated pixels
    82                                  psMaskType bad, ///< Mask value to give bad (low) pixels
     81                                 psImageMaskType sat, ///< Mask value to give saturated pixels
     82                                 psImageMaskType bad, ///< Mask value to give bad (low) pixels
    8383                                 bool poisson ///< Use poisson weights (in addition to read noise)?
    8484                                );
     
    8888/// Calls pmReadoutGenerateMaskWeight for each readout within the cell.
    8989bool pmCellGenerateMaskWeight(pmCell *cell, ///< Cell for which to generate mask and weights
    90                               psMaskType sat, ///< Mask value to give saturated pixels
    91                               psMaskType bad, ///< Mask value to give bad (low) pixels
     90                              psImageMaskType sat, ///< Mask value to give saturated pixels
     91                              psImageMaskType bad, ///< Mask value to give bad (low) pixels
    9292                              bool poisson ///< Use poisson weights (in addition to read noise)?
    9393                             );
     
    9898bool pmReadoutWeightRenormPixels(
    9999    const pmReadout *readout,           ///< Readout to normalise
    100     psMaskType maskVal,                 ///< Value to mask
     100    psImageMaskType maskVal,                 ///< Value to mask
    101101    psStatsOptions meanStat,            ///< Statistic to measure the mean (of the variance map)
    102102    psStatsOptions stdevStat,           ///< Statistic to measure the stdev (of the image)
     
    110110bool pmReadoutWeightRenormPhot(
    111111    const pmReadout *readout,           ///< Readout to normalise
    112     psMaskType maskVal,                 ///< Value to mask
     112    psImageMaskType maskVal,                 ///< Value to mask
    113113    int num,                            ///< Number of instances to measure over the image
    114114    float width,                        ///< Photometry width
     
    123123/// that patch corresponds.
    124124bool pmReadoutWeightRenorm(const pmReadout *readout, // Readout to normalise
    125                            psMaskType maskVal, // Value to mask
     125                           psImageMaskType maskVal, // Value to mask
    126126                           psStatsOptions meanStat, // Statistic to measure the mean (of the variance map)
    127127                           psStatsOptions stdevStat, // Statistic to measure the stdev (of the image)
     
    136136/// the provided value.
    137137bool pmReadoutMaskNonfinite(pmReadout *readout, ///< Readout to mask
    138                             psMaskType maskVal ///< Mask value to give non-finite pixels
     138                            psImageMaskType maskVal ///< Mask value to give non-finite pixels
    139139    );
    140140
     
    145145/// sets masked areas to NAN in the image and weight.
    146146bool pmReadoutMaskApply(pmReadout *readout, ///< Readout to mask
    147                         psMaskType maskVal ///< Mask value for which to apply mask
     147                        psImageMaskType maskVal ///< Mask value for which to apply mask
    148148    );
    149149
     
    152152/// Scan the mask image for bad pixels, and interpolate over them using the nominated options
    153153bool pmReadoutInterpolateBadPixels(pmReadout *readout, ///< Readout to work on
    154                                    psMaskType maskVal, ///< Value to mask
     154                                   psImageMaskType maskVal, ///< Value to mask
    155155                                   psImageInterpolateMode mode, ///< Interpolation mode
    156156                                   float poorFrac, ///< Maximum bad fraction of kernel for "poor" status
    157                                    psMaskType maskPoor, ///< Mask value to give poor pixels
    158                                    psMaskType maskBad ///< Mask value to give bad pixels
     157                                   psImageMaskType maskPoor, ///< Mask value to give poor pixels
     158                                   psImageMaskType maskBad ///< Mask value to give bad pixels
    159159    );
    160160
  • trunk/psModules/src/camera/pmFPAMosaic.c

    r19073 r21183  
    471471        numImages++;
    472472
    473         // Only implemented for F32 and U8 images so far.
    474         assert(image->type.type == PS_TYPE_F32 || image->type.type == PS_TYPE_U8);
    475473        // All input types must be the same
    476474        if (type == 0) {
     
    537535        if (xBinSource->data.S32[i] == xBinTarget && yBinSource->data.S32[i] == yBinTarget) {
    538536            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);
    539545                COPY_WITH_PARITY_DIFFERENCE(F32);
    540                 COPY_WITH_PARITY_DIFFERENCE(U8);
     546                COPY_WITH_PARITY_DIFFERENCE(F64);
    541547              default:
    542548                psAbort("Should never get here.\n");
     
    548554        // We have to do all of the hard work ourselves
    549555        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);
    552566          default:
    553567            psAbort("Should never get here.\n");
     
    730744                       const pmChip *chip, // Chip to mosaic
    731745                       const pmCell *targetCell, // Cell to which to mosaic
    732                        psMaskType blank // Mask value to give blank pixels
     746                       psImageMaskType blank // Mask value to give blank pixels
    733747                      )
    734748{
     
    838852                      const pmChip *targetChip, // Chip to which to mosaic
    839853                      const pmCell *targetCell, // Cell to which to mosaic
    840                       psMaskType blank  // Mask value to give blank pixels
     854                      psImageMaskType blank  // Mask value to give blank pixels
    841855                     )
    842856{
     
    9941008// the mosaic image.
    9951009
    996 bool pmChipMosaic(pmChip *target, const pmChip *source, bool deepCopy, psMaskType blank)
     1010bool pmChipMosaic(pmChip *target, const pmChip *source, bool deepCopy, psImageMaskType blank)
    9971011{
    9981012    // Target exists, and has only a single cell
     
    12251239
    12261240
    1227 bool pmFPAMosaic(pmFPA *target, const pmFPA *source, bool deepCopy, psMaskType blank)
     1241bool pmFPAMosaic(pmFPA *target, const pmFPA *source, bool deepCopy, psImageMaskType blank)
    12281242{
    12291243    // Target exists, and has only a single chip with single cell
  • trunk/psModules/src/camera/pmFPAMosaic.h

    r13898 r21183  
    44 * @author Paul Price, IfA
    55 *
    6  * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2007-06-20 02:22:26 $
     6 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2009-01-27 06:39:38 $
    88 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    99 */
     
    2424                  const pmChip *source, ///< Source chip whose cells will be mosaicked
    2525                  bool deepCopy,        ///< Require a deep copy (disregard 'nice' chip)
    26                   psMaskType blank      ///< Mask value to give blank pixels
     26                  psImageMaskType blank      ///< Mask value to give blank pixels
    2727    );
    2828
     
    3636                 const pmFPA *source,   ///< FPA whose chips and cells will be mosaicked
    3737                 bool deepCopy,         ///< Require a deep copy (disregard 'nice' chip)
    38                  psMaskType blank       ///< Mask value to give blank pixels
     38                 psImageMaskType blank       ///< Mask value to give blank pixels
    3939                );
    4040/// @}
  • trunk/psModules/src/camera/pmFPARead.c

    r19246 r21183  
    3535static psElemType pixelTypes[] = {
    3636    PS_TYPE_F32,
    37     PS_TYPE_MASK,
     37    PS_TYPE_IMAGE_MASK,
    3838    PS_TYPE_F32,
    3939    0
  • trunk/psModules/src/camera/pmFPA_JPEG.c

    r19653 r21183  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2008-09-23 02:00:36 $
     7 *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2009-01-27 06:39:38 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    157157    psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN);
    158158    stats->nSubsample = 10000;
    159     psMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
     159    psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
    160160    float mean = 0, delta = 0;          //
    161161    if (!psImageBackground(stats, NULL, readout->image, readout->mask, maskVal, rng)) {
  • trunk/psModules/src/camera/pmHDU.c

    r19385 r21183  
    167167                     const psArray *images, // Images to write
    168168                     const psArray *masks, // Masks to use when writing
    169                      psMaskType maskVal,// Value to mask
     169                     psImageMaskType maskVal,// Value to mask
    170170                     psFits *fits       // FITS file to which to write
    171171                    )
     
    222222    PS_ASSERT_PTR_NON_NULL(fits, false);
    223223
    224     psMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
     224    psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
    225225    return hduWrite(hdu, hdu->images, hdu->masks, maskVal, fits);
    226226}
     
    240240    PS_ASSERT_PTR_NON_NULL(fits, false);
    241241
    242     psMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
     242    psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
    243243    return hduWrite(hdu, hdu->weights, hdu->masks, maskVal, fits);
    244244}
  • trunk/psModules/src/camera/pmReadoutStack.c

    r18830 r21183  
    7878
    7979// 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, psMaskType blank)
     80bool pmReadoutStackDefineOutput(pmReadout *readout, int col0, int row0, int numCols, int numRows, bool mask, bool weight, psImageMaskType blank)
    8181{
    8282    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    9494        // XXX is this an error?
    9595        if (readout->mask) return false;
    96         readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
     96        readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK);
    9797        psImageInit(readout->mask, blank);
    9898    }
     
    163163bool pmReadoutUpdateSize(pmReadout *readout, int minCols, int minRows,
    164164                         int numCols, int numRows, bool mask, bool weight,
    165                          psMaskType blank)
     165                         psImageMaskType blank)
    166166{
    167167    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    191191    if (mask) {
    192192        if (!readout->mask) {
    193             readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
     193            readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_IMAGE_MASK);
    194194            psImageInit(readout->mask, blank);
    195195        }
    196196        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);
    198198            psImageInit(newMask, blank);
    199199            psImageOverlaySection(newMask, readout->mask, readout->col0, readout->row0, "=");
  • trunk/psModules/src/camera/pmReadoutStack.h

    r18830 r21183  
    1414                         bool mask,     ///< Worry about the mask?
    1515                         bool weight,   ///< Worry about the weight?
    16                          psMaskType blank ///< Mask value to give to blank pixels
     16                         psImageMaskType blank ///< Mask value to give to blank pixels
    1717    );
    1818
     
    4747
    4848// 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, psMaskType blank);
     49bool pmReadoutStackDefineOutput(pmReadout *readout, int col0, int row0, int numCols, int numRows, bool mask, bool weight, psImageMaskType blank);
    5050
    5151bool pmReadoutStackSetOutputSize(int *col0, int *row0, int *numCols, int *numRows, const psArray *inputs);
Note: See TracChangeset for help on using the changeset viewer.