IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 25, 2007, 1:05:14 PM (19 years ago)
Author:
Paul Price
Message:

Adding CELL.[XY]PARITY to list of concepts to 'average'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConceptsAverage.c

    r14468 r15379  
    9797    int xBin = 0, yBin = 0;             // Binning
    9898    int x0 = 0, y0 = 0;                 // Offset
     99    int xParity = 0, yParity = 0;       // Parity
    99100
    100101    int nCells = 0;                     // Number of cells;
     
    121122            if (same) {
    122123                // Only makes sense to update these if they are the same cell
    123                 x0  = psMetadataLookupS32(NULL, cell->concepts, "CELL.X0");
    124                 y0  = psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0");
     124                x0 = psMetadataLookupS32(NULL, cell->concepts, "CELL.X0");
     125                y0 = psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0");
     126                xParity = psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY");
     127                yParity = psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY");
    125128            }
    126129        } else {
     
    154157                    psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Differing CELL.Y0 in use: %d vs %d\n",
    155158                            y0, psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0"));
     159                    success = false;
     160                }
     161                if (xParity != psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY")) {
     162                    psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Differing CELL.XPARITY in use: %d vs %d\n",
     163                            xParity, psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY"));
     164                    success = false;
     165                }
     166                if (yParity != psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY")) {
     167                    psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Differing CELL.YPARITY in use: %d vs %d\n",
     168                            yParity, psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY"));
    156169                    success = false;
    157170                }
     
    189202        MD_UPDATE(target->concepts, "CELL.X0", S32, x0);
    190203        MD_UPDATE(target->concepts, "CELL.Y0", S32, y0);
     204        MD_UPDATE(target->concepts, "CELL.XPARITY", S32, xParity);
     205        MD_UPDATE(target->concepts, "CELL.YPARITY", S32, yParity);
    191206    }
    192207
Note: See TracChangeset for help on using the changeset viewer.