IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15379


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'.

Location:
trunk/psModules/src/concepts
Files:
2 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
  • trunk/psModules/src/concepts/pmConceptsAverage.h

    r14466 r15379  
    44 * @author Paul Price, IfA
    55 *
    6  * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2007-08-11 01:05:59 $
     6 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2007-10-25 23:05:14 $
    88 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    99 */
     
    4242/// - CELL.TIMESYS
    4343/// - CELL.X0, CELL.Y0
     44/// - CELL.XPARITY, CELL.YPARITY
    4445/// And for others, it takes the "worst" possible value:
    4546/// - CELL.SATURATION
     
    4748/// These concepts are only handled if the cells are all the same cell (mosaicking vs stacking):
    4849/// - CELL.X0, CELL.Y0
     50/// - CELL.XPARITY, CELL.YPARITY
    4951bool pmConceptsAverageCells(pmCell *target,///< Target cell
    5052                            psList *sources, ///< List of source cells
Note: See TracChangeset for help on using the changeset viewer.