fit_exponential_drift: Fit an exponential-drift model to one channel

View source: R/analyse_exponential_drift.R

fit_exponential_driftR Documentation

Fit an exponential-drift model to one channel

Description

Channel fitter of analyse_exponential_drift() (see analyse_kinetics_channels()). Self-starting SSexponential_drift() via stats::nls() with algorithm = "port", seeded by expdrift_start(); a failed 6-parameter fit falls back to the 5-parameter model (fit_td_fallback()), and the requested direction is enforced on B - A (enforce_direction()).

Usage

fit_exponential_drift(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.