Stim Files

While no universal standard exists, most stim files share a common row‑based, column‑delimited structure (e.g., tab‑separated or comma‑separated values). A representative example (visual search task):

| trial | condition | target_orientation | distractor_orientation | set_size | onset_ms | duration_ms | img_file | |-------|-----------|--------------------|------------------------|----------|----------|-------------|-------------------| | 1 | target | 45 | 135 | 8 | 0 | 200 | gratings/45deg.bmp| | 2 | distractor | - | 90 | 8 | 2500 | 200 | gratings/90deg.bmp| | 3 | catch | - | - | 0 | 5000 | 200 | blank.bmp |

Common columns include:

The process begins in a doctor’s office. Using a clinician programmer (a tablet-like device), the physician creates a "virtual stim file" by adjusting sliders for amplitude, frequency, and electrode selection while the patient provides real-time feedback ("Tell me when you feel it in your left foot").

The academic community has pushed for interoperability. Modern research stim files are often written in human-readable formats like JSON or XML with a schema like "Neurostimulation Markup Language (NSML)." An example snippet might look like: stim files


  "device_type": "TENS-Unit-Mk3",
  "amplitude_mA": 20.5,
  "pulse_width_us": 250,
  "frequency_hz": 100,
  "electrode_pair": "A-B",
  "duration_sec": 1800

These open stim files allow different laboratories to replicate experiments without being locked into a single hardware vendor.

[Draft for: Your Name / Institution]

Traditional stim files are static. New "adaptive stim files" contain a rule engine. For example:

IF (patient_accelerometer = "lying_down") THEN
    load_file("sleep_mode.stim")
    reduce_amplitude_by(20%)
ELSE IF (patient_heart_rate > 100bpm) THEN
    activate("burstdr.stim")

These dynamic files turn the implant from a passive device into an active, responsive therapeutic system. While no universal standard exists, most stim files

One of the biggest challenges in the field is fragmentation.

Pro Tip: If you are designing an experiment, prioritize closed-loop capable STIM files that record the actual delivered current, not just the intended current. Impedance changes can alter delivery. "device_type": "TENS-Unit-Mk3", "amplitude_mA": 20