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:
name (str): Name of the node.
model (str): Node model type.
parameters (
NodeParameterOptions
): Node-specific parameters.state (
NodeStateOptions
): Node state options.
- 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
pFg_leak
2.8
nSe_leak
-60.0
mVv_max
0.0
mVv_thr
-50.0
mVg_syn_e
10.0
nSg_syn_i
10.0
nSe_syn_e
-10.0
mVe_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¶
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
pFg_leak
2.8
nSe_leak
-60.0
mVv_max
0.0
mVv_thr
-50.0
mVg_syn_e
10.0
nSg_syn_i
10.0
nSe_syn_e
-10.0
mVe_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
pFg_nap
4.5
nSe_na
50.0
mVv1_2_m
-40.0
mVk_m
-6.0
v1_2_h
-45.0
mVk_h
4.0
v1_2_t
-35.0
mVk_t
15.0
g_leak
4.5
nSe_leak
-62.5
mVtau_0
80.0
mstau_max
160.0
msv_max
0.0
mVv_thr
-50.0
mVg_syn_e
10.0
nSg_syn_i
10.0
nSe_syn_e
-10.0
mVe_syn_i
-75.0
mV- classmethod defaults(**kwargs)¶
Get the default parameters for LI NaP Danner Node model