IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19846


Ignore:
Timestamp:
Oct 2, 2008, 10:50:19 AM (18 years ago)
Author:
eugene
Message:

CELL.READDIR must be 1 (rows) or 2 (cols)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmOverscan.c

    r15133 r19846  
    293293    }
    294294
     295    bool mdok = false;
     296
    295297    // We are performing a row-by-row overscan subtraction
    296     bool readRows = psMetadataLookupBool(NULL, input->parent->concepts, "CELL.READDIR"); // Read direction
     298    int cellreaddir = psMetadataLookupS32(&mdok, input->parent->concepts, "CELL.READDIR"); // Read direction
     299    if ((cellreaddir != 1) && (cellreaddir != 2)) {
     300        psError(PS_ERR_UNKNOWN, true, "CELL.READDIR must be 1 (rows) or 2 (cols)\n");
     301        return false;
     302    }
     303
    297304    float chi2 = NAN;           // chi^2 from fit
    298305
    299306    // adjust operation depending on the read direction : need to re-org pixels for columns
    300     if (readRows) {
     307    if (cellreaddir == 1) {
    301308        // The read direction is rows
    302309        psArray *pixels = psArrayAlloc(image->numRows); // Array of vectors containing pixels
     
    344351        }
    345352        psFree(reduced);
    346     } else {
     353    }
     354    if (cellreaddir == 2) {
    347355        // The read direction is columns
    348356        psArray *pixels = psArrayAlloc(image->numCols); // Array of vectors containing pixels
Note: See TracChangeset for help on using the changeset viewer.