Class ExponentialDecayFitter

java.lang.Object
edu.cnu.mdi.splot.fit.ALeastSquaresFitter
edu.cnu.mdi.splot.fit.ExponentialDecayFitter
All Implemented Interfaces:
IFitStringGetter, IFitter

public final class ExponentialDecayFitter extends ALeastSquaresFitter
Nonlinear least-squares fitter for exponential decay with a constant offset:
 y(x) = A * exp(-x / τ) + C
 

Parameter ordering

  • params[0] = A — amplitude
  • params[1] = τ — decay constant (enforced > 0)
  • params[2] = C — baseline offset

Typical applications

Radioactive decay, RC circuit discharge, fluorescence lifetime, exponential growth (negative τ via sign of A).

Initial guess strategy

The offset C is estimated from the tail of the data. The amplitude A comes from the first point minus the offset. The decay constant τ is estimated by log-linearising the offset-subtracted data and fitting a line through the log-transformed values.

Constraint

τ >= DEFAULT_MIN_TAU is enforced by a clamping parameter validator to prevent division by zero in the Jacobian.

Author:
heddle
  • Field Details

    • IDX_A

      public static final int IDX_A
      Index of amplitude parameter A.
      See Also:
    • IDX_TAU

      public static final int IDX_TAU
      Index of decay-constant parameter τ.
      See Also:
    • IDX_C

      public static final int IDX_C
      Index of baseline-offset parameter C.
      See Also:
    • PARAM_NAMES

      public static final String[] PARAM_NAMES
      Display names used in legend strings and fit summaries.
    • DEFAULT_MIN_TAU

      public static final double DEFAULT_MIN_TAU
      Minimum decay constant to avoid divide-by-zero in the Jacobian.
      See Also:
  • Constructor Details

    • ExponentialDecayFitter

      public ExponentialDecayFitter()
      Creates a fitter with the default Levenberg-Marquardt optimizer.
    • ExponentialDecayFitter

      public ExponentialDecayFitter(org.apache.commons.math3.fitting.leastsquares.LeastSquaresOptimizer optimizer)
      Creates a fitter with a custom optimizer.
      Parameters:
      optimizer - the least-squares optimizer to use (non-null)
  • Method Details