Detects candidate skin conductance responses (SCRs) from Gazepoint EDA/GSR
signals. The helper prefers a phasic channel such as GSR_US_PHASIC when
available, and otherwise falls back to a conductance-like signal such as
GSR_US. It returns explicit onset, peak, amplitude, rise-time, and
recovery-time fields for downstream event-window summaries and statistical
modelling.
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
- data
A data frame containing Gazepoint biometric rows.
- signal_col
Optional conductance-like signal column, typically
GSR_US. Used whenphasic_colis absent or unavailable.- phasic_col
Optional phasic EDA signal column, typically
GSR_US_PHASIC.- time_col
Optional time/counter column. If
NULL, common Gazepoint time columns are detected automatically.- group_cols
Optional grouping columns. If
NULL, available source/participant/media/trial-like columns are used.- prefer_vendor_phasic
Logical. If
TRUE, preferGSR_US_PHASICwhen available.- amplitude_min
Minimum trough-to-peak amplitude required for a detected SCR.
- recovery_fraction
Fraction of the peak amplitude used to define recovery. The default
.5estimates half-recovery.- smooth_width
Optional odd integer moving-average width. Use
1for no smoothing.- min_peak_distance
Minimum distance, in rows, allowed between retained candidate peaks within each group. The default
1preserves all local maxima. Larger values reduce repeated detection of closely spaced local maxima within a sustained SCR-like response.
