One function per paper panel in plos_suite.py; this notebook calls each one.
The warehouse root comes from CAMINOS_WAREHOUSE (default F:/warehouse/caminos).
Run this notebook with the suite folder as the working directory so import plos_suite resolves.
Verdicts are copied from the lane's RESULT files with their file:line.
Each panel cell shows its figure exactly once: display(fig) then plt.close(fig), so the executed notebook never double-displays.
import matplotlib.pyplot as plt
import os, sys
from pathlib import Path
WAREHOUSE = Path(os.environ.get("CAMINOS_WAREHOUSE", "F:/warehouse/caminos"))
if str(Path.cwd()) not in sys.path:
sys.path.insert(0, str(Path.cwd()))
import plos_suite as ps
print(WAREHOUSE)
The CAMINOS network of the PLoS paper written in the jaxfne grammar: Configuration → construct →
Model.simulate. The values come from the paper's Tables 1-2 (caminos_api.py, PORT_SPEC.md). This network
is the P6 replication of Fig 1, which passed through the jaxfne public API (RESULT_P6.md); Fig 1E below reads
those P6 runs. The other panels read the oracle runs (caminos_jax.py, the authors' model transcribed to JAX)
or the mean-field model. The cells below run 1 s of network time live.
import jaxfne as jtfne
import caminos_api as ca # the paper's constants (Tables 1-2)
import cellrep_suite as cs # raster plotting
p, seed = 0.04, 1 # connection probability (Fig 1 example), seed
Populations (8000 E, 750 PV, 750 SOM), the AdEx emitter and the two receptors.
cfg = (jtfne.Configuration()
.network(name="caminos", n=ca.N, cell_types={"E": ca.NE / ca.N, "PV": ca.NPV / ca.N, "SOM": ca.NSOM / ca.N})
.emitter(family="adex", adex_decay="euler", adex_step_order="default")
.mechanisms(name="ampa", kind="receptor", params={"tau_ms": ca.TAU_E_MS, "reversal_mV": ca.REV_E_MV})
.mechanisms(name="gaba", kind="receptor", params={"tau_ms": ca.TAU_I_MS, "reversal_mV": ca.REV_I_MV}))
Seven Bernoulli connection rules (E→E, E→PV, E→SOM, PV→E, PV→PV, SOM→E, SOM→PV) with the 2 ms delay, then the check that this network equals the one the P6 runs used.
for name, pre, post, weight_nS, receptor in ca.RULES:
cfg = cfg.connections(name=name, source={"cell_type": pre}, target={"cell_type": post},
probability=p, weight=weight_nS, mechanism=receptor,
delay_ms=ca.DELAY_MS, sampling="bernoulli")
cfg = cfg.connectivity(edge_seed=seed)
assert cfg == ca.build_spec(p, seed), "the network must equal the one the P6 runs used"
Construct the model and simulate 1 s with the Poisson drive (p·NE sources at 4 Hz onto E and PV).
model = jtfne.construct(cfg)
sim = jtfne.Simulation(duration_ms=1000.0, dt_ms=ca.DT_MS, poisson_drive=ca.drive_spec(p, seed))
signals = model.simulate(sim)
fig = cs.core_run_figure(signals.spikes, (ca.NE, ca.NPV, ca.NSOM),
"jaxfne core run: p 0.04, seed 1 (last 0.5 s of 1 s)", source="live run in this notebook")
display(fig)
plt.close(fig)
Claim: the mean field oscillates near 35 Hz with PV leading SOM by about 7 ms and rates ordered PV > SOM > E.
Verdict: pass (frequency 4 % low; PV > SOM > E; delay 7.8 ms against about 7) — artifacts/etudes/papers/caminos/RESULT_MEANFIELD.md:37.
fig = ps.fig_plos_1d()
display(fig)
plt.close(fig)
Claim: about 40 Hz; PV leads SOM by 4 ms.
Verdict: pass (port 37.33 Hz; PV leads SOM by 4.06 ms, E by 5.80 ms) — artifacts/etudes/papers/caminos/RESULT_MEANFIELD.md:12.
fig = ps.fig_plos_6a()
display(fig)
plt.close(fig)
Claim: on the red line Q_SOM->PV = 0.6 Q_SOM->E − 0.35 the mode is a pure oscillation; above it damped, below it growing.
Verdict: pass (the same three regimes at Q_SOM->E 2, 4, 6, offset 0.5) — artifacts/etudes/papers/caminos/RESULT_MEANFIELD.md:13.
fig = ps.fig_plos_6b()
display(fig)
plt.close(fig)
Claim: left, damped below Q_PV->SOM = 220/59, a positive real eigenvalue above; right, damping grows with Q_SOM->SOM.
Verdict: pass (damped at 3.719, positive real at 3.739; Re −9.00 to −58.29 1/s) — artifacts/etudes/papers/caminos/RESULT_MEANFIELD.md:14-15.
fig = ps.fig_plos_6c()
display(fig)
plt.close(fig)
Claim: the oscillation ends near 0.7 nS of added PV→SOM and near 1.7 nS of added SOM→SOM (0-3 nS sweeps, the other coupling at 0).
Verdict: PV→SOM agrees with the figure reading (last oscillating 0.7 nS, first stable 0.8); SOM→SOM ends early with the printed T_v form (1.3 / 1.4 nS); the declared code-form variant (tv_form="code") gives SOM→SOM 1.6 / 1.7 nS, PV→SOM 0.7 (borderline) / 0.8 nS and 35.0 Hz — artifacts/etudes/papers/caminos/RESULT_MEANFIELD.md:72.
fig = ps.fig_plos_5a(WAREHOUSE / "plos_text" / "fig5a_sweep_8516c721.json")
display(fig)
plt.close(fig)
Claim: oscillations appear above a critical connection probability p; asynchronous below it.
Verdict: PASS under v7; no seed oscillates at p = 0.02 and all seeds oscillate from p = 0.04 — artifacts/etudes/papers/caminos/RESULT_P3.md:2, RESULT_P3.md:38.
fig = ps.fig_plos_1e(WAREHOUSE / "p6_scored_v2") # P6: the jaxfne public-API runs
display(fig)
plt.close(fig)
Claims: PV silencing lowers the frequency (stars) and raises the maximum E rate (pass); larger oscillation amplitude (fail: rises at 90 % only); seizure-like regime beyond 70 % (partial: transition between 40 and 60 %).
Verdicts: artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:38-41.
fig = ps.fig_plos_2a(WAREHOUSE / "figP_out/p2a/silence_pv.json")
display(fig)
plt.close(fig)
Claims: SOM silencing lowers the amplitude progressively (fail: band power 1.00–1.30); frequency rises slightly, far less than under PV silencing (pass in direction, +26 % past tolerance).
Verdicts: artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:42-43.
fig = ps.fig_plos_2b(WAREHOUSE / "figP_out/p2b/silence_som.json")
display(fig)
plt.close(fig)
Claim: PV randomization is qualitatively like PV silencing.
Verdict: pass (f_pk 23.7, 10.4 Hz; max E 312.8 Hz at 90 %) — artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:44.
fig = ps.fig_plos_3a(WAREHOUSE / "figP_out/p3a/replace_pv.json")
display(fig)
plt.close(fig)
Claims: SOM randomization is qualitatively like SOM silencing (pass); silencing or randomizing SOM abolishes rhythmic activity (fail: band power at least 1.0 at 90 %).
Verdicts: artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:45-46.
fig = ps.fig_plos_3b(WAREHOUSE / "figP_out/p3b/replace_som.json")
display(fig)
plt.close(fig)
Claims: higher SOM/PV lowers the frequency (pass); higher SOM/PV raises the amplitude (partial: rises to ratio 2; ratio 4 enters a high-rate state).
Verdicts: artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:47-48.
fig = ps.fig_plos_4a(WAREHOUSE / "figP_out/p4a/fig6a.json")
display(fig)
plt.close(fig)
Claims: higher SOM/PV lowers the frequency and raises the amplitude.
Verdict: both hold in both T_v forms from ratio 0.75 to 4 (printed 38.5 to 12.5 Hz, amplitude 0.31 to 9.54 Hz); at 0.5 the mean field is at a stable fixed point while the network oscillates — artifacts/etudes/papers/caminos/RESULT_MEANFIELD.md:89.
fig = ps.fig_plos_4a_meanfield(WAREHOUSE / "plos_text" / "fig4a_sweep_b0ea3f66.json")
display(fig)
plt.close(fig)
Claim: mean field and network agree in mean rate and frequency.
Verdict: fail (rates e 0.32–0.55; f 26.7 vs 20.0 Hz) — artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:91-92.
fig = ps.fig_plos_2c(WAREHOUSE / "plosr_7f7a660e")
display(fig)
plt.close(fig)
Claim: amplitude falls while staying above zero.
Verdict: partial (band power 1.18 not below 1; mean-field E amplitude below baseline) — artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:93-94.
fig = ps.fig_plos_2d(WAREHOUSE / "plosr_7f7a660e")
display(fig)
plt.close(fig)
Claim: seizure-like, E at the inverse refractory period, mean field at a fixed point there.
Verdict: partial (network E 18.2× baseline; mean field cycles at 10 Hz, not a fixed point) — artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:95-96.
fig = ps.fig_plos_2e(WAREHOUSE / "plosr_7f7a660e")
display(fig)
plt.close(fig)
Claim: amplitude reduced.
Verdict: pass (band power 0.996; mean-field E amplitude 0 vs 1.19 Hz) — artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:97-98.
fig = ps.fig_plos_2f(WAREHOUSE / "plosr_7f7a660e")
display(fig)
plt.close(fig)
Claim: like PV silencing at the same fraction.
Verdict: pass (f_pk 0.70, band 0.49 against 2C 0.79, 0.87, same directions) — artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:100.
Mean field (top row): 20 Hz against 33.5 Hz at baseline, E peak-to-peak up to 3.42 Hz, as PV silencing — RESULT_PLOS_FIGS.md:156, :161.
fig = ps.fig_plos_3c(WAREHOUSE / "plosr_7f7a660e", mf_dir=WAREHOUSE / "plosr_mf_e7a2ab7c")
display(fig)
plt.close(fig)
Claim: like SOM silencing at the same fraction.
Verdict: pass (f_pk 1.01, band 1.21 against 2D 1.09, 1.18) — artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:101.
Mean field (top row): no oscillation, a fixed point (E 1.32 Hz) — RESULT_PLOS_FIGS.md:158, :161-163.
fig = ps.fig_plos_3d(WAREHOUSE / "plosr_7f7a660e", mf_dir=WAREHOUSE / "plosr_mf_e7a2ab7c")
display(fig)
plt.close(fig)
Claim: like PV silencing at 90 %, seizure-like on the network.
Verdict: partial (moves as 2E; network E 8.1× baseline, below the 10× bar) — artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:102-103.
Mean field (top row): E 7.20 Hz mean, peak-to-peak 38.68 Hz at 8 Hz — RESULT_PLOS_FIGS.md:157.
fig = ps.fig_plos_3e(WAREHOUSE / "plosr_7f7a660e", mf_dir=WAREHOUSE / "plosr_mf_e7a2ab7c")
display(fig)
plt.close(fig)
Claim: like SOM silencing at 90 %.
Verdict: fail (band power 1.27 against 2F 0.996, opposite directions) — artifacts/etudes/papers/caminos/RESULT_PLOS_FIGS.md:104.
Mean field (top row): no oscillation, a fixed point (E 1.19 Hz), the paper's claim; the network keeps gamma — RESULT_PLOS_FIGS.md:159, :161-163.
fig = ps.fig_plos_3f(WAREHOUSE / "plosr_7f7a660e", mf_dir=WAREHOUSE / "plosr_mf_e7a2ab7c")
display(fig)
plt.close(fig)