Changeset 2928 for trunk/psModules/src
- Timestamp:
- Jan 7, 2005, 10:00:34 AM (22 years ago)
- Location:
- trunk/psModules/src
- Files:
-
- 3 edited
-
pmNonLinear.c (modified) (6 diffs)
-
pmReadoutCombine.c (modified) (2 diffs)
-
pmSubtractSky.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmNonLinear.c
r2916 r2928 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-01-0 5 23:43:58$7 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-01-07 20:00:34 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 41 41 psS32 j; 42 42 43 for (i=0;i< (inputReadout->image)->numRows;i++) {44 for (j=0;j< (inputReadout->image)->numCols;j++) {45 (inputReadout->image)->data.F32[i][j] = psPolynomial1DEval(input1DPoly, (inputReadout->image)->data.F32[i][j]);43 for (i=0;i<inputReadout->image->numRows;i++) { 44 for (j=0;j<inputReadout->image->numCols;j++) { 45 inputReadout->image->data.F32[i][j] = psPolynomial1DEval(input1DPoly, inputReadout->image->data.F32[i][j]); 46 46 } 47 47 } … … 65 65 PS_IMAGE_CHECK_TYPE(inputReadout->image, PS_TYPE_F32, NULL); 66 66 PS_PTR_CHECK_NULL(inFlux,NULL); 67 psS32 tableSize = inFlux->n;68 67 if (inFlux->n < 2) { 69 68 psError(PS_ERR_UNKNOWN,true, "pmNonLinearityLookup(): input vector less than 2 elements. Returning inputReadout image."); … … 71 70 } 72 71 PS_PTR_CHECK_NULL(outFlux,NULL); 72 psS32 tableSize = inFlux->n; 73 73 if (inFlux->n != outFlux->n) { 74 74 tableSize = PS_MIN(inFlux->n, outFlux->n); … … 87 87 88 88 x.type.type = PS_TYPE_F32; 89 for (i=0;i<(inputReadout->image)->numRows;i++) { 90 for (j=0;j<(inputReadout->image)->numCols;j++) { 91 x.data.F32 = (inputReadout->image)->data.F32[i][j]; 92 89 for (i=0;i<inputReadout->image->numRows;i++) { 90 for (j=0;j<inputReadout->image->numCols;j++) { 91 x.data.F32 = inputReadout->image->data.F32[i][j]; 93 92 binNum = p_psVectorBinDisect((psVector *)inFlux, &x); 94 93 95 94 if (binNum == -2) { 96 95 // We get here if x is below the table lookup range. 97 (inputReadout->image)->data.F32[i][j] = outFlux->data.F32[0];96 inputReadout->image->data.F32[i][j] = outFlux->data.F32[0]; 98 97 numPixels++; 99 98 100 99 } else if (binNum == -1) { 101 100 // We get here if x is above the table lookup range. 102 (inputReadout->image)->data.F32[i][j] = outFlux->data.F32[tableSize-1]; 101 inputReadout->image->data.F32[i][j] = outFlux->data.F32[tableSize-1]; 102 numPixels++; 103 103 104 numPixels++;105 104 } else if (binNum < -2) { 106 105 // We get here if there was some other problem. … … 112 111 slope = (outFlux->data.F32[binNum+1] - outFlux->data.F32[binNum]) / 113 112 (inFlux->data.F32[binNum+1] - inFlux->data.F32[binNum]); 114 (inputReadout->image)->data.F32[i][j] = outFlux->data.F32[binNum] +115 ((x.data.F32 - inFlux->data.F32[binNum]) * slope);113 inputReadout->image->data.F32[i][j] = outFlux->data.F32[binNum] + 114 ((x.data.F32 - inFlux->data.F32[binNum]) * slope); 116 115 } 117 116 } -
trunk/psModules/src/pmReadoutCombine.c
r2916 r2928 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-01-0 5 23:43:58$7 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-01-07 20:00:34 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 27 27 psS32 numBits = 0; 28 28 29 for (i=0;i< 4* sizeof(psStatsOptions);i++) {29 for (i=0;i<8 * sizeof(psStatsOptions);i++) { 30 30 if (0x0001 & tmpData) { 31 31 numBits++; -
trunk/psModules/src/pmSubtractSky.c
r2916 r2928 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-01-0 5 23:43:58$8 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-01-07 20:00:34 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 29 29 psS32 numBits = 0; 30 30 31 for (i=0;i< 4* sizeof(psStatsOptions);i++) {31 for (i=0;i<8 * sizeof(psStatsOptions);i++) { 32 32 if (0x0001 & tmpData) { 33 33 numBits++; … … 439 439 psStatsOptions statOptions = 0; 440 440 441 // 441 442 // Return the original input readout if the fit specs are poorly defined. 443 // No warning or error messages should be generated. 444 // 442 445 if ((fitSpec == NULL) || 443 446 ((fit == PM_FIT_NONE) || (fit == PM_FIT_SPLINE))) { 444 psLogMsg(__func__, PS_LOG_WARN, "Fit specs are poorly defined. Returning in image.\n");447 // psLogMsg(__func__, PS_LOG_WARN, "Fit specs are poorly defined. Returning in image.\n"); 445 448 return(in); 446 449 }
Note:
See TracChangeset
for help on using the changeset viewer.
