snnlab.lang
Complete API reference for lang, including exports and every declared module API.
Author graph structure, readouts, training and simulation recipes; compile them into deterministic data bundles. Creating declarations does not simulate or train a network.
Imports
from snnlab import langPackage exports
| Export | Defined in / value | Role |
|---|---|---|
AMPA | lang.core | re-export |
BackgroundChannel | lang.simulation | re-export |
Bundle | lang.compiler | re-export |
COBA_LIF | lang.core | re-export |
CellDistribution | lang.simulation | re-export |
ConductanceBackground | lang.simulation | re-export |
ConductanceSchedule | lang.simulation | re-export |
Constant | lang.core | re-export |
CorrelatedPoissonAfferents | lang.simulation | re-export |
Diagnostic | lang.compiler | re-export |
GABA | lang.core | re-export |
GlobalShotNoise | lang.simulation | re-export |
GroupedShotNoise | lang.simulation | re-export |
Hz | lang.core | re-export |
LIF | lang.core | re-export |
LeakyIntegrator | lang.core | re-export |
LowerClampedNormal | lang.core | re-export |
Modulatory | lang.core | re-export |
Network | lang.core | re-export |
NonNegative | lang.core | re-export |
Normal | lang.core | re-export |
ParameterRef | lang.core | re-export |
Population | lang.core | re-export |
Projection | lang.core | re-export |
Quantity | lang.core | re-export |
ShotNoise | lang.simulation | re-export |
Signal | lang.core | re-export |
SignedNormal | lang.core | re-export |
SimulationSpec | lang.simulation | re-export |
StationaryRateWeather | lang.simulation | re-export |
StructuredPoisson | lang.simulation | re-export |
TrainSpec | lang.training | re-export |
TransientAfferentWave | lang.simulation | re-export |
Uniform | lang.core | re-export |
Zeros | lang.core | re-export |
__version__ | '0.2.0' | Component format version; distinct from the combined distribution version. |
compile | lang.compiler | re-export |
components | lang.components | module |
diagram | lang.diagram | re-export |
load_bundle | lang.compiler | re-export |
mV | lang.core | re-export |
ms | lang.core | re-export |
nS | lang.core | re-export |
ops | lang.ops | module |
readouts | lang.readouts | module |
simulation | lang.simulation | module |
training | lang.training | module |
uS | lang.core | re-export |
validate_graph | lang.compiler | re-export |
Modules
| Module | Responsibility |
|---|---|
| lang.compiler | Validation, canonical serialisation, bundle I/O, and reports. |
| lang.components | Reusable authoring functions; components expand before serialisation. |
| lang.core | Authoring objects are mutable until compilation. Signal shapes use explicit axis names such as time and batch. Projection weights use uS; neuron and synapse factories produce data specifications, not running models. Factory keyword arguments are serialized into the specification and validated when the graph is compiled. Use the compiler and graph executor capability checks before assuming a specification is executable. |
| lang.diagram | Lower snnlang bundle semantics into renderer-neutral diagrams. |
| lang.ops | Small serialisable operation vocabulary. |
| lang.readouts | Readout factories expand into ordinary network populations, projections and operations. They mutate the source network and return a Readout handle rather than computing scores immediately. The Readout forwards attribute lookup to its Signal. |
| lang.simulation | Simulation recipes describe structured spike sources, background conductances, rate weather, afferent waves and schedules. compile(simulation=...) stores a graph-bound simulation.json. These records do not produce samples until realized by the simulator. |
| lang.training | Training declarations are serialized by compile(training=...). They specify objectives, parameter scope, optimizer and gradient rules; concrete datasets, targets and execution ordering remain request inputs. |
Coverage and conventions
This reference includes every top-level non-private function and class, module-owned constant/type alias, declared public method/property, constructor and relevant protocol special method in the modules above. Data-class constructor fields include local inheritance. Third-party inherited APIs belong to their own libraries; underscore-prefixed implementation helpers are excluded. Imported standard-library and third-party names are not snnlab APIs.
Source docstrings are reproduced as text to preserve their parameter notes, examples, equations and formatting. Explicit exceptions are extracted from the implementation; indirect exceptions can also propagate. Expand the implementation panels for complete branch behavior, especially where legacy code has no annotations.
Regenerate with python3.12 docs/scripts/generate_api.py; --check fails if source-derived reference pages drift. Authored explanatory notes live in docs/scripts/api_notes.json.