IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 18, 2006, 1:37:07 PM (19 years ago)
Author:
Paul Price
Message:

Offsets are in the readout, not in the image. Image offsets are
simply the position in the FITS file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmMaskBadPixels.c

    r10026 r10080  
    2323    psImage *exMask = mask->mask;
    2424
    25     int rowMax = inMask->row0 + inMask->numRows;
    26     int colMax = inMask->col0 + inMask->numCols;
    27 
    28     if (exMask->row0 > inMask->row0 || exMask->col0 > inMask->col0 ||
    29             exMask->row0 + exMask->numRows < rowMax || exMask->col0 + exMask->numCols < colMax) {
    30         psError( PS_ERR_BAD_PARAMETER_SIZE, true,
    31                  "Input image size exceeds that of mask image: (%d, %d) vs (%d, %d)",
    32                  inMask->numRows, inMask->numCols, exMask->numRows, exMask->numCols);
     25    int rowMax = input->row0 + inMask->numRows;
     26    int colMax = input->col0 + inMask->numCols;
     27
     28    if (mask->row0 > input->row0 || mask->col0 > input->col0 ||
     29            mask->row0 + exMask->numRows < rowMax || mask->col0 + exMask->numCols < colMax) {
     30        psError(PS_ERR_BAD_PARAMETER_SIZE, true,
     31                "Input image size exceeds that of mask image: (%d, %d) vs (%d, %d)",
     32                inMask->numRows, inMask->numCols, exMask->numRows, exMask->numCols);
    3333        return false;
    3434    }
     
    3636    // Determine total offset based on image offset with chip offset
    3737    // XXX if we choose to correct for the readout location, apply input->col0,row0 here
    38     int offCol = inMask->col0 - exMask->col0;
    39     int offRow = inMask->row0 - exMask->row0;
     38    int offCol = input->col0 - mask->col0;
     39    int offRow = input->row0 - mask->row0;
    4040
    4141    // masks are both of type PS_TYPE_MASK
Note: See TracChangeset for help on using the changeset viewer.