IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2009, 5:20:02 PM (17 years ago)
Author:
Paul Price
Message:

Updating to work following merge of pap_branch_20090128. Compiles, but not tested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubReadoutSubtract.c

    r21360 r21374  
    66 *
    77 *  @author IfA
    8  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2009-02-06 01:37:17 $
     8 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-06 03:20:02 $
    1010 *  Copyright 2009 Institute for Astronomy, University of Hawaii
    1111 */
     
    2828    pmReadout *subtrahend = NULL;
    2929    if (reverse) {
    30         minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
    31         subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
     30        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
     31        subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
    3232    } else {
    33         minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
    34         subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
     33        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
     34        subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
    3535    }
    3636
     
    5353    // Do the actual subtraction
    5454    pmReadout *outRO = pmFPAfileThisReadout(config->files, view, "PPSUB.OUTPUT");
    55     outRO->image = (psImage *) psBinaryOp(outRO->image, minuend->image, "-", subtrahend->image);
    56     if (minuend->weight && subtrahend->weight) {
    57         outRO->weight = (psImage *) psBinaryOp(outRO->weight, minuend->weight, "+", subtrahend->weight);
     55    outRO->image = (psImage*)psBinaryOp(outRO->image, minuend->image, "-", subtrahend->image);
     56    if (minuend->variance && subtrahend->variance) {
     57        outRO->variance = (psImage*)psBinaryOp(outRO->variance, minuend->variance, "+", subtrahend->variance);
    5858    }
    59     outRO->mask = (psImage *) psBinaryOp(outRO->mask, minuend->mask, "|", subtrahend->mask);
     59    outRO->mask = (psImage*)psBinaryOp(outRO->mask, minuend->mask, "|", subtrahend->mask);
    6060
    6161    outRO->data_exists = true;
     
    8383    if (!outHDU || !inHDU) {
    8484        psError(PS_ERR_UNKNOWN, false, "Unable to find HDU at FPA level to copy astrometry.");
    85         return false;
    86     } 
     85        return false;
     86    }
    8787
    8888    // Copy astrometry over
     
    9090    if (!pmAstromReadWCS(outFPA, outChip, inHDU->header, 1.0)) {
    9191        psError(PS_ERR_UNKNOWN, false, "Unable to read WCS astrometry from input FPA.");
    92         return false;
    93     } 
     92        return false;
     93    }
    9494
    9595    if (!pmAstromWriteWCS(outHDU->header, outFPA, outChip, WCS_TOLERANCE)) {
    9696        psError(PS_ERR_UNKNOWN, false, "Unable to write WCS astrometry to output FPA.");
    97         return false;
     97        return false;
    9898    }
    9999
Note: See TracChangeset for help on using the changeset viewer.