Changeset 7673 for trunk/projects
- Timestamp:
- 03/25/11 20:18:24 (9 years ago)
- Location:
- trunk/projects/curve-fitter/src/main/java/loci/curvefitter
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/projects/curve-fitter/src/main/java/loci/curvefitter/AbstractCurveFitter.java
r7668 r7673 87 87 88 88 @Override 89 public double[] getInstrumentResponse() { 90 return m_instrumentResponse; 89 public double[] getInstrumentResponse(int pixels) { 90 double[] instrumentResponse = null; 91 if (null != m_instrumentResponse) { 92 instrumentResponse = new double[m_instrumentResponse.length]; 93 for (int i = 0; i < instrumentResponse.length; ++i) { 94 instrumentResponse[i] = pixels * m_instrumentResponse[i]; 95 } 96 } 97 return instrumentResponse; 91 98 } 92 99 -
trunk/projects/curve-fitter/src/main/java/loci/curvefitter/CurveFitData.java
r7670 r7673 48 48 int m_x; 49 49 int m_y; 50 int m_pixels; 50 51 double[] m_params; 51 52 double[] m_yCount; … … 83 84 public void setY(int y) { 84 85 m_y = y; 86 } 87 88 @Override 89 public int getPixels() { 90 return m_pixels; 91 } 92 93 @Override 94 public void setPixels(int pixels) { 95 m_pixels = pixels; 85 96 } 86 97 -
trunk/projects/curve-fitter/src/main/java/loci/curvefitter/ICurveFitData.java
r7289 r7673 88 88 89 89 /** 90 * Sets how many pixels went into this data point. 91 * 92 * @param pixels 93 */ 94 public void setPixels(int pixels); 95 96 /** 97 * Gets how many pixels went into this data point. 98 * 99 * @return number of pixels 100 */ 101 public int getPixels(); 102 103 /** 90 104 * Gets parameters of the fit. Could represent multiple components. 91 105 * Input and output to the fit. … … 144 158 */ 145 159 public void setYFitted(double yFit[]); 146 147 /**148 * Gets chi square of fit. Output from fit only.149 *150 * @return chi square151 */152 // public double getChiSquare();153 154 /**155 * Sets chi square of fit.156 *157 * @param chiSquare158 */159 // public void setChiSquare(double chiSquare);160 160 } -
trunk/projects/curve-fitter/src/main/java/loci/curvefitter/ICurveFitter.java
r7290 r7673 104 104 * Get instrument response data. Input to fit only. 105 105 * 106 * @param scale to this number of pixels 106 107 * @return array of data or null if not set 107 108 */ 108 public double[] getInstrumentResponse( );109 public double[] getInstrumentResponse(int pixels); 109 110 110 111 /** -
trunk/projects/curve-fitter/src/main/java/loci/curvefitter/SLIMCurveFitter.java
r7669 r7673 186 186 z.setValue( data.getParams()[1]); 187 187 188 // get IRF curve, if any 189 double[] instrumentResponse = getInstrumentResponse(data.getPixels()); 188 190 int nInstrumentResponse = 0; 189 if (null != m_instrumentResponse) {190 nInstrumentResponse = m_instrumentResponse.length;191 if (null != instrumentResponse) { 192 nInstrumentResponse = instrumentResponse.length; 191 193 } 192 194 193 195 returnValue = s_library.RLD_fit( 194 196 m_xInc, 195 data.getYCount(), //TODO data get data???197 data.getYCount(), 196 198 start, 197 199 stop, 198 m_instrumentResponse,200 instrumentResponse, 199 201 nInstrumentResponse, 200 202 data.getSig(),
Note: See TracChangeset
for help on using the changeset viewer.