IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12650


Ignore:
Timestamp:
Mar 28, 2007, 1:27:23 PM (19 years ago)
Author:
Paul Price
Message:

Average CELL.X0 and CELL.Y0 as well.

File:
1 edited

Legend:

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

    r12630 r12650  
    3939    int readdir      = 0;               // Cell read direction
    4040    int xBin = 0, yBin = 0;             // Binning
     41    int x0 = 0, y0 = 0;                 // Offset
    4142
    4243    int nCells = 0;                     // Number of cells;
     
    6061            xBin    = psMetadataLookupS32(NULL, cell->concepts, "CELL.XBIN");
    6162            yBin    = psMetadataLookupS32(NULL, cell->concepts, "CELL.YBIN");
     63            x0      = psMetadataLookupS32(NULL, cell->concepts, "CELL.X0");
     64            y0      = psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0");
    6265        } else {
    6366            if (timeSys != psMetadataLookupS32(NULL, cell->concepts, "CELL.TIMESYS")) {
    64                 psLogMsg(__func__, PS_LOG_ERROR, "Differing time systems in use: %d vs %d\n", timeSys,
     67                psLogMsg(__func__, PS_LOG_ERROR, "Differing CELL.TIMESYS in use: %d vs %d\n", timeSys,
    6568                         psMetadataLookupS32(NULL, cell->concepts, "CELL.TIMESYS"));
    6669                success = false;
    6770            }
    6871            if (readdir != psMetadataLookupS32(NULL, cell->concepts, "CELL.READDIR")) {
    69                 psLogMsg(__func__, PS_LOG_ERROR, "Differing cell read directions in use: %d vs %d\n", readdir,
     72                psLogMsg(__func__, PS_LOG_ERROR, "Differing CELL.READDIR in use: %d vs %d\n", readdir,
    7073                         psMetadataLookupS32(NULL, cell->concepts, "CELL.READDIR"));
    7174                success = false;
    7275            }
    7376            if (xBin != psMetadataLookupS32(NULL, cell->concepts, "CELL.XBIN")) {
    74                 psLogMsg(__func__, PS_LOG_ERROR, "Differing cell x binnings in use: %d vs %d\n", xBin,
     77                psLogMsg(__func__, PS_LOG_ERROR, "Differing CELL.XBIN in use: %d vs %d\n", xBin,
    7578                         psMetadataLookupS32(NULL, cell->concepts, "CELL.XBIN"));
    7679                success = false;
    7780            }
    7881            if (yBin != psMetadataLookupS32(NULL, cell->concepts, "CELL.YBIN")) {
    79                 psLogMsg(__func__, PS_LOG_ERROR, "Differing cell y binnings in use: %d vs %d\n", yBin,
     82                psLogMsg(__func__, PS_LOG_ERROR, "Differing CELL.YBIN in use: %d vs %d\n", yBin,
    8083                         psMetadataLookupS32(NULL, cell->concepts, "CELL.YBIN"));
     84                success = false;
     85            }
     86            if (x0 != psMetadataLookupS32(NULL, cell->concepts, "CELL.X0")) {
     87                psLogMsg(__func__, PS_LOG_ERROR, "Differing CELL.X0 in use: %d vs %d\n", x0,
     88                         psMetadataLookupS32(NULL, cell->concepts, "CELL.X0"));
     89                success = false;
     90            }
     91            if (y0 != psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0")) {
     92                psLogMsg(__func__, PS_LOG_ERROR, "Differing CELL.Y0 in use: %d vs %d\n", y0,
     93                         psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0"));
    8194                success = false;
    8295            }
     
    110123    MD_UPDATE(target->concepts, "CELL.XBIN", S32, xBin);
    111124    MD_UPDATE(target->concepts, "CELL.YBIN", S32, yBin);
     125    MD_UPDATE(target->concepts, "CELL.X0", S32, x0);
     126    MD_UPDATE(target->concepts, "CELL.Y0", S32, y0);
    112127
    113128    // CELL.TIME needs special care
Note: See TracChangeset for help on using the changeset viewer.