% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scr-peaks.R
\name{detect_gazepoint_scr_peaks}
\alias{detect_gazepoint_scr_peaks}
\title{Detect Gazepoint SCR peaks}
\usage{
detect_gazepoint_scr_peaks(
  data,
  signal_col = NULL,
  phasic_col = NULL,
  time_col = NULL,
  group_cols = NULL,
  prefer_vendor_phasic = TRUE,
  amplitude_min = 0.01,
  recovery_fraction = 0.5,
  smooth_width = 1,
  min_peak_distance = 1
)
}
\arguments{
\item{data}{A data frame containing Gazepoint biometric rows.}

\item{signal_col}{Optional conductance-like signal column, typically
\code{GSR_US}. Used when \code{phasic_col} is absent or unavailable.}

\item{phasic_col}{Optional phasic EDA signal column, typically
\code{GSR_US_PHASIC}.}

\item{time_col}{Optional time/counter column. If \code{NULL}, common Gazepoint
time columns are detected automatically.}

\item{group_cols}{Optional grouping columns. If \code{NULL}, available
source/participant/media/trial-like columns are used.}

\item{prefer_vendor_phasic}{Logical. If \code{TRUE}, prefer \code{GSR_US_PHASIC} when
available.}

\item{amplitude_min}{Minimum trough-to-peak amplitude required for a detected
SCR.}

\item{recovery_fraction}{Fraction of the peak amplitude used to define
recovery. The default \code{.5} estimates half-recovery.}

\item{smooth_width}{Optional odd integer moving-average width. Use \code{1} for no
smoothing.}

\item{min_peak_distance}{Minimum distance, in rows, allowed between retained
candidate peaks within each group. The default \code{1} preserves all local
maxima. Larger values reduce repeated detection of closely spaced local
maxima within a sustained SCR-like response.}
}
\value{
A list with \code{overview}, \code{peaks}, \code{group_summary}, \code{signal_summary},
and \code{settings}.
}
\description{
Detects candidate skin conductance responses (SCRs) from Gazepoint EDA/GSR
signals. The helper prefers a phasic channel such as \code{GSR_US_PHASIC} when
available, and otherwise falls back to a conductance-like signal such as
\code{GSR_US}. It returns explicit onset, peak, amplitude, rise-time, and
recovery-time fields for downstream event-window summaries and statistical
modelling.
}
\details{
This is a conservative R-native peak detector. It is not a replacement for
full model-based EDA decomposition tools such as Ledalab, PsPM, or cvxEDA.
}
