Options

This module contains the configuration options for neural network models, including options for nodes, edges, integration, and visualization.

NetworkOptions Class

class farms_network.core.options.NetworkOptions(**kwargs)

Base class for neural network options

Attributes:

  • directed (bool): Whether the network is directed. Default is True.

  • multigraph (bool): Whether the network allows multiple edges between nodes. Default is False.

  • graph (dict): Graph properties (e.g., name). Default is {“name”: “”}.

  • units (optional): Units for the network. Default is None.

  • integration (IntegrationOptions): Options for numerical integration. Default values shown in the table below.

add_edge(options: EdgeOptions)

Add a node if it does not already exist in the list

add_edges(options: Iterable[EdgeOptions])

Add a collection of edges

add_node(options: NodeOptions)

Add a node if it does not already exist in the list

add_nodes(options: Iterable[NodeOptions])

Add a collection of nodes

classmethod from_options(kwargs)

From options

IntegrationOptions Class

class farms_network.core.options.IntegrationOptions(**kwargs)

Class to set the options for numerical integration

The default values for IntegrationOptions are as follows:

Parameter

Default Value

timestep

1e-3

integrator

"dopri5"

method

"adams"

atol

1e-12

rtol

1e-6

max_step

0.0

checks

True

classmethod defaults(**kwargs)
classmethod from_options(kwargs: Dict)

From options

NodeOptions Class

class farms_network.core.options.NodeOptions(**kwargs)

Base class for defining node options

Attributes:

classmethod from_options(kwargs: Dict)

Load from options

NodeParameterOptions Class

class farms_network.core.options.NodeParameterOptions

Base class for node specific parameters

The default values for NodeParameterOptions are as follows:

Parameter

Default Value

c_m

10.0 pF

g_leak

2.8 nS

e_leak

-60.0 mV

v_max

0.0 mV

v_thr

-50.0 mV

g_syn_e

10.0 nS

g_syn_i

10.0 nS

e_syn_e

-10.0 mV

e_syn_i

-75.0 mV

classmethod from_options(kwargs: Dict)

From options

NodeStateOptions Class

class farms_network.core.options.NodeStateOptions(**kwargs)

Base class for node specific state options

Attributes:

  • initial (list of float): Initial state values.

  • names (list of str): State variable names.

classmethod from_kwargs(**kwargs)

From node specific name-value kwargs

classmethod from_options(kwargs: Dict)

From options

EdgeOptions Class

class farms_network.core.options.EdgeOptions(**kwargs)

Base class for defining edge options between nodes

Attributes:

  • from_node (str): Source node of the edge.

  • to_node (str): Target node of the edge.

  • weight (float): Weight of the edge.

  • type (str): Edge type (e.g., excitatory, inhibitory).

classmethod from_options(kwargs: Dict)

From options

EdgeVisualOptions Class

class farms_network.core.options.EdgeVisualOptions(**kwargs)

Base class for edge visualization parameters

Attributes:

  • color (list of float): Color of the edge.

  • label (str): Label for the edge.

  • layer (str): Layer in which the edge is displayed.

classmethod from_options(kwargs: Dict)

From options

LIDannerParameterOptions Class

class farms_network.core.options.LIDannerParameterOptions(**kwargs)

Class to define the parameters of Leaky Integrator Danner node model.

Attributes:

c_m (float): Membrane capacitance (in pF). g_leak (float): Leak conductance (in nS). e_leak (float): Leak reversal potential (in mV). v_max (float): Maximum voltage (in mV). v_thr (float): Threshold voltage (in mV). g_syn_e (float): Excitatory synaptic conductance (in nS). g_syn_i (float): Inhibitory synaptic conductance (in nS). e_syn_e (float): Excitatory synaptic reversal potential (in mV). e_syn_i (float): Inhibitory synaptic reversal potential (in mV).

The default values for LIDannerParameterOptions are as follows:

Parameter

Default Value

c_m

10.0 pF

g_leak

2.8 nS

e_leak

-60.0 mV

v_max

0.0 mV

v_thr

-50.0 mV

g_syn_e

10.0 nS

g_syn_i

10.0 nS

e_syn_e

-10.0 mV

e_syn_i

-75.0 mV

classmethod defaults(**kwargs)

Get the default parameters for LI Danner Node model

LINaPDannerParameterOptions Class

class farms_network.core.options.LINaPDannerParameterOptions(**kwargs)

Class to define the parameters of Leaky integrator danner node model

The default values for LIDannerNaPParameterOptions are as follows:

Parameter

Default Value

c_m

10.0 pF

g_nap

4.5 nS

e_na

50.0 mV

v1_2_m

-40.0 mV

k_m

-6.0

v1_2_h

-45.0 mV

k_h

4.0

v1_2_t

-35.0 mV

k_t

15.0

g_leak

4.5 nS

e_leak

-62.5 mV

tau_0

80.0 ms

tau_max

160.0 ms

v_max

0.0 mV

v_thr

-50.0 mV

g_syn_e

10.0 nS

g_syn_i

10.0 nS

e_syn_e

-10.0 mV

e_syn_i

-75.0 mV

classmethod defaults(**kwargs)

Get the default parameters for LI NaP Danner Node model