this is the first thing i made with opus 4.7
check out this prompt
single file index.html w javascript, CORTEX OS — brain-computer interface command platform, threejs renderer w webgl2, 3D BRAIN VISUALIZER full anatomical brain model w hemisphere split toggle, cortical surface mesh w 68-region desikan-killiany atlas parcellation color-coded by function (motor/sensory/visual/auditory/prefrontal/temporal/parietal/occipital/limbic), transparent skull overlay toggle w opacity slider, exploded view mode (separate lobes float apart w labeled connectors showing white matter tracts), subcortical structure isolation viewer (hippocampus/amygdala/thalamus/hypothalamus/basal-ganglia/cerebellum/brainstem individually selectable w info panel showing function/connectivity/associated-pathologies), brodmann area overlay w numbered regions and click-to-highlight, white matter tractography streamlines rendered as fiber bundle tubes (arcuate-fasciculus/corpus-callosum/corticospinal-tract/cingulum/uncinate/superior-longitudinal) w directional color encoding (rgb=xyz), vascular overlay showing circle-of-willis and major cerebral arteries w blood flow velocity animation, ventricular system translucent blue fluid-filled cavities, spinal cord extension w cervical/thoracic/lumbar segment labels and nerve root branching, cranial nerve pathways (all 12) traced from brainstem to target organ, glymphatic system visualization w csf flow particle animation during sleep-state toggle, zoom from whole-brain → lobe → gyrus → cortical-column → individual-neuron-model w dendritic tree and axon terminal boutons and synaptic cleft detail — REAL-TIME EEG ENGINE 256-channel electrode array mapped to 10-20 extended montage positions displayed as interactive dots on 3d scalp surface, live waveform display w per-channel scrolling trace (configurable speed 10/25/50mm-per-sec, amplitude scale µV adjustable), montage selector (referential/bipolar-longitudinal/bipolar-transverse/average-reference/laplacian/custom-montage-builder), frequency band decomposition per channel displayed as stacked power bars (delta-0.5-4hz/theta-4-8hz/alpha-8-13hz/beta-13-30hz/gamma-30-100hz/high-gamma-100-200hz), real-time fft spectrogram w time-frequency heatmap per channel (color = power, x = time, y = frequency), topographic scalp maps (2d head projection w interpolated color gradient showing power distribution per band, animated at configurable refresh rate), coherence matrix heatmap showing phase synchronization between all channel pairs, source localization engine (eloreta/beamformer) projecting scalp signals onto cortical surface mesh in real-time w activation hotspot coloring, artifact detection system (eye-blink/muscle/electrode-pop/line-noise auto-flagged w red highlight and optional auto-rejection), independent component analysis (ica) decomposition viewer w component topomaps and time-courses for manual artifact removal, event-related potential (erp) averager w stimulus-locked epoch extraction and grand-average waveform overlay (p100/n170/p300/n400/p600 component markers), connectivity viewer (directed transfer function/granger causality/phase-locking-value) rendered as animated arrows between brain regions on 3d model w thickness=strength — NEURAL SIGNAL PROCESSING PIPELINE configurable filter chain: bandpass (butterworth/chebyshev/fir w order and cutoff sliders), notch filter (50/60hz w harmonics), adaptive filter for ecg artifact removal, common average reference, surface laplacian (current source density), hilbert transform for instantaneous amplitude/phase extraction, wavelet decomposition (morlet/haar/daubechies w scale selection), multitaper spectral estimation w confidence intervals, cross-frequency coupling detector (phase-amplitude coupling comodulogram w modulation index), spike detection threshold editor w refractory period setting and waveform template matching, spike sorting interface (pca feature space scatter plot w cluster boundaries, template waveform overlay, isi histogram, auto-merge/split clusters), continuous wavelet transform scalogram w ridge extraction, real-time signal quality impedance monitor per electrode w color-coded pass/warn/fail thresholds (green<5kΩ/yellow<10kΩ/red>10kΩ) — INTRACRANIAL RECORDING MODULE ecog/seeg electrode localization on patient-specific mri-reconstructed cortical mesh, electrode contact visualization as spheres on brain surface (ecog grids/strips) or depth probes (seeg shafts penetrating to target structures), stimulation mapping overlay (motor/language/sensory responses logged per contact w color-coded function), high-frequency oscillation detector (ripples-80-250hz/fast-ripples-250-500hz) w automated marking and rate-per-minute calculator for epileptogenic zone identification, seizure onset zone heatmap from ictal recordings, electrocortical stimulation controller (bipolar/monopolar, current-amplitude/pulse-width/frequency/train-duration/polarity configurable, safety-limits enforced w charge-density-calculator and afterdischarge-detector), cortico-cortical evoked potential (ccep) analyzer w n1/n2 peak measurement and effective connectivity mapping rendered as directed graph on brain model — BCI DECODER SYSTEM motor imagery classifier (left-hand/right-hand/feet/tongue) w real-time csp lda pipeline and confusion matrix display, p300 speller matrix (6x6 character grid w row-column flash highlighting, bayesian classifier w dynamic stopping, words-per-minute counter), ssvep frequency detector (multiple flickering stimuli at different frequencies, cca-based classification, information-transfer-rate calculator), neural cursor control (2d screen cursor driven by decoded motor cortex signals w kalman filter smoothing, click via threshold crossing or dwell time), speech decoder (attempted-speech neural patterns → phoneme classifier → word assembly w language model correction via anthropic, real-time text output w confidence bars per phoneme), emotion state classifier (valence/arousal from frontal-alpha-asymmetry and gamma power, displayed as position on 2d emotion circumplex wheel), attention level monitor (theta/beta ratio w focus score 0-100 and distraction alert), meditation depth tracker (alpha/theta crossover detection w depth staging), sleep stage classifier (wake/n1/n2/n3/rem w hypnogram timeline and automatic epoch scoring matching aasm criteria), fatigue detector (theta burst alpha dropout slow eye movement pattern → drowsiness alert w progressive warning levels), imagined movement trajectory decoder for robotic arm endpoint control (3d position grip force decoded from motor cortex ensemble w recurrent neural network), handwriting decoder (imagined pen strokes → character recognition from motor cortex patterns w sequence-to-sequence model) — NEUROSTIMULATION CONTROLLER transcranial direct current stimulation (tdcs) montage designer (anode/cathode placement on scalp w current flow simulation rendered as vector field on cortical surface using finite element model of head tissues — scalp/skull/csf/gray-matter/white-matter conductivity layers), transcranial magnetic stimulation (tms) coil positioning guide (figure-8/circular coil 3d model w induced electric field hotspot projected onto cortex, motor threshold calibration protocol w mep amplitude tracker), deep brain stimulation (dbs) lead visualization (electrode contacts within subthalamic-nucleus/globus-pallidus/vim-thalamus w volume-of-tissue-activated sphere rendering, impedance monitor, stimulation parameter optimizer w symptom-diary correlation), closed-loop stimulation engine (detect biomarker → trigger stimulation w configurable latency/threshold/refractory, event log w pre/post-stim signal comparison), responsive neurostimulation (rns) seizure detection algorithm tuner (bandpass-energy/line-length/area detector threshold adjustment w sensitivity/specificity tradeoff curve), vagus nerve stimulation (vns) parameter dashboard w duty cycle visualization and heart-rate-variability responder tracking, transcranial focused ultrasound (tfus) targeting interface (acoustic simulation through skull w focus point adjustment on 3d brain w pressure field contour overlay and thermal safety calculator), optogenetics control panel (light wavelength/intensity/pulse-pattern w opsin-expression-region overlay for preclinical research) — NEUROIMAGING FUSION import and overlay: mri t1/t2/flair volumes w slice viewer (axial/sagittal/coronal oblique reformat) and 3d surface reconstruction, fmri bold activation maps thresholded by t-statistic overlaid on anatomical w paradigm timeline, dti fractional-anisotropy/mean-diffusivity scalar maps w tractography seeding from roi, pet/spect tracer uptake maps (fdg-metabolic/amyloid/tau/dopamine-transporter) w suv ratio calculator and asymmetry index, meg sensor-level butterfly plot and source-localized activation on cortex, fnirs channel layout on scalp w oxyhemoglobin/deoxyhemoglobin time-courses and cortical projection, ct for electrode localization co-registered to mri w automated contact detection algorithm, ultrasound b-mode/doppler for transcranial window assessment, all modalities alignable via rigid/affine/nonlinear co-registration w landmark and surface matching — PATIENT MONITORING DASHBOARD vital signs strip (ecg w qt-interval/heart-rate-variability, spo2 pleth waveform, etco2 capnography, arterial-blood-pressure w systolic/diastolic/map, temperature core/peripheral, respiratory rate from impedance), consciousness monitors (bispectral-index/entropy/patient-state-index trend lines), intracranial pressure waveform w mean-icp and cerebral-perfusion-pressure calculation (cpp=map-icp) w lundberg-wave classifier (a-waves/b-waves/c-waves), brain tissue oxygenation (pbto2) trend w ischemic threshold alerts, cerebral blood flow monitor (thermal-diffusion/laser-doppler), microdialysis metabolite trends (glucose/lactate/pyruvate/glutamate/glycerol) w lactate-pyruvate-ratio alarm, multimodal trending panel (all parameters time-aligned on shared timeline w event markers for medications/interventions/clinical-notes), alarm management system w configurable thresholds per parameter and escalation tiers (advisory→warning→critical w distinct audio tones) — COGNITIVE ASSESSMENT SUITE automated neuropsych test battery: reaction time (simple/choice/go-no-go), n-back working memory (1-back through 4-back w adaptive difficulty), trail making test (a b variants w path visualization and time/error tracking), digit span (forward/backward/sequencing), stroop test (congruent/incongruent w interference score), flanker task (congruent/incongruent w conflict adaptation), iowa gambling task w deck selection history and net score curve, tower of london planning task w move-count optimizer, continuous performance test w omission/commission error rates and d-prime sensitivity, wisconsin card sort w perseverative error ratio, verbal fluency timer w ai transcription scoring via anthropic, clock drawing test w ai analysis of spatial accuracy from canvas input, all tests generating standardized z-scores benchmarked against age/education normative databases, longitudinal tracking w session-over-session trend charts and decline-detection alerts, ai-generated comprehensive neuropsych report summarizing performance patterns and suggesting clinical correlates via anthropic — RESEARCH & EXPERIMENTAL DESIGN stimulus presentation engine (visual/auditory/tactile timing w sub-millisecond precision scheduling via requestanimationframe web audio scheduling), paradigm builder (block/event-related/mixed design w isi/iti/jitter configuration and condition randomization/counterbalancing), trigger/event-marker system synced to neural recording (ttl-pulse-equivalent timestamp logging), online experiment monitor (trial-by-trial performance, running accuracy/rt, abort-if-criteria-not-met), data export (edf /bdf/gdf/mne-python-compatible/bids-formatted w metadata json sidecars), analysis script generator (ai produces python/matlab analysis pipeline code from natural language experiment description via anthropic), statistical module (parametric/nonparametric tests, cluster-based permutation testing for eeg topographic effects, mixed-effects models for repeated measures, bayesian estimation w credible intervals, multiple comparison correction fdr/bonferroni), publication figure generator (journal-quality svg erp waveforms/topomaps/spectrograms/bar-charts w apa-formatted labels and export at 300dpi) — NEUROPROSTHETICS INTERFACE robotic arm control panel (6-dof endpoint position gripper calibration w decoded-vs-intended trajectory overlay), exoskeleton gait controller (hip/knee/ankle joint angle decoded from motor cortex w gait phase state machine: stance/swing/heel-strike/toe-off and balance perturbation compensator), cochlear implant mapping interface (electrode-to-frequency assignment, threshold/comfort-level per channel, virtual-channel current steering visualization), retinal prosthesis phosphene map editor (electrode grid → perceived phosphene location/size/brightness mapping w camera-to-stimulation image processing pipeline preview), speech synthesizer output (decoded phonemes → articulatory synthesis w prosody control for pitch/rate/volume, voice identity selector), smart wheelchair navigation (decoded direction intent → obstacle avoidance path planning w lidar overlay on room map), bladder/bowel neuroprosthesis controller (sacral nerve stimulation timing w intravesical pressure feedback), functional electrical stimulation (fes) sequencer for paralyzed limb movement restoration (muscle group activation pattern timeline editor w fatigue-compensating intensity ramp) — AI NEURAL COPILOT always-on ai assistant via anthropic streaming: "explain this eeg pattern" → annotates waveform w differential diagnosis, "what's causing this artifact" → highlights source and suggests filter, "is this a seizure" → runs automated seizure detection and compares to learned patient baseline, "optimize my bci accuracy" → analyzes confusion matrix and suggests feature/channel modifications, "summarize today's session" → generates clinical note w key findings/metrics/recommendations, "predict seizure risk" → runs pretrained forecasting model on recent interictal features and outputs probability timeline, "compare this to last week" → overlays longitudinal metric trends, natural language query interface for database ("show all sessions where gamma power in left temporal exceeded threshold during speech task"), conversational onboarding that adapts interface complexity to user role (neurosurgeon/neurologist/researcher/technician/patient/caregiver) — UI FRAMEWORK primary layout: left panel = 3d brain (rotatable/zoomable), center = signal traces (scrollable/scalable), right = controls/parameters/analysis, bottom = timeline scrubber w event markers, all panels draggable/dockable/resizable/detachable-to-second-monitor, theme presets (surgical-theater-dark-w-green-accent/research-lab-light-w-blue-accent/patient-friendly-warm-w-large-fonts/high-contrast-accessibility), waveform color schemes (classic-black-bg-w-colored-traces/publication-white-bg-w-black-traces/colorblind-safe-palette), annotation system (click any timepoint on any signal to add timestamped note w category tag: seizure/artifact/stimulus/medication/clinical-event), session recording w full-state replay (rewind to any moment and see exact brain visualization signals cursor position), undo/redo w 200-step history, keyboard shortcut system (space=pause/play, scroll=gain, arrows=navigate-time, number-keys=montage-presets), touch-optimized mode for intraoperative tablet use w large buttons and swipe gestures, print-ready report generator compiling session summary/screenshots/metrics/ai-notes into formatted pdf, data encrypted at rest (aes-256) and in transit (tls 1.3), role-based access control (admin/clinician/researcher/readonly), hipaa-compliant audit logging w access trail per patient record, session autosave every 30 seconds to sqlite w point-in-time recovery, 100% csrf/xss/sqli hardened