Changeset 2588 for trunk/psModules/src/pmSubtractSky.c
- Timestamp:
- Dec 1, 2004, 11:46:06 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/pmSubtractSky.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmSubtractSky.c
r2587 r2588 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-12-01 21: 39:30$8 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-12-01 21:46:06 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 17 17 #include "psConstants.h" 18 18 19 // XXX: this is pmFit in pmSubtractBias.c, and psFit here. 19 20 typedef enum { 20 21 PM_FIT_NONE, ///< No fit 21 22 PM_FIT_POLYNOMIAL, ///< Fit polynomial 22 23 PM_FIT_SPLINE ///< Fit cubic splines 23 } p mFit;24 } psFit; 24 25 25 26 int p_psDetermineNumBits(unsigned int data) … … 91 92 for (int binCol = 0; binCol <= binFactor ; binCol++) { 92 93 if (((row + binRow) < origImage->numRows) && 93 ((col + binCol) < origImage->numCol )) {94 ((col + binCol) < origImage->numCols)) { 94 95 binVector->data.F32[count] = 95 96 origImage->data.F32[row + binRow][col + binCol]; … … 144 145 145 146 psImage *origImage = in->image; 147 psImage *maskImage = in->mask; 146 148 psImage *binnedImage = NULL; 147 psPolynomial 1D *myPoly;149 psPolynomial2D *myPoly; 148 150 psSpline1D *mySpline; 149 151 … … 179 181 psF64 binnedStdev; 180 182 psStats *myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN); 181 myStats = psImageStats(myStats, bin edImage, NULL, 0);183 myStats = psImageStats(myStats, binnedImage, NULL, 0); 182 184 p_psGetStatValue(myStats, &binnedMean); 183 185 184 186 myStats->options = PS_STAT_SAMPLE_STDEV; 185 myStats = psImageStats(myStats, bin edImage, NULL, 0);187 myStats = psImageStats(myStats, binnedImage, NULL, 0); 186 188 p_psGetStatValue(myStats, &binnedStdev); 187 189 psFree(myStats); … … 191 193 if (fabs(binnedImage->data.F32[row][col] - binnedMean) > 192 194 (clipSD * binnedStdev)) { 193 binnedImage->mask.U8[row][col] = 1;195 maskImage->data.U8[row][col] = 1; 194 196 } 195 197 } … … 200 202 if (fit == PM_FIT_POLYNOMIAL) { 201 203 // Fit a polynomial to the old overscan vector. 202 myPoly = (psPolynomial2D *) 203 fitSpec; 204 myPoly = (psPolynomial2D *) fitSpec; 204 205 myPoly = psImageFitPolynomial(myPoly, origImage); 205 206 // XXX Do we need to do something with ordinate scaling if Chebyshev? … … 208 209 } else if (fit == PM_FIT_SPLINE) { 209 210 // Fit a spline to the old overscan vector. 210 mySpline = (psSpline1D *) 211 fitSpec; 211 mySpline = (psSpline1D *) fitSpec; 212 212 // XXX: What do we do? We don't have 2-D splines. 213 213 return(in);
Note:
See TracChangeset
for help on using the changeset viewer.
