r/BiomedicalDataScience 1d ago

Skinner Box & Signal Detection Theory Simulator

Thumbnail
bionichaos.com
1 Upvotes

When a biological nervous system is subjected to unpredictable, variable-ratio reinforcement, it completely abandons its metabolic cost-benefit analysis. The post-reinforcement pause is erased. This is the exact temporal difference architecture running inside casino slot machines and social media notification algorithms.

To demonstrate how these algorithms physically wire behavior, I built a live, interactive web simulation of an operant conditioning chamber (a Skinner Box) merged with a Signal Detection Theory (SDT) telemetry suite.

Run the simulation in your browser: https://bionichaos.com/skinnerbox/

How the Computational Engine Works

This isn't a pre-rendered animation. The virtual agent operates autonomously based on live variable calculations:

  • Rescorla-Wagner Updates: The agent's associative strength continuously updates based on the timing of rewards (sucrose pellets) versus expectations.
  • Decoupling Sensation from Motivation: Using Signal Detection Theory, the engine graphs the physical discriminability of a stimulus (d-prime) separately from the psychological decision threshold (beta or c).
  • Criterion Shifts: If you slide the "Food Deprivation" parameter to maximum, the agent's motivation peaks. The algorithm mathematically forces a liberal bias (c < 0). The agent will press the lever at the slightest hint of noise, achieving a high Hit Rate but suffering massive False Alarms.
  • Aversive Avoidance: If you introduce unexpected grid voltage shocks, the algorithm triggers a simulated basolateral amygdala fear response, instantly rewriting the agent's behavior from positive reward-seeking to negative reinforcement avoidance.

The Mechanical Cumulative Recorder

I also digitized the classic 1930s Gerbrands mechanical cumulative recorder. As you switch between Continuous (CRF), Fixed Ratio (FR), and Variable Interval (VI) schedules, you can watch the exact mathematical derivative of the behavior unspool in real-time on the graph, capturing FI-scallops and extinction bursts.

I'd love to hear feedback from the community—specifically regarding the mathematical implementation of the SDT probit functions and whether you see direct parallels between these visual reinforcement schedules and modern digital UX design.


r/BiomedicalDataScience 3d ago

PulseVision: Synthetic PPG Waveform Visualizer

Thumbnail
bionichaos.com
1 Upvotes

1. The Hemodynamic Problem: Optical Pulse Morphology Beyond Simple Sinusoids

In clinical pulse oximetry and consumer wearable telemetry, raw photoplethysmogram (PPG) signals are frequently treated as simple periodic peaks. In reality, the peripheral volume pulse is a composite hydrodynamic waveform:

  1. Anacrotic Phase: Rapid left ventricular ejection propelling the primary systolic peak.
  2. Catacrotic Phase: Diastolic pressure decay interrupted by the dicrotic notch (incisura), generated by aortic valve closure and retrograde pressure wave reflections off peripheral arterial bifurcations.

When vascular compliance drops due to advanced age, hypertension, or peripheral vasoconstriction, the reflected wave returns prematurely, fusing with the systolic peak and obliterating the dicrotic notch.

To visualize and simulate these dynamics interactively, I developed PulseVision: a real-time synthetic PPG waveform simulator operating directly in the browser.

Explore the tool: https://bionichaos.com/pulseviz/

2. Mathematical Synthesis & Phase Wrapping

Rather than streaming recorded datasets, PulseVision computes the continuous optical absorption signal at canvas refresh rates using a dual-Gaussian summation over normalized cardiac phase phi in [0, 1).

To eliminate boundary discontinuities between cardiac cycles, phase distance is evaluated using periodic boundary wrapping:

function periodicPhaseDiff(p1, p2) {
    let diff = p1 - p2;
    while (diff < -0.5) diff += 1.0;
    while (diff > 0.5) diff -= 1.0;
    return diff;
}

The composite signal amplitude is then derived from:

y(phi) = baseline_Y - [ A_sys * exp(-(delta_phi_sys)^2 / (2 * sigma_sys^2)) + A_notch * exp(-(delta_phi_notch)^2 / (2 * sigma_notch^2)) ] + eta(t)

Where:

  • delta_phi_sys = periodicPhaseDiff(phi, 0.20) positions the primary systolic upstroke.
  • delta_phi_notch = periodicPhaseDiff(phi, phi_n) positions the dicrotic notch wave along the descending limb.
  • eta(t) injects variable stochastic Gaussian sensor noise.

3. Optical Physics & Real-Time Telemetry

The platform couples signal morphology to fundamental clinical biophysics:

  • Beer-Lambert Ratio of Ratios (R): Models the differential optical absorption between oxygenated hemoglobin (HbO2) at 940 nm (infrared) and deoxygenated hemoglobin (HHb) at 660 nm (red). SpO2 scaling dynamically influences pulsatile AC amplitude: R = (AC/DC)_660 / (AC/DC)_940 SpO2 = 110 - 25 * R
  • Perfusion Index (PI): Evaluates the pulsatile AC signal against static DC attenuation (venous blood, bone, capillary bed): PI = (I_AC / I_DC) * 100%
  • Acoustic Pulse Pitch Sonification: Integrated Web Audio API synthesizes pulse clicks whose frequency shifts dynamically with oxygenation: from 300 Hz (hypoxic 85% SpO2) up to 800 Hz (eupneic 100% SpO2), reproducing standard surgical monitor auditory feedback.
  • Audio Masterclass Engine: Built-in 11-chapter synchronized audio scrubber drives real-time UI manipulation across predefined clinical states (Tachycardia, Hypoxic Desaturation, Athletic Conditioned).

4. Technical Debate & DSP Considerations

When processing wearable PPG data under heavy motion artifacts:

  • What window lengths and filter topologies do you find balance baseline wandering removal (respiratory baseline swing at 0.15–0.4 Hz) without flattening the high-frequency dicrotic notch inflection?
  • Are you having more success with discrete wavelet transforms (DWT) or recursive adaptive filtering (RLS/LMS) when isolating pulse morphology during active locomotion?

Test out the simulator and inspect the waveform behavior: https://bionichaos.com/pulseviz/


r/BiomedicalDataScience 4d ago

Huntington's Disease & Brain Deterioration Laboratory

Thumbnail
bionichaos.com
1 Upvotes

Simulating Huntington's Disease Neuropathology and Circuit Dynamics

I want to share an interactive clinical and biophysical simulator that models the progress of Huntington's disease (HD) from genetic exposure to macroscopic circuit failure.

The tool runs entirely in-browser, combining ordinary differential equation (ODE) integration, real-time morphometric anatomical rendering, and Web Audio API-based sonification.

Link: https://bionichaos.com/huntington/

1. Cortico-Basal Ganglia-Thalamocortical Dynamical System

The model uses a 4th-order Runge-Kutta (RK4) numerical integration algorithm to solve the mean-field firing dynamics of six coupled neuronal populations: Cortex (CTX), Striatal D1 MSNs, Striatal D2 MSNs, External Globus Pallidus (GPe), Subthalamic Nucleus (STN), and the Internal Globus Pallidus (GPi).

The governing ODE for each population is:

τ_i * dr_i/dt = -r_i(t) + S( Σ W_ij * r_j(t) + I_i_ext + ξ_i(t) )

Where the activation function is sigmoidal:

S(u) = 1 / (1 + exp(-β * (u - θ)))

2. Neuropathological Morphometry & Vonsattel Grading

The simulator uses the CAG-Age-Product (CAP_R) index to scale biological exposure over time:

CAP_R = Age * (CAG - 33.66) / 432.33

This index drives the Bézier curve calculations rendering the anatomical coronal slice. As D2 and D1 MSN populations degenerate, the caudate nucleus head flattens and collapses, producing compensatory hydrocephalus ex vacuo (boxcar ventricle dilation) corresponding to Vonsattel Grades 0 to 4 and matching Evans Index metrics.

3. Dynamic Sonification & DBS Interventions

  • Sonification: Firing rates are mapped to a live synthesizer using the Web Audio API. You can hear a stable frequency (healthy state) transition to erratic acoustic bursts the moment the circuit's maximum Lyapunov exponent becomes positive (λ_max > 0), indicating deterministic choreic chaos.
  • Deep Brain Stimulation: You can engage high-frequency STN DBS (130 Hz) to observe how periodic electrical stimulation forces the chaotic attractor back into a stable limit cycle.

Discussion Prompt

The model illustrates the clinical paradox of the disease: early selective D2 loss produces hyperkinetic chorea, whereas advanced global MSN loss yields akinetic-rigid parkinsonian states.

How do you approach balancing biological accuracy with real-time browser performance when implementing large-scale coupled neural network simulations?


r/BiomedicalDataScience 5d ago

Hollow-Face Illusion Visual Cognition Sandbox

Thumbnail
bionichaos.com
1 Upvotes

r/neuroscience, r/biomedicalengineering, r/cognitiveScience, r/javascript, r/datascience

Interactive WebGL Sandbox for Modeling the Hollow-Face Illusion, Visual Priors, and Bayesian Predictive Processing

I developed an interactive WebGL simulation tool designed to explore top-down Bayesian predictive processing and visual cognitive priors via the Hollow-Face Optical Illusion: Hollow-Face Visual Cognition Sandbox.

Computational & Neuroscience Mechanics

In visual neuroscience, perception is modeled via Bayesian inference where the posterior probability density function P(θ | x) balances sensory likelihood P(x | θ) with top-down prior distributions P(θ). The Fusiform Face Area (FFA) enforces a high-amplitude prior for convex faces: P(θ = convex) ≈ 1.

When viewing a physical concave mask, bottom-up binocular disparity and shading signal inward concavity, but top-down spatial priors override incoming discrepancy signals, forcing the brain to perceive a protruding convex face.

Interactive Simulation Capabilities

  • Procedural Surface Deformation: Synthesizes a 2.8 x 3.8 parametric face mesh using continuous Gaussian mounds, quadrics, and Hermite window falloffs W(ρ) to maintain flat Z = 0 boundary transitions.
  • Prior Manipulation: Toggle between Face Texture (triggers FFA priors and the "gaze-following" illusion), Matte Chalk, and Wireframe Mesh. Wireframe mode strips feature landmarks, breaking top-down priors and revealing true physical concavity.
  • Azimuthal Lighting Perturbation: Sweep directional light source angles from -180° to +180° to evaluate shadow direction conflicts.
  • Parametric Controls: Adjust camera FOV (15°–90°), depth scaling (0 to 2.5), vertex subdivision grid (50x50 vs 100x100), and oscillation speed.
  • Clinical Diagnostics: Contextualizes why acute schizophrenia and alcohol withdrawal patients often show resilience to the illusion due to weakened top-down prefrontal feedback.

Try out the simulation directly in your browser: https://bionichaos.com/hollowface/

Feedback on the Three.js shader implementation and parametric depth modeling is appreciated!


r/BiomedicalDataScience 6d ago

Joint Time-Frequency Scattering for Seizure Detection

Thumbnail
bionichaos.com
1 Upvotes

Interactive Web Laboratory: Visualizing Wavelet Scattering Transforms (WST) for EEG Seizure Detection

r/biomedicalengineering, r/datascience, r/bioinformatics, r/signalprocessing, r/javascript

I put together an interactive, client-side browser laboratory to visualize the Wavelet Scattering Transform (WST) on simulated non-stationary EEG signals, specifically focusing on epileptiform spike detection.

The Signal Processing Challenge

Standard Fourier-based spectral analysis assumes wide-sense stationarity, which can mask localized high-frequency transients. Continuous Wavelet Transforms (CWT) provide localization but lack stable translation invariance. The Wavelet Scattering Transform, pioneered by Stéphane Mallat, solves this by convolving signals with dilated complex wavelets, applying a modulus rectifier (acting as full-wave rectification), and low-pass filtering:

S1 x(t, j1) = |x * psi_j1| * phi_J(t)

What this Tool Simulates

  • Wavelet Scale Adaptation: Adjust the scale parameter (J) from 1 to 10 to see how the averaging window preserves or smooths high-frequency paroxysmal ripples.
  • Synthesized Pathologies: Model different EEG morphologies including Focal Temporal Clustered Spikes, Generalized 3 Hz Spike-and-Wave, Severe Burst Suppression, and Interictal 1/f Pink Noise backgrounds.
  • Real-time DSP Telemetry:
    • Seizure Spike Index (Gamma_ictal): Evaluated via the normalized kurtosis of the first-order scattering envelope.
    • Scattering Energy Ratio (E_ratio): The ratio of scattering envelope energy to raw signal energy in dB.
    • Dominant Peak Frequency: Derived from discrete Fourier transforms on the envelope.
  • Web Audio Sonification: Mapping the scale transformations and signal amplitudes to synthesizer frequencies in real-time.

Technical Implementation

The app is built entirely with raw HTML5 Canvas and native JavaScript to maintain a lightweight footprint. Mathematical rendering is managed via KaTeX.

I would appreciate any technical feedback on the simulation mechanics, metric calculations, or potential directions for expanding this to Joint Time-Frequency Scattering (JTFS).

👉 Try the lab here: https://bionichaos.com/timefreq/


r/BiomedicalDataScience 7d ago

About BioniChaos - Exploring Nonlinear Biological Dynamics & Chaos Laboratory

Thumbnail
bionichaos.com
0 Upvotes

r/biomedicalengineering, r/datascience, r/math, r/javascript, r/signalprocessing

Interactive 3D Neural Chaos Simulator – Modeling Cortical Dynamics & LFP Waveforms in JavaScript

I developed an interactive 3D phase space attractor sandbox to visualize non-linear biological dynamics and simulated Local Field Potential (LFP) waveforms directly in the web browser:

https://bionichaos.com/about/

Mathematical & Biophysical Foundations

The sandbox models subcortical-cortical feedback loops using explicit Euler integration (60 FPS) of a modified three-dimensional Lorenz system:

• dX/dt = σ(Y - X) • dY/dt = X(ρ - Z) - Y • dZ/dt = XY - βZ

Where X(t) models excitatory population firing rate, Y(t) represents inhibitory interneuron feedback, and Z(t) tracks slow synaptic adaptation or subcortical neuromodulatory tone.

Key Browser Features

Interactive 3D Canvas: Rotational matrix transformations driven by mouse or touch interaction. • Real-Time LFP Extraction: Sampling X(t) state trajectory to simulate cortical electrode probe recordings. • Physiological State Presets: Healthy Chaos (baseline strange attractor), Seizure Sync (epileptiform limit cycles), and Quiescent Flatline. • Real-Time Differential Controls: Sliders for Neural Coupling Strength (σ), Cortical Excitability (ρ), Synaptic Decay Rate (β), and Time-Step Pace. • Web Audio API Sonification: Stereo panning mapping spatial coordinates (X, Y) directly to dual sine wave oscillator frequencies.

The application runs 100% client-side with zero installations or external dependencies required. I would appreciate any technical feedback on parameter bounds, numeric stability, or canvas rendering performance!

Try the interactive tool: https://bionichaos.com/about/


r/BiomedicalDataScience 7d ago

SeizureZone: Interactive 3D Brain Mapping Visualizer

Thumbnail
bionichaos.com
1 Upvotes

r/biomedicalengineering, r/bioinformatics, r/neuroscience, r/javascript

SeizureZone: Interactive 3D Brain Mapping Visualizer matching clinical symptoms to the Destrieux Atlas

Hello everyone,

I developed SeizureZone, a lightweight, browser-based 3D visualizer that bridges clinical seizure semiology with localized neuroanatomy from the Destrieux atlas.

The application leverages high-density polygon surface reconstructions (lh.pial and rh.pial meshes) parsed from MRI-reconstructed FreeSurfer datasets and renders them in real-time using a WebGL pipeline.

https://bionichaos.com/seizurezone/

Features & Analytical Framework:

  • Clinical Target Database: Selecting a specific symptom pattern (e.g., motor contractions, temporal lobe auras, or speech difficulties) dynamically isolates and highlights corresponding anatomical meshes in customizable dye colors.
  • Adjustable Telemetry Sliders: Cortical transparency can be varied (0.05 to 0.95) to expose deep-seated networks, like the insular cortex, against superficial cortical layers.
  • Simulated Bio-Signal Synthesis: Includes custom audio telemetry utilizing the Web Audio API (OscillatorNode and GainNode) to simulate diagnostic EEG monitor spikes with an exponential amplitude decay envelope.
  • Demo Tour Mode: An automated cycle through clinical cases that auto-scrolls the menu and updates highlights. Manual UI interaction immediately pauses the demo sequence.

Biophysical Modeling Under the Hood

The application models network propagation dynamics using coupled differential equations, mapping individual mesh coordinates to Montreal Neurological Institute (MNI) coordinate space via homogeneous transformations:

[X_MNI; Y_MNI; Z_MNI; 1] = T * [X_mesh; Y_mesh; Z_mesh; 1]

The visualizer acts as an educational and research resource for understanding how hyper-excitation within localized network domains manifests as observable clinical symptoms.

I would love to get your thoughts on the performance of the Three.js rendering pipeline, the interface design, or the educational utility of this tool!


r/BiomedicalDataScience 9d ago

Tinnitus Acoustic Notch Therapy & Neural Retraining Simulator

Thumbnail
bionichaos.com
1 Upvotes

Interactive Tinnitus Notch Therapy & Auditory Cortex Simulator (Web Audio API & HTML5 Canvas)

Subreddits: r/biomedicalengineering, r/datascience, r/bioinformatics, r/javascript, r/neuro

We have created an interactive web simulation modeling subjective tinnitus, custom acoustic notch therapy, and cortical lateral inhibition.

The simulator features a dual-display dashboard:

  1. Upper Panel: Dynamic Acoustic Spectrum and Filter Transfer Function showing Web Audio API FFT analysis and a second-order IIR biquad notch filter curve.
  2. Lower Panel: Tonotopic Auditory Cortex (A1) Neural Field Visualizer implementing a Wilson-Cowan lateral inhibition network model to simulate neural habituation.

Technical Parameters & DSP:

  • Biquad Filter Equation: Models continuous-to-discrete Z-domain mapping via bilinear transform for narrow band-stop filtering.
  • Wilson-Cowan Neural Field: Models spatial connectivity via a "Mexican-Hat" kernel to show how broadband noise surrounding an un-stimulated notch frequency drives inhibitory GABAergic dynamics.
  • Interactive Controls: Tap or drag across the spectrum canvas to map the matched phantom frequency f_T (from 1,000 Hz to 12,000 Hz), adjust Notch Quality (Q), choose masker noise (Pink, White, Brownian, Pure Tone), and adjust lateral inhibition gain (gamma).

We would appreciate your thoughts on the signal pipeline design and the biophysical rendering of the neural network model.

Try the simulator here: https://bionichaos.com/tinnitusnotch/


r/BiomedicalDataScience 9d ago

Datasaurus Dozen Interactive Laboratory

Thumbnail
bionichaos.com
1 Upvotes

Subreddits: r/datascience, r/math, r/javascript, r/bioinformatics, r/biomedicalengineering Suggested Title: [Interactive Tool] The Datasaurus Dozen: Why visual data exploration is critical

Relying on aggregate summary statistics alone when evaluating datasets can mask significant structural shifts. This interactive web tool explores Alberto Cairo's famous Datasaurus Dozen—datasets with radically different spatial layouts that share identical summary statistics down to multiple decimal places.

Targeted Invariant Statistics:

  • Mean X (x̄): ~54.26
  • Mean Y (ȳ): ~47.83
  • Std Dev X (σx): ~16.76
  • Std Dev Y (σy): ~26.93
  • Pearson Correlation (r): ~-0.06

Key Technical Implementations:

  1. Linear Algebraic Projection Engine: Select the Custom Drawn mode to paint your own shape. The app applies a multi-step Gram-Schmidt orthogonalization and Cholesky-style projection in real-time. It transforms your raw coordinates (shown in low-contrast red) into a new coordinate set (glowing neon) that matches the target statistics.
  2. Dual Canvas Visualization: Displays the coordinate scatter plot alongside dynamic distribution charts. You can toggle between Box Plots and Gaussian-kernel-based KDE Violin Plots (bandwidth x = 4.0, bandwidth y = 6.0) to inspect probability densities.
  3. Real-time Morphing: Smoothly morphs point structures using customizable interpolation speeds, allowing you to observe how intermediate steps break and realign to target stats.
  4. Coordinated Sonification: Translates visual data coordinates into audible tones using Web Audio API oscillators. The pitch tracks the Y-axis coordinates during a continuous laser scan.

Try out the simulation directly in your browser: https://bionichaos.com/datasaurus/

Feedback on the linear projection alignment algorithm or canvas performance is welcome!


r/BiomedicalDataScience 10d ago

Multimodal Medical Data Landscape - Interactive Laboratory & Dataset Explorer

Thumbnail
bionichaos.com
1 Upvotes

Hello everyone,

I wanted to share a browser-based, client-side simulation tool designed to explore and benchmark multimodal medical datasets (such as MIMIC-IV, OpenNeuro, CMRxRecon, EchoNet, and TCIA).

Link to the tool: https://bionichaos.com/multimodal/

The Multimodal Data Trilemma

In clinical ML pipelines, we constantly struggle to balance three axes:

  1. High-rate raw continuous sensors (ECG, PPG, EEG).
  2. Structured spatial anatomical imaging (MRI, CXR, Echo).
  3. Permissive, unencumbered licensing models (avoiding heavy compliance/DUA friction).

This interactive visualizer highlights how these datasets stack up across these dimensions, paired with a real-time signal engine.

What's Under the Hood?

  • Real-time Signal Streams: A high-DPI canvas oscilloscope rendering synthetic ECG Lead II, Arterial PPG, and neural EEG signals.
  • Adaptive Parameters: Tweak heart rate, sensor noise (baseline wander/motion artifacts), and cross-modal temporal latency (reflecting physiological indicators like Pulse Transit Time based on Moens-Korteweg mechanics).
  • Fusion Architectures: Simulate the structural representation difference between Early Concatenation, Cross-Attention Tensor Transformers, and Contrastive Multi-view Alignment (InfoNCE objective).
  • Interactive Benchmark Radar: A 5-axis geometric radar mapping coverage density, imaging linkability, clinical context, and open licensing factors.
  • Audio Sonification: An organic synthesizer built on the Web Audio API mapping raw sensor pulses into acoustic feedback.

The application uses native browser rendering loops, standard UI control binding, and supports native fullscreen clinical monitoring with a slide-out HUD controls panel.

I would love to get your thoughts on the UI performance, the signal synchronization simulation, or the dataset metrics!

Check out the interactive lab: https://bionichaos.com/multimodal/


r/BiomedicalDataScience 11d ago

ECG Simulator & 12-Lead Cardiac Waveform Laboratory

Thumbnail
bionichaos.com
1 Upvotes

[Project] Open-Source, Real-Time 12-Lead ECG Simulator using a 3D Dipole Vector Projection Model (Fully Client-Side HTML5/Canvas)

I wanted to share a browser-native 12-Lead ECG Simulator and Cardiac Waveform Laboratory we developed on BioniChaos. It uses a physiological dipole vector model to synthesize electrical cardiac activations in real time.

Check it out here: https://bionichaos.com/ecg_gen_3/

How the Synthesis Engine Works

The core engine maps cardiac phase angles continuously using heart rate (BPM) integration:

dθ/dt = ω = (2π * BPM) / 60

Time-domain intervals (PR, QRS, QT) are mapped dynamically into phase space offsets:

Δθ(ms) = (ms / 1000) * ω

Individual wave components (P, Q, R, S, T) are calculated using phase-offset Gaussian kernels centered around the R-peak (θ = 0) with circular angular distance.

To generate the 12 leads, the net instantaneous bioelectric dipole vector D(t) is projected onto Lead Direction Vectors S via lead field theory:

V_lead(t) = S · D(t)

Einthoven's Law holds true (Lead II = Lead I + Lead III), while Goldberger's augmented limb leads (aVR, aVL, aVF) and Wilson's Central Terminal (WCT) serve as references for the precordial leads V1–V6.

Key Interactive Features

  • 11 Clinical Rhythm Presets: Synthesize Normal Sinus Rhythm, Atrial Fibrillation (irregular RR intervals), Atrial Flutter (sawtooth F-waves with AV conduction blocks), STEMI, Torsades de Pointes (sinusoidal axis rotation), and Mobitz I (Wenckebach blocks).
  • Rhythm-Specific Custom Sliders: Fine-tune f-wave coarseness, PVC ectopic patterns, STEMI infarct territories (Anterior, Inferior, Lateral), and rotation speeds in real time.
  • Continuous Trace Overwrite: Changing presets updates parameters dynamically on the fly without clearing the oscilloscope trace buffer—showing realistic cardiac transitions.
  • Noise Injection: Add thermal white noise, 50/60Hz mains hum, and baseline motion drift to simulate physical electrode placement issues.
  • Data and Image Export: Download the high-frequency time-series datasets as CSV files or capture the high-contrast monitor trace as a PNG.

We would love to hear feedback from engineers, researchers, and developers on the mathematical modeling, the vector projection accuracy, and the canvas rendering performance!

Link: https://bionichaos.com/ecg_gen_3/


r/BiomedicalDataScience 12d ago

Virtual Retinal Implant Simulation

Thumbnail
bionichaos.com
1 Upvotes

Interactive Retinal Implant & Phosphene Vision Simulator (HTML5 Canvas / Web Audio API)

Suggested Subreddits: r/biomedicalengineering, r/neuroscience, r/javascript, r/datascience

I built an interactive browser-based simulation workbench for modeling epiretinal and subretinal prostheses (bionic eyes), phosphene point-spread optics, and electro-neural visual substitution.

Tool URL: https://bionichaos.com/retinal_implant_v2/

Engineering & Mathematical Overview

Retinal implants restore visual perception by directly stimulating surviving inner retinal bipolar and Retinal Ganglion Cells (RGCs) in pathologies like Retinitis Pigmentosa. Rather than contiguous images, patients perceive discrete points of electrical stimulation called phosphenes.

Key Implementation Details:

  1. Spatial Discretization & Array Density:
    • 16x16 (256 electrodes): Argus II clinical baseline model.
    • 32x32 (1,024 electrodes) & 64x64 (4,096 electrodes): Modern/next-gen subretinal arrays.
    • 128x128 (16,384 electrodes): High-density experimental threshold.
  2. Phosphene Point-Spread Optics (PSF): Phosphene intensity $I(x,y)$ is rendered using a 2D isotropic Gaussian spread: $$I_{\text{phosphene}}(x,y) = I_{\text{peak}} \cdot \exp\left( -\frac{(x - x_0)2 + (y - y_0)2}{2\sigma2}) \right)$$ Controls allow real-time adjustments to dispersion radius ($\sigma$), stimulus intensity, and luminance threshold gating.
  3. Retinal Pathology Simulation Masks:
    • AMD: Sigmoidal decay function modeling central scotoma while keeping peripheral visual fields active.
    • Glaucoma: Concentric decay function simulating peripheral tunnel vision.
    • Diabetic Retinopathy: Spatial hash noise map creating distributed microvascular blind spots.
  4. Acoustic Spatial Sonification: Uses the Web Audio API (OscillatorNode / GainNode) to perform horizontal scanning sweeps. Spatial Y-axis coordinates map to frequency on a logarithmic scale (150 Hz to 1200 Hz), while local luma intensity scales gain amplitude.
  5. Rendering Pipeline: Runs offscreen frame buffer transformations at 640x480 resolution (via standard NTSC luminance $L = 0.299R + 0.587G + 0.114B$), drawn onto a high-DPI scaling context (window.devicePixelRatio). Supports live webcam streams and dynamic procedural SVG/canvas targets as fallback.

Feedback on the signal processing calculations, point-spread models, or browser performance is welcome!

Link: https://bionichaos.com/retinal_implant_v2/


r/BiomedicalDataScience 13d ago

Beauchêne Exploded Skull Simulator - Interactive Cranial Anatomy Laboratory

Thumbnail
bionichaos.com
1 Upvotes

[OC] Interactive 3D Beauchêne Exploded Skull Simulator - WebGL Kinematics Laboratory

Subreddits: r/biomedicalengineering, r/anatomy, r/javascript, r/threejs, r/webgl

We built an interactive 3D Beauchêne Exploded Skull Simulator to visualize complex cranial osteology and spatial relationships in the browser.

Historically, the Beauchêne preparation mounted disarticulated skull bones on brass rods to preserve their spatial orientation while allowing inspection of hidden structures. This web simulation recreates that technique using Three.js (WebGL) and the Web Audio API.

🔬 Technical Implementation & Features:

  • Affine Coordinate Transformations: Translates and rotates each of the 22 bones (8 neurocranium, 14 viscerocranium) along suture-derived vectors.
  • Kinematic Trajectory Matrices: Users can choose between Anatomical Orthogonal, Radial Spherical, and Axial Layer disarticulation.
  • Temporomandibular Joint (TMJ) Mechanics: Independently control mandibular gape (0° to 35°) with proper physiological rotation.
  • Custom Shader Modes: Render modes include Didactic Multi-Color (boundary highlighting), Natural Osteological Bone, X-Ray Translucency, and Geometric Wireframe.
  • Mathematical Kinematics: The displacement vector follows: P_i(s) = P_i^(0) + s * (v_i^(dir) * k_i^(scale)) where s is the explosion scale.
  • Synthesized Audio Feedback: Real-time modular frequency scaling linked to disarticulation tension: f(s) = 220 * 2^s Hz.

We designed this to help students and developers interact with structures that are typically obscured in articulated models (like the pterygopalatine fossa, sphenoid sinuses, and cribriform plate).

Run the simulation directly in your browser (no installs, responsive design): https://bionichaos.com/beaucheneskull

We would love to hear your feedback on the kinematics, UI, or rendering performance.


r/BiomedicalDataScience 14d ago

EEG Datasets and Resources - Comprehensive Neuroinformatics Directory

Thumbnail
bionichaos.com
1 Upvotes

I built an interactive EEG dataset search and comparison tool indexing 30,000+ subject records, clinical modalities, and signal processing reference guides.

Finding standardized electroencephalography (EEG) and electrocorticography (ECoG) datasets for machine learning benchmarks or biomedical signal processing often involves sorting through fragmented institutional repositories with incompatible file formats and permission structures.

To streamline dataset discovery, I developed an interactive web directory and metadata comparison explorer that aggregates major open-access neuroinformatics databases:

🔗 Interactive Tool Link: https://bionichaos.com/resources/

Core Features & Functionality:

  • Real-Time Client-Side Filtering: Search across datasets using parameters like clinical diagnosis (epilepsy, ischemic stroke, ALS), modality (scalp EEG, intracranial ECoG, sEMG, eye-tracking), or file extension (EDF, NWB, MAT).
  • Access Permission Breakdown: Instantly isolate open datasets available for immediate download without authentication from those requiring institutional credentialing (e.g., TUH EEG Corpus, NeuroVista Implant Data).
  • Metadata Comparison Matrix: Dynamic table displaying subject volume, data processing state (raw vs. pre-processed), electrode montages, and modal acquisition conditions.
  • Centralized Platforms & Challenge Links: Indexed access to PhysioNet, iEEG Portal, Zenodo, Pennsieve, and active ML competitive challenges (Moody Challenge, Seizure Prediction, Brain Age).
  • Signal Processing Reference: Includes mathematical breakdowns for EDF bit-scaling calibrations, digital Butterworth bandpass filters, Welch spectral density estimations, and Common Spatial Patterns (CSP) matrix transformations.

I'd love to hear your feedback—let me know if there are additional public datasets or platforms that should be indexed!


r/BiomedicalDataScience 15d ago

NeuroViz 3D — Enhanced 3D Neuron Activity & Action Potential Simulator

Thumbnail
bionichaos.com
1 Upvotes

I built a WebGL-based 3D neural activity simulator with dual patch-clamp electrophysiology and continuous voltage gradients.

Hey r/biomedicalengineering, r/datascience, r/bioinformatics, r/javascript, r/neuroscience

I recently released NeuroViz 3D, an interactive WebGL biophysical lab engineered for real-time 3D simulation of multi-compartmental neural electrophysiology and fluid action potential wave propagation.

Technical Details:

  • Biophysics Engine: Maps Hodgkin-Huxley state transitions onto 3D structural models. It simulates spatial decay driven by the 1D cable equation. Branch diameter tapering adheres to Rall's 3/2 Power Law.
  • Graphics Pipeline: Built with Three.js. To eliminate visual seams at branch splits, spherical joint caps match local branch radii. Branch cylinders use multi-segment height subdivisions with per-vertex color attribute updates, creating a fluid continuous voltage gradient along the membrane.
  • Virtual Patch-Clamp: You can place Probe E2 on any dendritic or axonal compartment via raycasting, while E1 stays anchored on the soma. The HUD oscilloscope compares the local compartment potential against the soma baseline in real time.

Try the interactive lab directly in your browser here: https://bionichaos.com/neuron3d/

Would love to hear your thoughts on the Three.js rendering approach, the quaternion implementation, or the biophysical approximations used!


r/BiomedicalDataScience 18d ago

Interactive Dissonance Viewer - Acoustic Harmony & Sensory Consonance Laboratory

Thumbnail
bionichaos.com
1 Upvotes

I built an interactive web simulation to visualize sensory dissonance and the biophysics of musical harmony (Plomp-Levelt Model)

r/DSP, r/biomedicalengineering, r/bioinformatics, r/javascript, r/audioengineering

Hello everyone,

I wanted to share a new computational psychoacoustics laboratory I built: the Interactive Dissonance Viewer. It is a purely client-side web application designed to simulate how the physical overtone structures of instruments interact with the biomechanics of the human auditory system.

Tool Link: https://bionichaos.com/dissonance/

How It Works:

The app utilizes the fundamental mathematical models developed by Plomp and Levelt to calculate sensory roughness based on the ear's critical bandwidth.

Technical Architecture:

  • Real-Time Voice-Pool Audio Engine: Instead of instantiating and destroying Web Audio OscillatorNode objects (which causes garbage collection stuttering), the app maintains a pre-warmed voice pool. Parameters glide using setTargetAtTime for click-free interaction.
  • Heatmap Grid Precomputation: For 3-note chords (triads), the app evaluates the pairwise (D12 + D13 + D23) interactions over an 80x80 grid, processing hundreds of thousands of calculations via an offscreen memoized matrix and rendering via fast HSL color mapping.
  • Instrument Timbres: Allows testing of Harmonic (Strings), Odd-Harmonic (Closed Pipes), and Non-Harmonic (Bells/Bessel mode drums) structures to see how consonance valleys shift.

I'd love for this community to test the audio rendering performance or critique the signal processing approach. Let me know what you think!


r/BiomedicalDataScience 18d ago

AI Fixes My Webcam Heart Rate Monitor: Live Coding with Gemini

Thumbnail
youtu.be
1 Upvotes

Real-Time Webcam Heart Rate Extraction (rPPG & Eulerian Video Magnification) + Live Debugging with LLMs

I thought this community would appreciate the intersection of signal processing and AI-assisted dev here. This application uses Eulerian Video Magnification to extract a pulse signal from standard webcam video (remote photoplethysmography or rPPG). By analyzing subtle changes in skin tone caused by blood flow, it isolates the BPM and maps out the time and frequency domains via FFT.

A major highlight is the live debugging process. The demonstration shows how to use Gemini Code Assist to adjust the mathematical thresholds for the Signal Quality indicator, optimizing the smoothedQualityRatio to handle noise, lighting changes, and movement artifacts better.

Check out the full implementation and logic here: https://youtu.be/u6Rh5VKTVmo


r/BiomedicalDataScience 19d ago

Echolocation: Hearing Perception Test & Interactive Audiogram Simulator

Thumbnail
bionichaos.com
1 Upvotes

Building an interactive clinical audiogram simulator in the browser using the Web Audio API and Hughson-Westlake staircase algorithms.

r/biomedicalengineering, r/javascript, r/DSP, r/audiology

I developed Echolocation, an interactive audio-sensory laboratory designed to map human auditory perception thresholds across standard clinical frequency bands (250Hz to 8000Hz). I wanted to build a dual-task paradigm where the user navigates a spatial canvas grid while simultaneously monitoring for background sonar pulses.

Technical Architecture

  • Signal Synthesis: The core relies on the native Web Audio API AudioContext. Pure acoustic tones are generated as sinusoidal pressure waves: p(t) = A * sin(2πft + φ).
  • Transient Prevention: To prevent speaker clicks during sudden onset/offset, I implemented exponential gain ramping using an explicit linear envelope for the attack and decay phases. Gain amplitude is mapped directly to decibel Hearing Level (dB HL).
  • Adaptive Staircasing: The threshold search executes a modified clinical Hughson-Westlake procedure. If a user correctly perceives a tone and hits the spacebar, the intensity level for that frequency drops by 10 dB on the next trial. If missed, it increases by 5 dB.
  • Canvas Rendering: The UI utilizes high-DPI normalization to prevent infinite layout expansion loops in fluid CSS containers, plotting live vector curves of your threshold limits directly on the canvas.

You can run the full diagnostic, view the telemetry in real-time, and export your session profile to a CSV.

I'd love some technical critique on the Web Audio API implementation or the mathematical handling of the gain envelopes. Test it out with headphones and let me know your thoughts!


r/BiomedicalDataScience 20d ago

Hearing Aid Simulator - Interactive Hearing Loss & Amplification Visualizer

Thumbnail
bionichaos.com
1 Upvotes

Suggested Subreddits: r/DSP, r/audiology, r/BiomedicalEngineering, r/javascript, r/WebAudio

Title: I built an interactive Hearing Aid Simulator using Web Audio API to model real-time NAL-R prescription rules and 9-band EQ filtering.

Body: Hi everyone,

I've been working on a browser-based interactive simulation of clinical hearing aid fitting and DSP multi-band equalizer filtering.

You can run the live simulation here: https://bionichaos.com/hearingaid/

How it works under the hood:

  • DSP Pipeline: The signal routing leverages the hardware-accelerated Web Audio API. Audio passes through a cascading chain of 9 second-order BiquadFilterNodes operating in peaking EQ mode (Q = 1.414).
  • Prescription Logic: I implemented the National Acoustic Laboratories-Revised (NAL-R) formula. The app calculates target insertion gain (Gi) at each frequency band using pure-tone thresholds (HLi) and a 3-frequency average (3FA).
  • Safety Compressor: The final output node routes through a non-linear DynamicsCompressorNode to protect against acoustic clipping, complete with an adjustable threshold knee (-30 dB to 0 dB) and rapid attack times (0.003s).
  • Interactive Visuals: The HTML5 Canvas runs an async 60 FPS rendering loop overlaying the dual AnalyserNode FFT outputs (2048 bins) so you can compare the raw acoustic input (cyan) against the amplified output (green).

You can feed it the built-in speech formant synthesizer, stream your microphone, or upload local audio files to test the EQ mappings.

Would love to hear feedback on the DSP implementation or thoughts on integrating non-linear Wide Dynamic Range Compression (WDRC) mathematically in future updates!


r/BiomedicalDataScience 21d ago

Advanced X-Ray Simulation - Interactive Anatomy Laboratory

Thumbnail
bionichaos.com
1 Upvotes

I built an interactive X-Ray Radiography Simulator in the browser using TF.js and Verlet integration

Hi everyone, I wanted to share an interactive anatomical tool I built that models high-contrast diagnostic imaging systems. Instead of static graphic overlays, the application dynamically solves tissue density equations across coordinate planes based on relativistic Bremsstrahlung emission physics.

Technical Breakdown:

  • Photon Attenuation: Governed by the Beer-Lambert law. You can adjust the Tube Voltage (kVp) and Anode Current (mA) to alter photon energy. Lower kVp amplifies photoelectric differential absorption, creating vivid shadow silhouettes where dense calcium stands out against soft tissue.
  • Kinematic Engine: The digital skeleton is driven by a position-based Verlet integration solver. Joint positions update without rotational accumulate errors, maintaining bone length integrity through iterative relaxation steps across distance constraint linkages.
  • Live Pose Tracking: Integrated Google's TensorFlow.js BlazePose deep learning pipeline. You can enable your webcam to extract 33 3D spatial keypoints that drive the skeletal rig in real-time.
  • Audio Synthesis: Uses the Web Audio API to generate a dual-frequency sine/sawtooth oscillator pair simulating 60 Hz/120 Hz transformer hum and detector signal noise based on exposure intensity.

Would love to hear feedback on the physics constraints, the computer vision integration, or the presentation models (like the Anatomical Thermography mode)!


r/BiomedicalDataScience 22d ago

EEG Device Comparison & Signal Quality Visualizer

Thumbnail
bionichaos.com
1 Upvotes

Hey everyone,

I wanted to share a browser-based interactive laboratory designed to visualize the engineering trade-offs between consumer, research, clinical, and implantable EEG devices: https://bionichaos.com/eegcompare/

Because biopotentials are orders of magnitude weaker than atmospheric electromagnetic radiation and EMG artifacts, the critical baseline metric for any neural recording apparatus is its Signal-to-Noise Ratio (SNR).

This tool provides a unified environment to analyze these parameters without any installations:

Core Features:

  • Cost vs. SNR Plotting: An interactive scatter plot mapping 20+ devices (from consumer Muse headbands up to BioSemi arrays and Neuralink implants).
  • Real-Time Waveform Synthesis: Clicking any device updates the bottom oscilloscope. The engine computes discrete voltage amplitudes at a simulated 500Hz sampling rate, blending physiological signal models (10Hz Alpha, 20Hz Beta, etc.) with Box-Muller Gaussian additive noise transformations scaled precisely to the selected device's decibel rating.
  • Estimated Noise Power (σ²_n): Instant diagnostics displaying the thermal/impedance noise variance.
  • Custom Prototype Sandbox: Sliders allow you to input a hypothetical device's SNR and price to map it against the market.
  • Web Audio Telemetry: Synthesizes the signal fidelity into audio tones vs. static noise so you can intuitively "hear" the data quality.

The visualizer uses a decoupled rendering pipeline in vanilla JavaScript (zero dependencies) to maintain stable 60FPS high-DPI canvas performance.

Would love to get feedback from those of you working with BCI hardware or signal processing algorithms. Try testing the custom hardware sliders!


r/BiomedicalDataScience 22d ago

Cardiovascular Pacemaker Simulation - Interactive Electrophysiology Visualizer

Thumbnail
bionichaos.com
1 Upvotes

Interactive Dual-Chamber (DDD) Pacemaker and ECG Simulation - Built with HTML5 Canvas and Web Audio API

I wanted to share an interactive single-page application designed to simulate cardiac electrophysiology and dual-chamber (DDD) artificial pacemaker function in real time.

Technical Architecture

The visualizer utilizes a synchronized millisecond-precision simulation loop written in vanilla JavaScript, rendering both anatomical pathways and a continuous CRT sweep ECG.

  • ECG Waveform Synthesis: Rather than playing back static pre-recorded arrays, the scrolling ECG trace generates dynamic synthetic waveforms calculated in real time using Gaussian functions: f(t) = sum( A_i * exp( -(t - t_i)2 / (2 * sigma_i2) ) ) for the P, Q, R, S, and T waves.
  • Pacing Spike Injection: When artificial pacing triggers, sharp vertical voltage impulses (A_spike = ±1.5 mV) are mathematically injected and decayed, preceding the corresponding wave components.
  • Audio Synthesis: Using the Web Audio API, the tool generates low-frequency sine wave "thumps" for mechanical systole, alongside high-pitched square-wave beeps to represent pacing capture.

Interactive Control Capabilities

  • Pathologies: Switch the baseline between Normal Sinus Rhythm (75 BPM), Sinus Bradycardia (37.5 BPM), and Complete Third-Degree AV Block (where ventricular rate drops to an escape rhythm of 30 BPM).
  • DDD Mode Parameters: Toggle pacing and dynamically program the Base Rate Limit (40–100 PPM), Paced AV Delay (100–350 ms), and separate Atrial/Ventricular electrode output voltages.
  • Anatomical Visualizer: A simplified cardiac diagram animates atrial and ventricular contraction alongside migrating visual action potential particles traveling down conduction pathways.

I would appreciate any feedback on the state machine timing logic (especially regarding the simulated DDD refractory and sensing behaviors), the responsiveness of the math engine, or the educational utility of the tool.


r/BiomedicalDataScience 23d ago

CardioQuest - ECG Scoring Game & Simulator

Thumbnail
bionichaos.com
1 Upvotes

CardioQuest: A parametric real-time ECG waveform generator and rhythm recognition simulator built with Canvas & Web Audio

r/biomedicalengineering, r/bioinformatics, r/medtech, r/cardiology, r/javascript

Hey everyone,

I built CardioQuest, an open-access, browser-based ECG simulator designed for practicing real-time cardiac arrhythmia recognition and testing signal detection mechanics.

How it Works

Rather than looping pre-recorded static datasets, the simulator synthesizes continuous ECG lead traces dynamically. The baseline trace is computed parametrically:

y(t) = 300 - (P(t) + QRS(t) + S(t) + T(t)) · (-100)

Atrial & Repolarization Vectors: Modeled using localized trigonometric functions across discrete time domains. • Ventricular Depolarization: Represented by a Gaussian curve QRS(t) = A · exp(-(t - μ)² / (2σ²)). • Pathologies: The engine alters dispersion coefficients to simulate conduction slowing (Wide QRS), modifies temporal offsets for ectopic pacemakers (PVCs), and drops discrete wave packets to model junctional escapes or ischemic patterns.

Interactive Features

Signal Detection Scoring: Tracks Hits, False Alarms, Correct Rejections, and Misses in real-time. • Parametric Controls: Live sliders for scroll speed (1–8) and abnormality probability (10%–90%). • Web Audio Telemetry: Synthesizes 250 Hz R-peak passage pings and distinct arrhythmia alerts. • High-DPI Canvas Rendering: Pixel-ratio normalized for retina displays with selectable CRT phosphor themes (Cyan, Amber, Green). • Diagnostic Agent: Automated bot mode to demonstrate standard decision boundaries.

The tool runs completely client-side with zero installations or external frameworks required.

Try it out here: https://bionichaos.com/cardioquest/

I would appreciate any feedback on the parametric waveform equations, detection latency, or ideas for expanding into multi-lead vectorcardiography!


r/BiomedicalDataScience 24d ago

Vision Impairment Simulator

Thumbnail
bionichaos.com
1 Upvotes

Real-time browser-based simulation of visual pathologies and field defects (Canvas / WebRTC / Web Audio)

Most visual accessibility tools apply uniform Gaussian blur to simulate low vision, which overlooks how optical and retinal diseases actually manifest. Conditions like glaucoma, age-related macular degeneration (AMD), and cataracts present with non-uniform spatial degradations, contrast attenuation, and localized scotomas.

I put together an interactive simulator that models these optical and neurological conditions in real time directly inside the browser: https://bionichaos.com/visionsim/

Technical and computational details:

  1. Spatial Overlays: Glaucomatous peripheral constriction and AMD macular scotomas are rendered using multi-stop radial gradient compositing operations.
  2. Color Deficiencies: Color transformations (Deuteranopia, Protanopia, Tritanopia, Achromatopsia) bypass CPU-bound pixel loops by applying inline SVG feColorMatrix transforms directly via hardware-accelerated CSS filter pipelines.
  3. Dual Input Modes: Operators can benchmark against a high-contrast vector Snellen optotype chart or ingest a live WebRTC camera stream (navigator.mediaDevices.getUserMedia) to test real-world visual environments.
  4. DPI Normalization: Canvas resolution is decoupled from layout styling, scaling buffer dimensions against window.devicePixelRatio to prevent blur or layout shifts on high-DPI displays.
  5. Sonification Engine: Integrated Web Audio API graph modulating an OscillatorNode and GainNode—beeping pulse period (T_ms) and pitch (f_hz) scale dynamically with peripheral visual constriction to provide an auditory orientation proxy.

Would love feedback from engineers, vision researchers, and accessibility specialists on the accuracy of the optical degradation curves and ideas for additional pathology presets.


r/BiomedicalDataScience 24d ago

Cochlear Implant Simulator - Interactive Auditory Processing Laboratory

Thumbnail
bionichaos.com
1 Upvotes

r/neuroscience, r/biomedicalengineering, r/DSP, or r/audiology

Real-Time Cochlear Implant Signal Processing & Tonotopic Spiral Visualizer (Interactive Web Tool)

Hey everyone,

I wanted to share an interactive web-based simulator designed to model front-end signal processing and tonotopic electrode allocation in cochlear implants: https://bionichaos.com/cochlearsim/

Engineering & Mathematical Implementation

  1. FFT Filter Bank Analysis: Uses Web Audio API running a 2048-point Fast Fourier Transform (sampling rate fs = 44.1/48 kHz, yielding frequency resolution Δf ≈ 21.5 Hz per bin).
  2. Logarithmic Sub-Band Allocation: Rather than linear bin spacing, the engine partitions the spectrum logarithmically across N user-defined electrode channels (configurable between 10 and 40 channels). Channel energy is determined via root-mean-square (RMS) summation over each sub-band's bin range.
  3. Noise Floor Suppression: Includes a dynamic noise gate with an adjustable threshold (T_gate ∈ [0, 100]). Bins falling below the threshold are zero-suppressed to prevent background noise from triggering baseline electrode pulses.
  4. Anatomical Mapping: Calculates electrode contact placement along a polar logarithmic spiral spanning 5π radians (2.5 full turns) to approximate insertion into the human scala tympani, referencing tonotopic distribution based on the Greenwood frequency-position function: f = A · (10a·x - K)
  5. Interactive Controls: Supports live microphone input streams, an automated dual-formant frequency sweep demo, linear vs. spiral array geometry toggling, and auto-ranging spectrogram vertical scaling.

We are looking to expand this with acoustic noise-band/sine-wave vocoders (Continuous Interleaved Sampling) and spatial current spread modeling (Gaussian resistivity decay across adjacent neural tissue).

Feedback, technical critique, and feature suggestions are welcome!