Changeset 1379


Ignore:
Timestamp:
08/29/06 13:59:26 (14 years ago)
Author:
curtis
Message:

Slightly better guess for two-exponential function. But doesn't work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/apps/slim/SlimPlotter.java

    r1372 r1379  
    915915      ExpFunction func = new ExpFunction(numExp); 
    916916      float[] params = new float[3 * numExp]; 
    917       for (int i=0; i<numExp; i++) { 
    918         // initial guess for (a, b, c) 
    919         int e = 3 * i; 
    920         params[e] = (numExp - i) * maxVal / (numExp + 1); 
    921         params[e + 1] = 1; 
    922         params[e + 2] = 0; 
    923       } 
     917      if (numExp == 1) { 
     918        params[0] = maxVal; 
     919        params[1] = 1; 
     920        params[2] = 0; 
     921      } 
     922      else if (numExp == 2) { 
     923        params[0] = maxVal / 2; 
     924        params[1] = 0.8f; 
     925        params[2] = 0; 
     926        params[0] = maxVal / 2; 
     927        params[1] = 2; 
     928        params[2] = 0; 
     929      } 
     930//      for (int i=0; i<numExp; i++) { 
     931//        // initial guess for (a, b, c) 
     932//        int e = 3 * i; 
     933//        params[e] = (numExp - i) * maxVal / (numExp + 1); 
     934//        params[e + 1] = 1; 
     935//        params[e + 2] = 0; 
     936//      } 
    924937      int num = timeBins - maxPeak; 
    925938      float[] xVals = new float[num]; 
Note: See TracChangeset for help on using the changeset viewer.