fit_monoexponential: Fit a monoexponential model to one channel

View source: R/analyse_monoexponential.R

fit_monoexponentialR Documentation

Fit a monoexponential model to one channel

Description

Channel fitter of analyse_monoexponential() (see analyse_kinetics_channels()), also the fast-phase (stage 1) fit of fit_biexponential() and the fallback of fit_exponential_drift(). Self-starting SSmonoexponential() via stats::nls(); a failed 4-parameter fit falls back to the 3-parameter model (fit_td_fallback()), and the requested direction is enforced on B - A (enforce_direction()).

Usage

fit_monoexponential(x, t, valid, .a, ctx)

Arguments

x, t

Numeric vectors of the channel response and time elapsed from start_time.

valid

The find_kinetics_idx() result for the channel.

.a

The resolved argument list of the channel.

ctx

The channel context list of analyse_kinetics_channels().

Value

The coefs/model/fitted_data/diag list of build_fit_results(), or build_na_results() when the fit fails.


mnirs documentation built on Sept. 13, 2026, 1:06 a.m.