Changeset 21374 for trunk/ppSub/src/ppSubReadoutSubtract.c
- Timestamp:
- Feb 5, 2009, 5:20:02 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppSub/src/ppSubReadoutSubtract.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSubReadoutSubtract.c
r21360 r21374 6 6 * 7 7 * @author IfA 8 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $9 * @date $Date: 2009-02-06 0 1:37:17$8 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-06 03:20:02 $ 10 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 11 */ … … 28 28 pmReadout *subtrahend = NULL; 29 29 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"); 32 32 } 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"); 35 35 } 36 36 … … 53 53 // Do the actual subtraction 54 54 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); 58 58 } 59 outRO->mask = (psImage *)psBinaryOp(outRO->mask, minuend->mask, "|", subtrahend->mask);59 outRO->mask = (psImage*)psBinaryOp(outRO->mask, minuend->mask, "|", subtrahend->mask); 60 60 61 61 outRO->data_exists = true; … … 83 83 if (!outHDU || !inHDU) { 84 84 psError(PS_ERR_UNKNOWN, false, "Unable to find HDU at FPA level to copy astrometry."); 85 return false;86 } 85 return false; 86 } 87 87 88 88 // Copy astrometry over … … 90 90 if (!pmAstromReadWCS(outFPA, outChip, inHDU->header, 1.0)) { 91 91 psError(PS_ERR_UNKNOWN, false, "Unable to read WCS astrometry from input FPA."); 92 return false;93 } 92 return false; 93 } 94 94 95 95 if (!pmAstromWriteWCS(outHDU->header, outFPA, outChip, WCS_TOLERANCE)) { 96 96 psError(PS_ERR_UNKNOWN, false, "Unable to write WCS astrometry to output FPA."); 97 return false;97 return false; 98 98 } 99 99
Note:
See TracChangeset
for help on using the changeset viewer.
