IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 10, 2007, 11:07:38 AM (19 years ago)
Author:
Paul Price
Message:

Expanding chip and cell parity out so that separate error messages are generated for each.

File:
1 edited

Legend:

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

    r13300 r13339  
    428428                            const psVector *yBinSource, // Binning in y of source images
    429429                            int xBinTarget, int yBinTarget, // Binning in x and y of target images
    430                             const psVector *x0, const psVector *y0 // Offsets for source images on target
     430                            const psVector *x0, const psVector *y0, // Offsets for source images on target
     431                            double unexposed // Value for unexposed pixels
    431432                           )
    432433{
     
    802803    // Mosaic the images together and we're done
    803804    if (allGood) {
    804         *mosaicImage = imageMosaic(images, xFlip, yFlip, xBin, yBin, *xBinChip, *yBinChip, x0, y0);
    805         *mosaicWeights = imageMosaic(weights, xFlip, yFlip, xBin, yBin, *xBinChip, *yBinChip, x0, y0);
    806         *mosaicMask = imageMosaic(masks, xFlip, yFlip, xBin, yBin, *xBinChip, *yBinChip, x0, y0);
     805        *mosaicImage = imageMosaic(images, xFlip, yFlip, xBin, yBin, *xBinChip, *yBinChip, x0, y0, NAN);
     806        *mosaicWeights = imageMosaic(weights, xFlip, yFlip, xBin, yBin, *xBinChip, *yBinChip, x0, y0, NAN);
     807        *mosaicMask = imageMosaic(masks, xFlip, yFlip, xBin, yBin, *xBinChip, *yBinChip, x0, y0, 0xff);
    807808    }
    808809
     
    935936    // Mosaic the images together and we're done
    936937    if (allGood) {
    937         *mosaicImage = imageMosaic(images, xFlip, yFlip, xBin, yBin, *xBinFPA, *yBinFPA, x0, y0);
    938         *mosaicWeights = imageMosaic(weights, xFlip, yFlip, xBin, yBin, *xBinFPA, *yBinFPA, x0, y0);
    939         *mosaicMask = imageMosaic(masks, xFlip, yFlip, xBin, yBin, *xBinFPA, *yBinFPA, x0, y0);
     938        *mosaicImage = imageMosaic(images, xFlip, yFlip, xBin, yBin, *xBinFPA, *yBinFPA, x0, y0, NAN);
     939        *mosaicWeights = imageMosaic(weights, xFlip, yFlip, xBin, yBin, *xBinFPA, *yBinFPA, x0, y0, NAN);
     940        *mosaicMask = imageMosaic(masks, xFlip, yFlip, xBin, yBin, *xBinFPA, *yBinFPA, x0, y0, 0xff);
    940941    }
    941942
     
    11051106
    11061107    // If the cells contain the headers, we need to apply the WCS terms from (one of?) the cells
    1107     int xParityTarget = psMetadataLookupS32(NULL, target->concepts, "CHIP.XPARITY") *
    1108         psMetadataLookupS32(NULL, targetCell->concepts, "CELL.XPARITY"); // Target parity in x
    1109     if (xParityTarget != -1 && xParityTarget != 1) {
    1110         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CHIP.XPARITY or CELL.XPARITY is not set for target.");
    1111         return false;
    1112     }
    1113     int yParityTarget = psMetadataLookupS32(NULL, target->concepts, "CHIP.YPARITY") *
    1114         psMetadataLookupS32(NULL, targetCell->concepts, "CELL.YPARITY"); // Target parity in y
    1115     if (yParityTarget != -1 && yParityTarget != 1) {
    1116         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CHIP.YPARITY or CELL.YPARITY is not set for target.");
    1117         return false;
    1118     }
     1108    int xParityCellTarget = psMetadataLookupS32(NULL, targetCell->concepts, "CELL.XPARITY");
     1109    if (xParityCellTarget != -1 && xParityCellTarget != 1) {
     1110        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CELL.XPARITY is not set for target.");
     1111        return false;
     1112    }
     1113    int xParityChipTarget = psMetadataLookupS32(NULL, target->concepts, "CHIP.XPARITY");
     1114    if (xParityChipTarget != -1 && xParityChipTarget != 1) {
     1115        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CHIP.XPARITY is not set for target.");
     1116        return false;
     1117    }
     1118    int xParityTarget = xParityCellTarget * xParityChipTarget; // Target parity in x
     1119
     1120    int yParityCellTarget = psMetadataLookupS32(NULL, targetCell->concepts, "CELL.YPARITY");
     1121    if (yParityCellTarget != -1 && yParityCellTarget != 1) {
     1122        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CELL.YPARITY is not set for target.");
     1123        return false;
     1124    }
     1125    int yParityChipTarget = psMetadataLookupS32(NULL, target->concepts, "CHIP.YPARITY");
     1126    if (yParityChipTarget != -1 && yParityChipTarget != 1) {
     1127        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CHIP.YPARITY is not set for target.");
     1128        return false;
     1129    }
     1130    int yParityTarget = yParityCellTarget * yParityChipTarget; // Target parity in y
    11191131
    11201132    for (int i = 0; i < source->cells->n; i++) {
Note: See TracChangeset for help on using the changeset viewer.