IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2588


Ignore:
Timestamp:
Dec 1, 2004, 11:46:06 AM (22 years ago)
Author:
gusciora
Message:

...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/pmSubtractSky.c

    r2587 r2588  
    66 *  @author GLG, MHPCC
    77 *
    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 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1717#include "psConstants.h"
    1818
     19// XXX: this is pmFit in pmSubtractBias.c, and psFit here.
    1920typedef enum {
    2021    PM_FIT_NONE,                              ///< No fit
    2122    PM_FIT_POLYNOMIAL,                        ///< Fit polynomial
    2223    PM_FIT_SPLINE                             ///< Fit cubic splines
    23 } pmFit;
     24} psFit;
    2425
    2526int p_psDetermineNumBits(unsigned int data)
     
    9192                for (int binCol = 0; binCol <= binFactor ; binCol++) {
    9293                    if (((row + binRow) < origImage->numRows) &&
    93                             ((col + binCol) < origImage->numCol)) {
     94                            ((col + binCol) < origImage->numCols)) {
    9495                        binVector->data.F32[count] =
    9596                            origImage->data.F32[row + binRow][col + binCol];
     
    144145
    145146    psImage *origImage = in->image;
     147    psImage *maskImage = in->mask;
    146148    psImage *binnedImage = NULL;
    147     psPolynomial1D *myPoly;
     149    psPolynomial2D *myPoly;
    148150    psSpline1D *mySpline;
    149151
     
    179181        psF64 binnedStdev;
    180182        psStats *myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN);
    181         myStats =  psImageStats(myStats, binedImage, NULL, 0);
     183        myStats =  psImageStats(myStats, binnedImage, NULL, 0);
    182184        p_psGetStatValue(myStats, &binnedMean);
    183185
    184186        myStats->options = PS_STAT_SAMPLE_STDEV;
    185         myStats =  psImageStats(myStats, binedImage, NULL, 0);
     187        myStats =  psImageStats(myStats, binnedImage, NULL, 0);
    186188        p_psGetStatValue(myStats, &binnedStdev);
    187189        psFree(myStats);
     
    191193                if (fabs(binnedImage->data.F32[row][col] - binnedMean) >
    192194                        (clipSD * binnedStdev)) {
    193                     binnedImage->mask.U8[row][col] = 1;
     195                    maskImage->data.U8[row][col] = 1;
    194196                }
    195197            }
     
    200202    if (fit == PM_FIT_POLYNOMIAL) {
    201203        // Fit a polynomial to the old overscan vector.
    202         myPoly = (psPolynomial2D *)
    203                  fitSpec;
     204        myPoly = (psPolynomial2D *) fitSpec;
    204205        myPoly = psImageFitPolynomial(myPoly, origImage);
    205206        // XXX Do we need to do something with ordinate scaling if Chebyshev?
     
    208209    } else if (fit == PM_FIT_SPLINE) {
    209210        // Fit a spline to the old overscan vector.
    210         mySpline = (psSpline1D *)
    211                    fitSpec;
     211        mySpline = (psSpline1D *) fitSpec;
    212212        // XXX: What do we do?  We don't have 2-D splines.
    213213        return(in);
Note: See TracChangeset for help on using the changeset viewer.