Skip to contents

Applies a robust data term (Huber or Tukey) with spatial/temporal TV priors, optionally with motion-aware temporal weights.

Usage

stv_robust4d(
  vec,
  lambda_s = 0.8,
  lambda_t = 0.2,
  loss = c("huber", "tukey"),
  delta = NULL,
  cthresh = NULL,
  alpha = 1,
  temporal_weights = NULL,
  motion_params = NULL,
  sigma_m = 0.5,
  iters = 35L,
  mask = NULL,
  tau = NULL,
  sigma = NULL,
  theta = 1
)

Arguments

vec

4D fMRI array or `NeuroVec`.

lambda_s

Spatial TV weight.

lambda_t

Temporal TV weight.

loss

Robust loss: `'huber'` or `'tukey'`.

delta

Huber threshold; if `NULL`, derived from noise.

cthresh

Tukey threshold; if `NULL`, derived from noise.

alpha

Tukey shape parameter.

temporal_weights

Optional length-(T or T-1) temporal edge weights.

motion_params

Optional motion regressors to derive temporal weights.

sigma_m

Motion weight scale.

iters

Iterations for the robust solver.

mask

Optional 3D logical/0-1 mask.

tau

Algorithm primal step size; if `NULL`, a sensible default is used.

sigma

Algorithm dual step size; if `NULL`, a sensible default is used.

theta

Over-relaxation parameter.

Value

Smoothed 4D data, wrapped like `vec` when possible.