IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20634


Ignore:
Timestamp:
Nov 10, 2008, 2:02:26 PM (17 years ago)
Author:
eugene
Message:

added asserts to report failure to determine cell parities

File:
1 edited

Legend:

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

    r18654 r20634  
    172172    int xParityTarget = psMetadataLookupS32(&mdokT, target->concepts, "CELL.XPARITY"); // Target x parity
    173173    assert(mdokS && mdokT);
     174    psAssert (abs(xParitySource) == 1, "CELL.XPARITY not set for source");
     175    psAssert (abs(xParityTarget) == 1, "CELL.XPARITY not set for target");
    174176    if (abs(xParitySource) != 1) {
    175177        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CELL.XPARITY is not set for source (%d)",
     
    189191    int yParitySource = psMetadataLookupS32(&mdokS, source->concepts, "CELL.YPARITY"); // Source parity
    190192    assert(mdokS && mdokT);
     193    psAssert (abs(yParitySource) == 1, "CELL.YPARITY not set for source");
     194    psAssert (abs(yParityTarget) == 1, "CELL.YPARITY not set for target");
    191195    if (abs(yParitySource) != 1) {
    192196        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "CELL.YPARITY is not set for source (%d)",
     
    324328        int xSize = psMetadataLookupS32(NULL, source->concepts, "CELL.XSIZE"); // CELL.XSIZE of source
    325329
     330        psAssert (abs(xParity) == 1, "CELL.XPARITY not set for source");
     331
    326332        if (sourceBin == 0) {
    327333            // Don't know the binning; assume it is unity
     
    472478        pmCell *targetCell = pmCellAlloc (targetChip, cellName);
    473479        int xParityTarget = psMetadataLookupS32(&status, sourceCell->concepts, "CELL.XPARITY"); // Target x parity
     480        psAssert (abs(xParityTarget) == 1, "CELL.XPARITY not set for target");
    474481        psMetadataAddS32 (targetCell->concepts, PS_LIST_TAIL, "CELL.XPARITY", PS_META_REPLACE, "", xParityTarget);
    475482        int yParityTarget = psMetadataLookupS32(&status, sourceCell->concepts, "CELL.YPARITY"); // Target y parity
     483        psAssert (abs(xParityTarget) == 1, "CELL.YPARITY not set for target");
    476484        psMetadataAddS32 (targetCell->concepts, PS_LIST_TAIL, "CELL.YPARITY", PS_META_REPLACE, "", yParityTarget);
    477485        if (!cellCopy(targetCell, sourceCell, true, 1, 1)) {
Note: See TracChangeset for help on using the changeset viewer.