IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2130


Ignore:
Timestamp:
Oct 14, 2004, 11:44:08 AM (22 years ago)
Author:
gusciora
Message:

Created the pmNonLinearity tests.

File:
1 edited

Legend:

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

    r2125 r2130  
    55 *  @author George Gusciora, MHPCC
    66 *
    7  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2004-10-14 19:01:37 $
     7 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2004-10-14 21:44:08 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2121#include "pmNonLinear.h"
    2222
     23/******************************************************************************
     24pmNonLinearityLookup(): This routine will take an psReadout image as input
     25and a 1-D polynomial.  For each pixel in the input image, the polynomial will
     26be evaluated at that pixels value, and the image pixel will then be set to
     27that value.
     28 *****************************************************************************/
     29
    2330psReadout *pmNonLinearityPolynomial(psReadout *in,
    2431                                    const psPolynomial1D *coeff)
     
    3239
    3340    for (i=0;i<(in->image)->numRows;i++) {
    34         for (j=0;j<(in->image)->numRows;j++) {
     41        for (j=0;j<(in->image)->numCols;j++) {
    3542            (in->image)->data.F32[i][j] = psPolynomial1DEval((in->image)->data.F32[i][j], coeff);
    3643        }
     
    4047
    4148
     49/******************************************************************************
     50pmNonLinearityLookup(): This routine will take an psReadout image as input
     51and two input vectors, which constitute a lookup table.  For each pixel in
     52the input image, that pixels value will be determined in the input vector
     53inFluxe, and the corresponding value in outFlux.  The image pixel will then
     54be set to the value from outFlux.
     55 *****************************************************************************/
    4256psReadout *pmNonLinearityLookup(psReadout *in,
    4357                                const psVector *inFlux,
     
    5771    float slope;
    5872
     73    x.type.type = PS_TYPE_F32;
    5974    if (inFlux->n != outFlux->n) {
    6075        // XXX: psWarning("pmNonLinearityLookup(): input vectors have different size");
     
    6580        return(in);
    6681    }
    67 
    6882    for (i=0;i<(in->image)->numRows;i++) {
    6983        for (j=0;j<(in->image)->numCols;j++) {
    7084            x.data.F32 = (in->image)->data.F32[i][j];
     85
    7186            binNum = p_psVectorBinDisect((psVector *)inFlux, &x);
    7287
Note: See TracChangeset for help on using the changeset viewer.