IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 12, 2007, 1:39:32 PM (19 years ago)
Author:
Paul Price
Message:

Fixing warning that CHIP.YPARITY wasn't matching the expected value after chip mosaicking.

File:
1 edited

Legend:

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

    r11687 r11754  
    737737        FIX_CONCEPT(targetCell->concepts, "CELL.Y0", S32, 0);
    738738    }
    739     int xParityTarget = psMetadataLookupS32(&mdok, targetCell->concepts, "CELL.XPARITY");
    740     if (!mdok || (xParityTarget != -1 && xParityTarget != 1)) {
     739    int xParityCellTarget = psMetadataLookupS32(&mdok, targetCell->concepts, "CELL.XPARITY");
     740    if (!mdok || (xParityCellTarget != -1 && xParityCellTarget != 1)) {
    741741        psLogMsg(__func__, PS_LOG_WARN, "CELL.XPARITY is not set for the target cell; assuming 1.\n");
    742742        FIX_CONCEPT(targetCell->concepts, "CELL.XPARITY", S32, 1);
    743         xParityTarget = 1;
    744     }
    745     int yParityTarget = psMetadataLookupS32(&mdok, targetCell->concepts, "CELL.YPARITY");
    746     if (!mdok || (yParityTarget != -1 && yParityTarget != 1)) {
     743        xParityCellTarget = 1;
     744    }
     745    int yParityCellTarget = psMetadataLookupS32(&mdok, targetCell->concepts, "CELL.YPARITY");
     746    if (!mdok || (yParityCellTarget != -1 && yParityCellTarget != 1)) {
    747747        psLogMsg(__func__, PS_LOG_WARN, "CELL.YPARITY is not set for the target cell; assuming 1.\n");
    748748        FIX_CONCEPT(targetCell->concepts, "CELL.YPARITY", S32, 1);
    749         yParityTarget = 1;
    750     }
     749        yParityCellTarget = 1;
     750    }
     751    int xParityChipTarget = psMetadataLookupS32(&mdok, targetCell->parent->concepts, "CHIP.XPARITY");
     752    if (!mdok || (xParityChipTarget != -1 && xParityChipTarget != 1)) {
     753        psLogMsg(__func__, PS_LOG_WARN, "CHIP.XPARITY is not set for the target chip; assuming 1.\n");
     754        FIX_CONCEPT(targetCell->parent->concepts, "CHIP.XPARITY", S32, 1);
     755        xParityChipTarget = 1;
     756    }
     757    int yParityChipTarget = psMetadataLookupS32(&mdok, targetCell->parent->concepts, "CHIP.YPARITY");
     758    if (!mdok || (yParityChipTarget != -1 && yParityChipTarget != 1)) {
     759        psLogMsg(__func__, PS_LOG_WARN, "CHIP.YPARITY is not set for the target chip; assuming 1.\n");
     760        FIX_CONCEPT(targetCell->parent->concepts, "CHIP.YPARITY", S32, 1);
     761        yParityChipTarget = 1;
     762    }
     763    int xParityTarget = xParityChipTarget * xParityCellTarget;
     764    int yParityTarget = yParityChipTarget * yParityCellTarget;
    751765
    752766    // Binning for the mosaicked chip is the minimum binning allowed by the cells
Note: See TracChangeset for help on using the changeset viewer.