Skip to content
Back to skills

Neuro Phase Locked Stim Eval

ASecurity

Design and evaluate brain-state- or phase-dependent closed-loop stimulation (phase-locked TMS, tACS, auditory stimulation during sleep slow waves, DBS triggered on beta bursts, real-time Hilbert, AR forward prediction, ecHT). Use whenever the user estimates oscillation phase in real time, triggers stimulation at a target phase or on bursts, or needs to know how accurate the timing really was.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 13, 2026
ai-agents

Security analysis

A100/100

Scanned November 13, 2026

npx -y skills add Hillock-NeuroTech/neurotech-skills --skill neuro-phase-locked-stim-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Neuro Phase Locked Stim Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Neuro Phase Locked Stim Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hillock-neurotech-neuro-phase-locked-stim-eval/badge)](https://www.skillsdirectory.com/skills/hillock-neurotech-neuro-phase-locked-stim-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: neuro-phase-locked-stim-eval
description: Design and evaluate brain-state- or phase-dependent closed-loop stimulation (phase-locked TMS, tACS, auditory stimulation during sleep slow waves, DBS triggered on beta bursts, real-time Hilbert, AR forward prediction, ecHT). Use whenever the user estimates oscillation phase in real time, triggers stimulation at a target phase or on bursts, or needs to know how accurate the timing really was.
---

# Phase-locked stimulation: estimate, trigger, verify

Real-time phase estimates are noisy because the filter and Hilbert
transform need future samples. Every system must be evaluated against the
phase computed offline with full data, at the moments it actually fired.

## 1. Choose an estimator

| Method | Idea | Notes |
|---|---|---|
| AR forward prediction | band-pass a past window, fit an autoregressive model, predict ahead, take phase at "now" | used for phase-triggered TMS (Zrenner et al. 2018) |
| Educated temporal prediction | learn the typical cycle length per person, extrapolate from the last peak | simple, fast (Shirinpour et al. 2020) |
| Endpoint-corrected Hilbert (ecHT) | causal Hilbert with end-point correction | low latency (Schreglmann et al. 2021) |
| Threshold / peak detection | trigger on slow-wave down-states or burst amplitude | sleep and beta-burst paradigms |

Fix the target band per participant from a resting baseline (individual
peak frequency) and include a minimum amplitude gate: phase is undefined
when the oscillation is weak.

## 2. Evaluate against offline ground truth

1. Record the raw signal and every trigger time.
2. Offline, compute the "true" phase with a zero-phase band-pass and
   Hilbert on the full recording.
3. Stimulation artifacts corrupt the data right after a pulse, so take
   ground truth from sham or catch triggers (estimator fires, no pulse), or
   from data before the artifact with care.
4. Report the circular mean phase error, the resultant vector length
   (consistency), the fraction of triggers within +/-30 or +/-45 degrees of
   target, and how accuracy depends on amplitude (SNR).

## 3. Timing chain

Add the hardware delay from decision to pulse (stimulator trigger latency)
and compensate it in the prediction horizon; measure it with a loopback.
A 10 Hz rhythm moves 3.6 degrees per millisecond.

## 4. Report

Target band and phase, estimator and parameters, amplitude gate, number of
real and sham triggers, phase error mean and spread, consistency, accuracy
vs amplitude, and the measured hardware delay.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.