Fork the consciousness, or download the project and create your own.

Connectome Atlas: data contract and species adapter

Connectome Atlas: data contract and species adapter

This console renders any complete connectome as a chaptered narrative. The fly (MaleCNS v1.0) is the reference implementation. A new species needs only the asset files below, built by a loader plugin in the site’s pipeline (scripts/connectome/ in this repository), and a chapter list in console.js.

Asset contract (public/data/connectomes//)

File Format Contents
meta.json JSON vocabularies (region, superclass, class), grid dims, cell size, simulation config, regionBounds per region, neuronFormat: 2
stats.json JSON every number the page quotes, recomputed by the pipeline
neurons.bin 32 B/neuron bodyId u32, inDeg u32, outDeg u32, posNeuropil u16 x3 (dominant-region mean synapse site; falls back to soma), posSoma u16 x3 (annotated cell-body location), superIdx u8, classIdx u8, signCode u8 (1 exc, 2 inh), regionIdx u8 (255 = none), stageIdx u8 (1 retina, 2 optic, 3 central, 4 descending, 5 VNC, 0 other), hasNeuropil u8, hasSoma u8, pad u8
names.bin u16 length + utf8, per neuron instance names, same order as neurons.bin
matrix.bin 10 B/edge uint32 pre, uint32 post, uint16 weight; the display edge set (weight threshold in stats.json)
cloud.bin 9 B/cell x,y,z u16 (grid), density u8, regionIdx u16; quantized synapse-site density
wiring.bin 10 B/edge strongest edges of the simulation graph, strongest first, for line rendering
sim_*.bin 6 B/spike uint16 step, uint32 neuron; baked spike rasters per stimulus

Adding a species

  1. Build the assets with a loader plugin (see build_male_cns_assets.py for the fly; the worm needs its own reader for the WormWiring tables).
  2. Add a chapters definition in console.js (or a species def file following the same shape): each chapter declares needs (which assets it uses), caption, draw, optional info and explains.
  3. Register the species in the page’s roster and in _data if the species table on the page is data-driven.

Rules that hold for every species: every number recomputed from the released files; simulation is a documented graph traversal, never quoted as biology; assets stay under ~25 MB per species; canvas only, no three.js.

Console renderer levels

  • L0 (zoom 1-2.5): accumulation density cloud, tone-mapped logarithmically.
  • L1 (2.5-10): discrete site dots, exposure compensated with zoom.
  • L2 (10+): individual neurons as clickable shapes (excitatory/inhibitory), name labels when uncrowded, wiring lines, fire cascade.