Changeset 2857 for trunk/psModules/src/pmNonLinear.c
- Timestamp:
- Dec 30, 2004, 12:22:00 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/pmNonLinear.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmNonLinear.c
r2481 r2857 3 3 * Provides polynomial or table lookup non-linearity corrections to readouts. 4 4 * 5 * @author G eorge Gusciora, MHPCC5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-1 1-25 02:54:45$7 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-12-30 22:22:00 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 31 31 const psPolynomial1D *coeff) 32 32 { 33 int i;34 int j;35 36 33 PS_PTR_CHECK_NULL(in,NULL); 37 34 PS_PTR_CHECK_NULL(in->image, NULL); 38 35 PS_PTR_CHECK_NULL(coeff,NULL); 36 37 psS32 i; 38 psS32 j; 39 39 40 40 for (i=0;i<(in->image)->numRows;i++) { … … 63 63 PS_PTR_CHECK_NULL(outFlux,NULL); 64 64 65 inti;66 intj;67 inttableSize = inFlux->n;68 intbinNum;65 psS32 i; 66 psS32 j; 67 psS32 tableSize = inFlux->n; 68 psS32 binNum; 69 69 psScalar x; 70 intnumPixels = 0;71 floatslope;70 psS32 numPixels = 0; 71 psF32 slope; 72 72 73 73 x.type.type = PS_TYPE_F32; 74 74 if (inFlux->n != outFlux->n) { 75 // XXX: psWarning("pmNonLinearityLookup(): input vectors have different size");76 75 tableSize = PS_MIN(inFlux->n, outFlux->n); 76 psLogMsg(__func__, PS_LOG_WARN, 77 "WARNING: pmNonLinear.c: pmNonLinearityLookup(): input vectors have different sizes (%d, %d)\n", inFlux->n, outFlux->n); 77 78 } 78 79 if (inFlux->n < 2) { 79 // XXX: psWarning("pmNonLinearityLookup(): input vector less than 2 elements");80 psError(PS_ERR_UNKNOWN,true, "pmNonLinearityLookup(): input vector less than 2 elements. Returning in image."); 80 81 return(in); 81 82 } … … 96 97 97 98 numPixels++; 99 } else if (binNum < -2) { 100 // We get here if there was some other problem. 101 psError(PS_ERR_UNKNOWN,true, "pmNonLinearityLookup(): Could not perform p_psVectorBinDisect(). Returning in image."); 102 return(in); 103 numPixels++; 98 104 } else { 99 105 // Perform linear interpolation. … … 106 112 } 107 113 if (numPixels > 0) { 108 // XXX: psWarning("Warning: pmNonLinearityLookup(): %d pixels outside table.", numPixels); 114 psLogMsg(__func__, PS_LOG_WARN, 115 "WARNING: pmNonLinear.c: pmNonLinearityLookup(): %d pixels outside table.", numPixels); 109 116 } 110 117 return(in);
Note:
See TracChangeset
for help on using the changeset viewer.
