Skip to content

EDA, GSR and SCR example

Use this route when you have a conductance waveform and want an auditable path from channel inspection to decomposition and candidate skin-conductance responses. The example uses bundled synthetic/public demonstration data.

What this example does

Inspect EDA qualityCheck missingness, range, activity, and whether the signal is usable before decomposition.
Separate tonic and phasic structureApply an explicit decomposition rather than treating the raw waveform as an event series.
Detect candidate responsesUse declared threshold and peak-distance settings.
Keep visual evidenceInspect decomposition, event placement, and time-frequency behavior before summarising.

Run it

import gpbiometricspy as gp

dat = (
    gp.load_kiosk_demo(participants=["synthetic_kiosk_p001"])
    .copy()
    .iloc[:1800]
    .reset_index(drop=True)
)

quality = gp.audit_gazepoint_gsr_quality(dat, value_column="GSR_US")

scr = gp.detect_gazepoint_scr_events(
    dat,
    phasic_col="GSR_US_PHASIC",
    signal_col="GSR_US",
    time_col="TIME",
    group_cols=["participant_id"],
    threshold=0.02,
    min_peak_distance=30,
)

fig = gp.plot_gazepoint_scr_events(
    dat,
    scr["events"],
    time_col="TIME",
    signal_col="GSR_US",
    phasic_col="GSR_US_PHASIC",
    group_cols=["participant_id"],
    title="Detected SCR events",
)

For a separate decomposition step:

decomposition = gp.decompose_gazepoint_eda(
    dat,
    signal_col="GSR_US",
    time_col="TIME",
    group_cols=["participant_id"],
    window_size=31,
)

Read the outputs

EDA time-frequency diagnostic

The EDA-gram is a diagnostic view of slower electrodermal dynamics. It does not convert spectral power into a psychological label.

Checks before using event summaries

  • Confirm the conductance units and whether the export is raw or already transformed.
  • Quantify missingness and flatline behavior.
  • Confirm the observed timebase before interpreting response latency.
  • Report decomposition and detection settings.
  • Inspect sensitivity to thresholds or windows when conclusions depend on candidate response counts.
  • Keep excluded intervals or participants traceable to explicit QC evidence.

Scientific boundary

EDA/SCR processing describes electrodermal measurements and detected waveform features. It does not by itself identify emotion, stress, arousal, preference, deception, diagnosis, or causal responses to a stimulus.

Continue