API reference#

Modules#

jaxley.Compartment

A single compartment.

jaxley.Branch

A branch made up of one or multiple compartments (without branchpoints).

jaxley.Cell

A cell made up of one or multiple branches (with branchpoints).

jaxley.Network

A network made up of multiple cells, connected by synapses.

Simulation#

jaxley.integrate

Solves ODE and simulates neuron model.

jaxley.integrate.build_init_and_step_fn

Return init_fn and step_fn which initialize modules and run update steps.

jaxley.utils.dynamics.build_dynamic_state_utils

Return functions which extract the dynamic (ODE) states of a jx.Module.

Morphologies#

jaxley.read_swc

Reads SWC file into a Cell.

jaxley.morphology.distance_direct

Returns the direct distance between a root and other compartments.

jaxley.morphology.distance_pathwise

Returns the pathwise distance between a root and other compartments.

jaxley.morphology.morph_delete

Deletes part of a morphology.

jaxley.morphology.morph_connect

Combines two morphologies into a single cell.

Channels#

jaxley.channels.Channel

Channel base class.

jaxley.channels.HH

Hodgkin-Huxley channel based on Sterratt, Graham, Gillies & Einevoll.

jaxley.channels.Na

Sodium channel based on Sterratt, Graham, Gillies & Einevoll.

jaxley.channels.K

Potassium channel based on Sterratt, Graham, Gillies & Einevoll.

jaxley.channels.Leak

Leak channel.

jaxley.channels.Izhikevich

Izhikevich neuron model.

jaxley.channels.Rate

Rate-based, unit-less, neuron model.

jaxley.channels.Fire

Mechanism to reset the voltage when it crosses a threshold.

Pumps#

jaxley.pumps.Pump

Pump base class.

jaxley.pumps.CaFaradayConcentrationChange

Update the intracellular calcium ion concentration depending on calcium current.

jaxley.pumps.CaNernstReversal

Compute Calcium reversal from inner and outer concentration of calcium.

jaxley.pumps.CaPump

Calcium dynamics based on Destexhe et al. 1994.

Synapses#

jaxley.synapses.Synapse

Base class for a synapse.

jaxley.synapses.CurrentSynapse

A current-based synapse.

jaxley.synapses.ConductanceSynapse

A conductance based synapse.

jaxley.synapses.DynamicSynapse

A state-based synapse with fixed time constant.

jaxley.synapses.IonotropicSynapse

A state-based synapse with voltage dependent time constant.

jaxley.synapses.SpikeSynapse

Synapse to be used in networks of LIF neurons.

jaxley.synapses.AlphaSynapse

Alpha synapse which responds to binary pre-synaptic spike trains.

Connectivity#

jaxley.connect.connect

Connect specific compartments of a network with a synapse.

jaxley.connect.connectivity_matrix_connect

Connect cells of a network with synapses via a boolean connectivity matrix.

jaxley.connect.fully_connect

Fully (densely) connect cells of a network with synapses.

jaxley.connect.sparse_connect

Sparsely connect cells of a network with synapses.

Optimization#

jaxley.optimize.transforms.SigmoidTransform

Sigmoid transformation.

jaxley.optimize.transforms.SoftplusTransform

Softplus transformation.

jaxley.optimize.transforms.NegSoftplusTransform

Negative softplus transformation.

jaxley.optimize.transforms.AffineTransform

jaxley.optimize.transforms.ChainTransform

Chaining together multiple transformations

jaxley.optimize.transforms.MaskedTransform

jaxley.optimize.transforms.CustomTransform

Custom transformation.

jaxley.optimize.optimizer.TypeOptimizer

optax wrapper which allows different argument values for different params.

Graph backend#

jaxley.io.graph.to_swc_graph

Read a SWC file and return a SWC graph via networkX.

jaxley.io.graph.build_compartment_graph

Return a networkX graph that indicates the compartment structure.

jaxley.io.graph.vis_compartment_graph

Visualize a compartment graph.

jaxley.io.graph.from_graph

Return a Jaxley module from a compartmentalized networkX graph.

jaxley.modules.base.to_graph

Export a jx.Module as a networkX compartment graph.

Utilities#

jaxley.solver_gate.save_exp

Clip the input to a maximum value and return its exponential.

jaxley.solver_gate.solve_gate_implicit

jaxley.solver_gate.solve_gate_exponential

jaxley.solver_gate.exponential_euler

An exact solver for the linear dynamical system dx = -(x - x_inf) / x_tau.

jaxley.solver_gate.heaviside

Compute the heaviside step function with a custom derivative.