Neurodamus Sub-Modules¶
neurodamus.node¶
Classes
Holds and manages populations and associated nodes and edges |
|
- class neurodamus.node.CircuitManager¶
Holds and manages populations and associated nodes and edges
All nodes must have a name or read from sonata pop name As so, Sonata is preferred when using multiple node files
- all_node_managers()¶
- all_synapse_managers()¶
- get_create_edge_manager(conn_type, source, destination, src_target, manager_args=(), **kw)¶
- get_edge_manager(source, destination, conn_type=<class 'neurodamus.connection_manager.SynapseRuleManager'>)¶
- get_edge_managers(source, destination)¶
- get_node_manager(name)¶
- get_population_offsets()¶
- get_virtual_population_offsets()¶
- has_population(pop_name)¶
- initialized()¶
- new_node_manager(circuit, target_manager, run_conf, *, load_balancer=None, **kwargs)¶
- static new_node_manager_bare(circuit: CircuitConfig, target_manager, run_conf, **kwargs)¶
- classmethod read_population_offsets(file_path=None)¶
Read population offsets from populations_offset.dat
- register_node_manager(cell_manager)¶
- unalias_pop_keys(source, destination)¶
Un-alias population names
- static write_population_offsets(pop_offsets, alias_pop, virtual_pop_offsets)¶
Write population_offsets where appropriate
It is needed for retrieving population offsets for reporting and replay at restore time.
Format population name::gid offset::population alias The virtual population offset is also written for synapse replay in restore. The data comes from outside because pop_offsets are not initialized in a restore scenario.
- class neurodamus.node.METypeEngine¶
- CellManagerCls¶
alias of
CellDistributor
- CircuitPrecedence = 0¶
Precedence influences instantiation order. The lower the earlier setup
- ConnectionTypes = {ConnectionTypes.Exp2Syn: <class 'neurodamus.allen_point.Exp2SynSynapseRuleManager'>, ConnectionTypes.GapJunction: <class 'neurodamus.gap_junction.GapJunctionManager'>, ConnectionTypes.NeuroModulation: <class 'neurodamus.neuromodulation_manager.NeuroModulationManager'>, ConnectionTypes.Synaptic: <class 'neurodamus.connection_manager.SynapseRuleManager'>, None: <class 'neurodamus.connection_manager.SynapseRuleManager'>}¶
A dict of the new connection types and associated Manager class
- InnerConnectivityCls¶
alias of
SynapseRuleManager
neurodamus.target_manager¶
Classes
|
|
|
Implements reading Sonata Nodesets |
|
Represents a subset of nodes defined in a node_sets.json file. |
|
Serializes the sections of a cell for easier random access. |
|
List of target points (TPoint) in a neuron. |
- class neurodamus.target_manager.NodeSetReader(config_nodeset_file, simulation_nodesets_file)¶
Implements reading Sonata Nodesets
- property names¶
- read_nodeset(nodeset_name: str)¶
Build node sets capable of offsetting. The empty population has a special meaning in Sonata, it matches all populations in simulation
- register_node_file(node_file)¶
- class neurodamus.target_manager.NodesetTarget(name, nodesets: list[SelectionNodeSet], local_nodes=None, **_kw)¶
Represents a subset of nodes defined in a node_sets.json file.
A NodesetTarget is constructed based on key-value pairs from the node_sets.json file, where each key defines an object containing a group of nodes. Nodes in a target can be selected from one or more populations, and they are internally organized into nodesets based on their respective populations.
Example: Given populations:
`python populations = { "pop_A": [0, 1, 2], "pop_B": [1000, 1001], "pop_C": [2000, 2001, 2002] } `A target could look like:`python target = [0, 1, 1000, 1001] `Internally, NodesetTarget would organize these nodes into:`python nodesets = [ SelectionNodeSet([0, 1]), SelectionNodeSet([1000, 1001]) ] `- append_nodeset(nodeset: SelectionNodeSet)¶
Add a nodeset to the current target
- contains(items, raw_gids=False)¶
Return a bool or an array of bool’s whether the elements are contained
- generate_subtargets(n_parts)¶
Generate sub NodeSetTarget per population for multi-cycle runs :returns: list of [sub_target_n_pop1, sub_target_n_pop2, …]
- get_local_gids(raw_gids=False)¶
Return the list of target gids in this rank (with offset)
- get_point_list(cell_manager, section_type: Sections = <Sections.soma: 0>, compartment_type: Compartments = <Compartments.center: 0>, section_local_ids: list[int] | None = None) List[TargetPointList]¶
Return TargetPointLists for selected compartments of all local cells.
Sections are filtered by section_type and optionally by section_names. For each section, either the center (0.5) or all segment positions are included depending on compartment_type.
- Parameters:
cell_manager – cell manager providing access to cells.
section_type – section category to extract.
compartment_type – center or all segments.
section_local_ids – optional list of section local idxs. i.e.: soma[3] -> 3. It needs to be strictly increasing. It cannot be in conjunction with section_type.all since indexing does not coincide in that way
- Returns:
List of TargetPointList per local cell with section ids and positions.
- get_point_list_from_compartment_set(cell_manager, compartment_set) List[TargetPointList]¶
Builds a list of points grouped by GID from a compartment set, mapping sections and offsets for each relevant population.
Note
The compartment locations in compartment_set are expected to be sorted and without duplicates. This is ensured by libsonata.
- gid_count()¶
Total number of nodes
- gids(raw_gids)¶
Return GIDs from a libsonata.Selection possibly made by a union of libsonata.Selections.
- intersects(other)¶
Check if two targets intersect. At least one common population has to intersect
- is_void()¶
- make_subtarget(pop_name)¶
A nodeset subtarget contains only one given population
- max_gid_count_per_population()¶
Max number of nodes per population
Useful to distribute in multicycle runs
- property population_names¶
- property populations¶
- update_local_nodes(local_nodes)¶
Allows setting the local gids
- class neurodamus.target_manager.SerializedSections(cell)¶
Serializes the sections of a cell for easier random access. Note that this is possible because the v field in the section has been assigned an integer corresponding to the target index as read from the morphology file.
- exception neurodamus.target_manager.TargetError¶
A Exception class specific to data error with targets and nodesets
- class neurodamus.target_manager.TargetManager(run_conf)¶
- clear_simulation_data()¶
- classmethod create_global_target()¶
- get_compartment_set(name: str)¶
- get_target(target_spec: TargetSpec | str, target_pop=None)¶
Retrieves a target from any .target file or Sonata nodeset files.
Targets are generic groups of cells not necessarily restricted to a population. When retrieved from the source files they can be cached. Targets retrieved from Sonata nodesets keep a reference to all Sonata node datasets and can be asked for a sub-target of a specific population.
- gid_to_sections(gid)¶
For a given gid, return a list of section references stored for random access. If the list does not exist, it is built and stored for future use.
- Parameters:
gid – GID of the cell
- Returns:
SerializedSections object with SectionRefs to every section in the cell
- intersecting(target1_spec: TargetSpec, target2_spec: TargetSpec)¶
Checks whether two targets intersect
- load_targets(circuit)¶
Provided that the circuit location is known and whether a nodes file has been specified, load any target files. Note that these will be moved into a TargetManager after the cells have been distributed, instantiated, and potentially split.
- location_to_point(gid, isec, ipt, offset)¶
Given a location for a cell, section id, segment id, and offset into the segment, create a list containing a section reference to there.
- Parameters:
gid – GID of the cell
isec – Section index
ipt – Distance to start of segment
offset – Offset distance beyond the ipt (microns)
- Returns:
List with 1 item, where the synapse should go
- pathways_overlap(conn1, conn2, equal_only=False)¶
- register_cell_manager(cell_manager)¶
- register_local_nodes(local_nodes)¶
Registers the local nodes so that targets can be scoped to current rank
- register_target(target)¶
- class neurodamus.target_manager.TargetPointList(gid: int)¶
List of target points (TPoint) in a neuron.
- Each TPoint is defined by a triplet: (gid, sec_ref, x) where:
gid: neuron identifier sec_ref: reference to the section x (in [0, 1]): offset along the section
The object keeps also track of the respective section_ids for convenience since there is no easy way to find the section id from its reference.
Maintains parallel lists of section IDs, section references, and offsets, with methods to append, extend, validate, and iterate over the stored points.
- append(section_id: int, section: object, point: float) None¶
- extend(other: TargetPointList) None¶
- validate() None¶
- class neurodamus.target_manager.TargetSpec(target_name: str | None, population_name: str | None)¶
Definition of a new-style target, accounting for multipopulation
- GLOBAL_TARGET_NAME = '_ALL_'¶
- disjoint_populations(other)¶
- overlap(other)¶
Are these target specs bound to overlap? If not, they still might be overlap, but Target gids need to be inspected
- overlap_byname(other)¶
- property simple_name¶
neurodamus.stimulus_manager¶
Implements coupling artificial stimulus into simulation
New Stimulus classes must be registered, using the appropriate decorator. Also, when instantiated by the framework, __init__ is passed three arguments (1) target_points (2) stim_info: dict (3) cell_manager. Example
>>> @StimulusManager.register_type
>>> class ShotNoise:
>>>
>>> def __init__(self, target_points, stim_info: dict, cell_manager):
>>> for point in target_points:
>>> gid = point.gid
>>> cell = cell_manager.get_cell(gid)
Classes
|
A manager for synaptic artificial Stimulus. |
|
Barebones stimulus class |
|
Ornstein-Uhlenbeck process, injected as current or conductance |
|
Ornstein-Uhlenbeck process, injected as current or conductance, relative to cell threshold current or inverse input resistance |
|
ShotNoise stimulus handler implementing Poisson shot noise with bi-exponential response and gamma-distributed amplitudes |
|
RelativeShotNoise stimulus handler, same as ShotNoise but parameters relative to cell threshold current or inverse input resistance |
|
AbsoluteShotNoise stimulus handler, same as ShotNoise but parameters from given mean and std. |
|
Injects a linear current ramp. |
|
Injects a constant step with a cell's hyperpolarizing current. |
|
Injects a linear current ramp relative to cell threshold. |
|
Injects a current step at some percent below a cell's threshold. |
|
Inject a noisy (gaussian) current step, relative to cell threshold or not. |
|
Inject a pulse train with given amplitude, frequency and width. |
|
Inject a sinusoidal current with given amplitude and frequency. |
|
Apply a single electrode voltage clamp. |
|
Inject a spatially-uniform, temporally-oscillating extracellular potential field. |
- class neurodamus.stimulus_manager.AbsoluteShotNoise(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
AbsoluteShotNoise stimulus handler, same as ShotNoise but parameters from given mean and std. dev.
- IsNoise = True¶
- compute_parameters(cell)¶
- parse_check_stim_parameters(stim_info: dict)¶
Parse parameters for AbsoluteShotNoise stimulus
- class neurodamus.stimulus_manager.BaseStim(_target_points: list[TargetPointList], stim_info: dict, _cell_manager)¶
Barebones stimulus class
- IsNoise = False¶
- class neurodamus.stimulus_manager.Hyperpolarizing(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
Injects a constant step with a cell’s hyperpolarizing current.
- compute_parameters(cell)¶
- static parse_check_all_parameters(_stim_info: dict)¶
- class neurodamus.stimulus_manager.Linear(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
Injects a linear current ramp.
- compute_parameters(cell)¶
- parse_check_all_parameters(stim_info: dict)¶
- class neurodamus.stimulus_manager.Noise(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
Inject a noisy (gaussian) current step, relative to cell threshold or not.
- IsNoise = True¶
- compute_parameters(cell)¶
- draw_already_used_numbers(rng, dt)¶
- parse_check_all_parameters(stim_info: dict)¶
- stim_count = 0¶
- class neurodamus.stimulus_manager.OrnsteinUhlenbeck(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
Ornstein-Uhlenbeck process, injected as current or conductance
- IsNoise = True¶
- compute_parameters(cell)¶
- parse_check_all_parameters(stim_info: dict)¶
- parse_check_stim_parameters(stim_info)¶
- stim_count = 0¶
- class neurodamus.stimulus_manager.Pulse(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
Inject a pulse train with given amplitude, frequency and width.
- parse_check_all_parameters(stim_info: dict)¶
- class neurodamus.stimulus_manager.RelativeLinear(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
Injects a linear current ramp relative to cell threshold.
- compute_parameters(cell)¶
- parse_check_all_parameters(stim_info: dict)¶
- class neurodamus.stimulus_manager.RelativeOrnsteinUhlenbeck(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
Ornstein-Uhlenbeck process, injected as current or conductance, relative to cell threshold current or inverse input resistance
- IsNoise = True¶
- compute_parameters(cell)¶
- parse_check_stim_parameters(stim_info)¶
- class neurodamus.stimulus_manager.RelativeShotNoise(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
RelativeShotNoise stimulus handler, same as ShotNoise but parameters relative to cell threshold current or inverse input resistance
- IsNoise = True¶
- compute_parameters(cell)¶
- parse_check_stim_parameters(stim_info: dict)¶
Parse parameters for RelativeShotNoise stimulus
- class neurodamus.stimulus_manager.SEClamp(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
Apply a single electrode voltage clamp.
- parse_check_all_parameters(stim_info: dict)¶
- class neurodamus.stimulus_manager.ShotNoise(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
ShotNoise stimulus handler implementing Poisson shot noise with bi-exponential response and gamma-distributed amplitudes
- IsNoise = True¶
- compute_parameters(cell)¶
- params_from_mean_sd(mean, sd)¶
Compute bi-exponential shot noise parameters from desired mean and std. dev. of signal.
Analytical result derived from a generalization of Campbell’s theorem present in Rice, S.O., “Mathematical Analysis of Random Noise”, BSTJ 23, 3 Jul 1944.
- parse_check_all_parameters(stim_info: dict)¶
- parse_check_stim_parameters(stim_info: dict)¶
Parse parameters for ShotNoise stimulus
- stim_count = 0¶
- class neurodamus.stimulus_manager.Sinusoidal(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
Inject a sinusoidal current with given amplitude and frequency.
- parse_check_all_parameters(stim_info: dict)¶
- class neurodamus.stimulus_manager.SpatiallyUniformEField(*_args, **_kwargs)¶
Inject a spatially-uniform, temporally-oscillating extracellular potential field. The potential field is defined as the sum of multiple potential fields which vary cosinusoidally in time, and whose spatial gradient (i.e., E field) is constant. Note: Uses singleton pattern, one instance per MPI process. Multiple stimulus blocks are consolidated per cell to create a unified stimulus.
- add_new_stimuli(target_points, stim_info, cell_manager)¶
Process stimulus block for target cells. Creates ElectrodeSource for new cells or merges with existing stimuli.
- classmethod apply_all_stimuli(cell_manager)¶
Apply all consolidated stimuli to their segments. Computes segment displacements on the fly from cell geometry.
- static get_segment_position(sec_seg_points, soma_local_position, section, x, func_loc2glob=None)¶
Get the global coordinates of the segment. For axon and myelin, intepolate along the y-axis of the local soma coordinates, and then convert to global coordinates.
- Parameters:
sec_seg_points – segment global positions in the current section
soma_local_position – soma local position to interpolate axon and myelin position
section – hoc section
x – x: offset along the section, in [0, 1]
func_loc2glob – function to convert local coordinates to global ones for axon and myelin, return the local coordinates if None
- Returns:
global coordinates [x, y, z], type np.array
- static interp_axon_positions(x, axon_index, soma_position)¶
Interpolate the coordinates of the axon segment for the given x, because of no 3d point for the new axons. Assume that the axon is oriented along the y-axis from soma, 30 um displaced for 1st axon, 60 um for 2nd axon, the same x- and z-coordinates as soma. x=0 is soma, and x=1 is the end of the axon section.
- static interp_myelin_positions(x, myelin_index, soma_position)¶
Interpolate the coordinates of the myelin segment for the given x, because of no 3d point for the new myelin section. Assume that the myelin is oriented along the y-axis from soma, 1000 um displaced after the 2nd axon, i.e. [soma-60, soma-1000]
- class neurodamus.stimulus_manager.StimulusManager(target_manager)¶
A manager for synaptic artificial Stimulus. Old stimulus resort to hoc implementation
- get_point_list(target_spec: TargetSpec, stim_info: dict, cell_manager) compat.List[TargetPointList]¶
Return points from target, using a specified compartment set if given.
- Parameters:
target_spec – Object providing points.
stim_info – May contain “CompartmentSet”.
cell_manager – Necessary to retrieve references to neuron sections and neurons in general
- Returns:
compat.List of TargetPointList (one TargetPointList per gid. In general it is a jagged array)
- interpret(target_spec, stim_info)¶
- classmethod register_type(stim_class)¶
Registers a new class as a handler for a new stim type
- static reset_helpers()¶
- saveStatePreparation(ss_obj)¶
- class neurodamus.stimulus_manager.SubThreshold(target_points: list[TargetPointList], stim_info: dict, cell_manager)¶
Injects a current step at some percent below a cell’s threshold.
- compute_parameters(cell)¶
- parse_check_all_parameters(stim_info: dict)¶
neurodamus.cell_distributor¶
Mechanisms to load and balance cells across the computing resources.
Classes
|
Manages a group of cells for BBP simulations, V5 and V6 |
|
|
|
Class handling the several types of load_balance info, including generating and loading the various files. |
- class neurodamus.cell_distributor.CellDistributor(circuit_conf, target_manager, _run_conf=None, **_kw)¶
Manages a group of cells for BBP simulations, V5 and V6
Instantiated cells are stored locally (.cells property)
- load_nodes(load_balancer=None, **kw)¶
Gets gids from target, splits and returns a GidSet with all metadata
- class neurodamus.cell_distributor.CellManagerBase(circuit_conf, target_manager, _run_conf=None, **_kw)¶
- CellType = NotImplemented¶
The underlying Cell type class
- signature:
__init__(self, gid, cell_info, circuit_conf)
- property cells¶
- property circuit_name¶
- property circuit_target¶
- property connection_managers¶
- finalize(**opts)¶
Instantiates cells and initializes the network in the simulator.
- Note: it should be called after all cell distributors have done load_nodes()
so gids offsets are final.
- getGidListForProcessor()¶
- get_cell(gid)¶
- get_cellref(gid)¶
Retrieve a cell object given its gid. Note that this function handles multisplit cases incl converting to an spgid automatically
Returns: Cell object
- get_final_gids()¶
- property gid2cell¶
- is_initialized()¶
- property is_virtual¶
- load_artificial_cell(gid, artificial_cell)¶
- load_nodes(load_balancer=None, *, _loader=None, loader_opts=None)¶
Top-level loader of nodes.
- property local_nodes¶
- property pc¶
- property population_name¶
- pre_stdinit()¶
Post stdinit actions
- record_spikes(gids=None, append_spike_vecs=None)¶
Setup recording of spike events (crossing of threshold) for cells on this node
- register_connection_manager(conn_manager: ConnectionManagerBase)¶
- property target_manager¶
- property total_cells¶
- class neurodamus.cell_distributor.GlobalCellManager¶
GlobalCellManager is a wrapper over all Cell Managers so that we can query any cell from its global gid
- finalize()¶
- getGidListForProcessor()¶
- getPopulationInfo(gid)¶
- getSpGid(gid)¶
Retrieve the spgid from a gid (provided we are using loadbalancing)
- Parameters:
gid – The base gid (as read from start.ncs)
Returns: The gid as it appears on this cpu (if this is the same as the base gid, then that is the soma piece)
- get_cell(gid)¶
- get_cellref(gid)¶
Retrieve a cell object given its gid. Note that this function handles multisplit cases incl converting to an spgid automatically
Returns: Cell object
- get_final_gids()¶
- register_manager(cell_manager)¶
- class neurodamus.cell_distributor.LoadBalance(balance_mode, nodes_path, pop, target_manager, target_cpu_count=None)¶
Class handling the several types of load_balance info, including generating and loading the various files.
LoadBalance instances target the current system (cpu count) and circuit BUT check/create load distribution for any given target. The circuit is identified by the nodes file AND population.
NOTE: Given the heavy costs of computing load balance, some state files are created which allow the balance info to be reused. These are
cx_{TARGET}.dat: File with complexity information for the cells of a given target
cx_{TARGET}.{CPU_COUNT}.dat: The file assigning cells/pieces to individual CPUs ranks.
For more information refer to the developer documentation.
- Parameters:
balance_mode – Mode of balancing the load, as defined by
neurodamus.core.configuration.LoadBalanceMode.nodes_path – Path to the nodes file.
pop – Population identifier for the circuit.
target_manager – Manages target information for load balancing.
target_cpu_count – Optional number of CPUs for the target.
- generate_load_balance(target_spec, cell_distributor)¶
Context manager that creates load balance for the circuit instantiated within
target_str: a string representation of the target.
- Parameters:
cell_distributor – the cell distributor object to which we can query the cells to be load balanced
- load_balance_info(target_spec)¶
Loads a load-balance info for a given target. NOTE: Please ensure the load balance exists or is derived before calling this function
- static select_lb_mode(sim_config, run_conf, target)¶
A method which selects the load balance mode according to run config
- valid_load_distribution(target_spec: TargetSpec) bool¶
Checks whether we have valid load-balance files, attempting to derive from larger target distributions if possible.
neurodamus.connection¶
Implementation of the core Connection classes
Classes
|
NetCon Type |
|
Replay instantiation mode. |
|
The Base implementation for cell connections identified by src-dst gids |
|
A Connection object serves as a container for synapses formed from a presynaptic and a postsynaptic gid, including Points where those synapses are placed (stored in TargetPointList) |
Base class for artificial Stims, namely Replay and Minis |
|
|
A class creating/holding spont minis of a connection |
|
Extends SpontMinis to handle two spont rates: Inhibitory & Excitatory |
A class creating/holding replays of a connection |
- class neurodamus.connection.ArtificialStim¶
Base class for artificial Stims, namely Replay and Minis
- netcons¶
- netstims¶
- restart_events()¶
- class neurodamus.connection.Connection(sgid, tgid, src_pop_id=0, dst_pop_id=0, weight_factor=1.0, minis_spont_rate=None, configuration=None, mod_override=None, **kwargs)¶
A Connection object serves as a container for synapses formed from a presynaptic and a postsynaptic gid, including Points where those synapses are placed (stored in TargetPointList)
- ConnUtils = None¶
- add_single(cell_manager, syn_params, syn_id)¶
Add synapse config in target cell
- add_synapse(syn_tpoints, params_obj, syn_id=None)¶
Adds a synapse in given location to this Connection. NOTE: This procedure can have a significant impact when called multiple times. Consider add_synapses to add multiple synapses in bulk
- Parameters:
syn_tpoints – TargetPointList with one point on the tgid where the associated synapse exists
params_obj – Parameters object for the Synapse to be placed
syn_id – Optional id for the synapse to be used for seeding rng
- add_synapse_configuration(configuration)¶
Add a synapse configuration command to the list. All commands are executed on synapse creation
- add_synapses(target_manager, synapses_params, base_id=0)¶
Adds synapses in bulk.
- Parameters:
synapses_params (-) – A SynapseParameters array (possibly view) for this conn synapses
base_id (-) – The synapse base id, usually absolute offset
- configure_synapses(configuration)¶
Helper function to execute a configuration statement (hoc) on all connection synapses.
- finalize(cell, base_seed=0, *, replay_mode=ReplayMode.AS_REQUIRED, attach_src_cell=True)¶
When all parameters are set, create synapses and netcons
- Parameters:
cell – The cell to create synapses and netcons on.
base_seed – base seed value (Default: None - no adjustment)
replay_mode – Policy to initialize replay in this conection
- finalize_gap_junctions()¶
When all parameters are set, create synapses and netcons
- minis_spont_rate¶
- property mod_override¶
_mod_override getter
- replay(tvec, start_delay=0.0)¶
The synapses connecting these gids are to be activated using predetermined timings.
- Parameters:
tvec – time for spike events from the sgid
start_delay – When the events may start to be delivered
- restart_events()¶
Restart the artificial events, coming from Replay or Spont-Minis
- property sections_with_synapses¶
Generator over all sections containing synapses, yielding pairs (section_id, section)
- update_weights(weight, update_also_replay_netcons=False)¶
Change the weights of the existing netcons
- Parameters:
weight – The new weight
update_also_replay_netcons – Whether weights shall be applied to replay netcons as well
- class neurodamus.connection.ConnectionBase(sgid, tgid, src_pop_id=0, dst_pop_id=0, weight_factor=1, syndelay_override=None, synapses_offset=0)¶
The Base implementation for cell connections identified by src-dst gids
- add_delayed_weight(delay, weight)¶
Update the delayed connection vectors in the synapse.
- Parameters:
delay – the delay time for the new weight
weight – the weight to adjust to at this time
- finalize(cell, base_seed=0, *args, **kw)¶
- locked¶
- classmethod netcon_set_type(netcon, syn_obj, nc_type)¶
Find nc_type_param from the synapse global variable and set via the netcon weight
- property population_id¶
- sgid¶
- property synapse_params¶
- property synapses¶
- property synapses_offset¶
- syndelay_override¶
- tgid¶
- update_conductance(new_g)¶
Updates all synapses conductance
- update_weights(weight)¶
Change the weights of the netcons generated when connecting the source and target gids represented in this connection
- weight_factor¶
- class neurodamus.connection.InhExcSpontMinis(spont_rate_inh, spont_rate_exc)¶
Extends SpontMinis to handle two spont rates: Inhibitory & Excitatory
- create_on(conn, sec, position, syn_obj, syn_params, *args)¶
Inserts a SpontMini stim into the given synapse
- get_rate()¶
- has_data()¶
- rate_vec¶
- class neurodamus.connection.NetConType(*values)¶
NetCon Type
- NC_NEUROMODULATOR = 10¶
- NC_PRESYN = 0¶
- NC_REPLAY = 2¶
- NC_SPONTMINI = 1¶
- class neurodamus.connection.ReplayMode(*values)¶
Replay instantiation mode.
- AS_REQUIRED = 1¶
Instantiate Replay netcons as required for this run. Subsequent Save-Restore may not work
- COMPLETE = 2¶
Instantiate Replay Netcons on all Connections so that users may add arbitrary new replays in Restore phases
- NONE = 0¶
Instantiate no replay NetCons
- class neurodamus.connection.ReplayStim¶
A class creating/holding replays of a connection
- add_spikes(hoc_tvec)¶
Appends replay spikes from a time vector to the main replay vector
- create_on(conn, sec, syn_obj, syn_params)¶
Inserts a replay stim into the given synapse
- has_data()¶
- time_vec¶
- class neurodamus.connection.SpontMinis(minis_spont_rate)¶
A class creating/holding spont minis of a connection
- create_on(conn, sec, position, syn_obj, syn_params, _base_seed, _rate_vec=None)¶
Inserts a SpontMini stim into the given synapse
- get_rate()¶
- has_data()¶
- property rate¶
- rate_vec¶
- set_rate(rate)¶
- tbins_vec = None¶
Neurodamus uses a constant rate, so tbin is always containing only 0
neurodamus.connection_manager¶
Main module for handling and instantiating synaptical connections and gap-junctions
Classes
|
A dataset of connections. |
|
An abstract base class common to Synapse and GapJunction connections |
|
The SynapseRuleManager is designed to encapsulate the creation of synapses for BlueBrain simulations, handling the data coming from the circuit file. |
|
Find the node populations names. |
- class neurodamus.connection_manager.SynapseRuleManager(circuit_conf, target_manager, cell_manager, src_cell_manager=None, **kw)
The SynapseRuleManager is designed to encapsulate the creation of synapses for BlueBrain simulations, handling the data coming from the circuit file. If the config file provides any Connection Rules, those override which synapses are created.
Note that the Connection rules are processed with the assumption that they come in the config file from more general to more specific. E.g.: A column->column connection should come before layer 4 -> layer 2 which should come before L4PC -> L2PC.
Once all synapses are prepared with final weights, the Netcons can be created.
- CONNECTIONS_TYPE = 'Synaptic'
The type of connections subclasses handle
- class ConnectionSet(src_id, dst_id, conn_factory=<class 'neurodamus.connection.Connection'>)
A dataset of connections. Several populations may exist with different seeds
- all_connections()
Get an iterator over all the connections.
- get_connection(sgid, tgid)
Retrieves a connection from the pre and post gids.
- Returns:
A connection object if it exists. None otherwise
- Return type:
- get_connections(post_gids, pre_gids=None)
Get all connections between groups of gids.
- get_or_create_connection(sgid, tgid, **kwargs)
Returns a connection by pre-post gid, creating if required.
- ids_match(population_ids, dst_second=None)
Whereas a given population_id selector matches population
- items()
Iterate over the population as tuples (dst_gid, [connections])
- store_connection(conn)
When we have created a new connection (sgid->tgid), store it in order in our structure for faster retrieval later
- Parameters:
conn – The connection object to be stored
- target_gids()
Get the list of all targets gids in this Population
- SynapseReader
alias of
SonataReader
- all_connections()
Retrieves all the existing connections
- configure_connections(conn_conf)
Configure-only circuit connections according to a config Connection block
- Parameters:
conn_conf – The configuration block (dict)
- configure_group(conn_config, gidvec=None)
Configure connections according to a config Connection block
- Parameters:
conn_config – The connection configuration dict
gidvec – A restricted set of gids to configure (original, w/o offsetting)
- conn_factory
alias of
Connection
- connect_all(weight_factor=1, get_conn_stats=False)
For every gid access its synapse parameters and instantiate all synapses.
- Parameters:
weight_factor – Factor to scale all netcon weights (default: 1)
- connect_group(conn_source, conn_destination, synapse_type_restrict=None, mod_override=None, get_conn_stats=False)
Instantiates pathway connections & synapses given src-dst
- Parameters:
conn_source (str) – The target name of the source cells
conn_destination (str) – The target of the destination cells
synapse_type_restrict (int) – Create only given synType synapses
mod_override (str) – ModOverride given for this connection group
- create_connections(src_target=None, dst_target=None, get_conn_stats=False)
Creates connections according to loaded parameters in ‘Connection’ blocks of the config in the currently active ConnectionSet.
If no Connection block relates to the current population, then load all edges. If a single blocks exists with Weight=0, skip creation entirely.
NOTE: All connections respecting the src_target are retrieved and created, even if they use src cells which are NOT instantiated. This is to support replay and other stimulus which dont need the src cell. If only a subset of connections is wanted, they can be filtered by specifying the “source” attribute of the respective connection blocks.
- Parameters:
src_target – Target name to restrict creating connections coming from it
dst_target – Target name to restrict creating connections going into it
- finalize(base_seed=0, **kwargs)
Create the actual synapses and netcons. See super() docstring
- find_populations(population_ids)
Finds the populations that match a given population selector.
- Parameters:
population_ids –
A population ids selector. Accepted formats:
None: All
int: selects matching source population id.
tuple(src: Any, dst: Any): Specify source and dest. Each value can also be None, e.g.: (None, 1) selects all populations having post id 1
- get_connections(post_gids, pre_gids=None, population_ids=None)
Retrieves all connections that match post and pre gids eventually in a subset of the populations.
Note: Due to multi-population, a connection may not be unique for a given pre-post gid pair. As such get_connection() doesn’t make sense anymore and this method shall be used instead.
- Parameters:
post_gids – The target gids of the connections to search (None = All)
pre_gids – idem for pre-gids. [Default: all)
population_ids – A int/tuple of populations ids. Default: all
- get_population(src_pop_id, dst_pop_id)
Retrieves a connection set given node src and dst pop ids
- get_target_connections(src_target_name, dst_target_name, selected_gids=None, conn_population=None)
Retrives the connections between src-dst cell targets
- Parameters:
selected_gids – (optional) post gids to select (original, w/o offsetting)
conn_population – restrict the set of connections to be returned
- open_synapse_file(synapse_file, edge_population, *, src_pop_name=None, **_kw)
Initializes a reader for Synapses config objects and associated population
- Parameters:
synapse_file – The nrn/edge file. For old nrn files it may be a dir.
edge_population – The population of the edges
src_name – The source pop name, normally matching that of the source cell manager
- replay(spike_manager, src_target_name, dst_target_name, start_delay=0.0)
Create special netcons to trigger timed spikes on those synapses.
- Parameters:
spike_manager – map of gids (pre-synaptic) with spike times
src_target_name – Source population:target of the replay connections
dst_target_name – Target whose gids should be replayed
start_delay – Dont deliver events before t=start_delay
- restart_events()
After restore, restart the artificial events (replay and spont minis)
- select_connection_set(src_pop_id, dst_pop_id)
Select the active population of connections given src and dst node pop ids. connect_all() and connect_group() will apply only to the active population.
Returns: The selected ConnectionSet, eventually created
- setup_delayed_connection(conn_config)
Setup delayed connection weights for synapse initialization.
Find source and target gids and the associated connection, and add the delay and weight to their delay vectors.
- Parameters:
conn_config – Connection configuration parsed from sonata config
- class neurodamus.connection_manager.ConnectionManagerBase(circuit_conf, target_manager, cell_manager, src_cell_manager=None, **kw)¶
An abstract base class common to Synapse and GapJunction connections
Connection Managers hold and manage connectivity among cell populations. For every src-dst pop pairs a new ConnectionManager is created.
The only case it holds several ConnectionSets is for old-style projections (no population names) and possibily future support for multiple edge groups (e.g. from multiple files) so that additional connectivity for a pathway can be loaded and configured independently. NOTE: self._populations would require a new key format, not (src_pop, dst_pop)
- CONNECTIONS_TYPE = None¶
The type of connections subclasses handle
- class ConnectionSet(src_id, dst_id, conn_factory=<class 'neurodamus.connection.Connection'>)¶
A dataset of connections. Several populations may exist with different seeds
- all_connections()¶
Get an iterator over all the connections.
- count()¶
- get_connection(sgid, tgid)¶
Retrieves a connection from the pre and post gids.
- Returns:
A connection object if it exists. None otherwise
- Return type:
- get_connections(post_gids, pre_gids=None)¶
Get all connections between groups of gids.
- get_or_create_connection(sgid, tgid, **kwargs)¶
Returns a connection by pre-post gid, creating if required.
- ids_match(population_ids, dst_second=None)¶
Whereas a given population_id selector matches population
- items()¶
Iterate over the population as tuples (dst_gid, [connections])
- store_connection(conn)¶
When we have created a new connection (sgid->tgid), store it in order in our structure for faster retrieval later
- Parameters:
conn – The connection object to be stored
- target_gids()¶
Get the list of all targets gids in this Population
- SynapseReader¶
alias of
SonataReader
- all_connections()¶
Retrieves all the existing connections
- property cell_manager¶
- configure_connections(conn_conf)¶
Configure-only circuit connections according to a config Connection block
- Parameters:
conn_conf – The configuration block (dict)
- configure_group(conn_config, gidvec=None)¶
Configure connections according to a config Connection block
- Parameters:
conn_config – The connection configuration dict
gidvec – A restricted set of gids to configure (original, w/o offsetting)
- conn_factory¶
alias of
Connection
- connect_all(weight_factor=1, get_conn_stats=False)¶
For every gid access its synapse parameters and instantiate all synapses.
- Parameters:
weight_factor – Factor to scale all netcon weights (default: 1)
- connect_group(conn_source, conn_destination, synapse_type_restrict=None, mod_override=None, get_conn_stats=False)¶
Instantiates pathway connections & synapses given src-dst
- Parameters:
conn_source (str) – The target name of the source cells
conn_destination (str) – The target of the destination cells
synapse_type_restrict (int) – Create only given synType synapses
mod_override (str) – ModOverride given for this connection group
- property connection_count¶
- create_connections(src_target=None, dst_target=None, get_conn_stats=False)¶
Creates connections according to loaded parameters in ‘Connection’ blocks of the config in the currently active ConnectionSet.
If no Connection block relates to the current population, then load all edges. If a single blocks exists with Weight=0, skip creation entirely.
NOTE: All connections respecting the src_target are retrieved and created, even if they use src cells which are NOT instantiated. This is to support replay and other stimulus which dont need the src cell. If only a subset of connections is wanted, they can be filtered by specifying the “source” attribute of the respective connection blocks.
- Parameters:
src_target – Target name to restrict creating connections coming from it
dst_target – Target name to restrict creating connections going into it
- property current_population¶
- property dst_node_population¶
- finalize(base_seed=0, *, _conn_type='synapses', **conn_params)¶
Instantiates the netcons and Synapses for all connections.
Note: All weight scalars should have their final values.
- Parameters:
base_seed – optional argument to adjust synapse RNGs (default=0)
_conn_type – (Internal) A string repr of the connectivity type
conn_params – Additional finalize parameters for the specific _finalize_conns E.g. replay_mode (Default: Auto-Detect) Use DISABLED to skip replay and COMPLETE to instantiate VecStims in all synapses
- find_populations(population_ids)¶
Finds the populations that match a given population selector.
- Parameters:
population_ids –
A population ids selector. Accepted formats:
None: All
int: selects matching source population id.
tuple(src: Any, dst: Any): Specify source and dest. Each value can also be None, e.g.: (None, 1) selects all populations having post id 1
- get_connections(post_gids, pre_gids=None, population_ids=None)¶
Retrieves all connections that match post and pre gids eventually in a subset of the populations.
Note: Due to multi-population, a connection may not be unique for a given pre-post gid pair. As such get_connection() doesn’t make sense anymore and this method shall be used instead.
- Parameters:
post_gids – The target gids of the connections to search (None = All)
pre_gids – idem for pre-gids. [Default: all)
population_ids – A int/tuple of populations ids. Default: all
- get_population(src_pop_id, dst_pop_id)¶
Retrieves a connection set given node src and dst pop ids
- get_target_connections(src_target_name, dst_target_name, selected_gids=None, conn_population=None)¶
Retrives the connections between src-dst cell targets
- Parameters:
selected_gids – (optional) post gids to select (original, w/o offsetting)
conn_population – restrict the set of connections to be returned
- property is_file_open¶
- open_edge_location(syn_source, _circuit_conf, **kw)¶
- open_synapse_file(synapse_file, edge_population, *, src_pop_name=None, **_kw)¶
Initializes a reader for Synapses config objects and associated population
- Parameters:
synapse_file – The nrn/edge file. For old nrn files it may be a dir.
edge_population – The population of the edges
src_name – The source pop name, normally matching that of the source cell manager
- replay(*_, **_kw)¶
- restart_events()¶
After restore, restart the artificial events (replay and spont minis)
- select_connection_set(src_pop_id, dst_pop_id)¶
Select the active population of connections given src and dst node pop ids. connect_all() and connect_group() will apply only to the active population.
Returns: The selected ConnectionSet, eventually created
- setup_delayed_connection(conn_config)¶
- property src_cell_manager¶
- property src_node_population¶
- property src_pop_offset¶
- property target_pop_offset¶
- class neurodamus.connection_manager.ConnectionSet(src_id, dst_id, conn_factory=<class 'neurodamus.connection.Connection'>)¶
A dataset of connections. Several populations may exist with different seeds
- all_connections()¶
Get an iterator over all the connections.
- count()¶
- get_connection(sgid, tgid)¶
Retrieves a connection from the pre and post gids.
- Returns:
A connection object if it exists. None otherwise
- Return type:
- get_connections(post_gids, pre_gids=None)¶
Get all connections between groups of gids.
- get_or_create_connection(sgid, tgid, **kwargs)¶
Returns a connection by pre-post gid, creating if required.
- ids_match(population_ids, dst_second=None)¶
Whereas a given population_id selector matches population
- items()¶
Iterate over the population as tuples (dst_gid, [connections])
- store_connection(conn)¶
When we have created a new connection (sgid->tgid), store it in order in our structure for faster retrieval later
- Parameters:
conn – The connection object to be stored
- target_gids()¶
Get the list of all targets gids in this Population
- class neurodamus.connection_manager.SynapseRuleManager(circuit_conf, target_manager, cell_manager, src_cell_manager=None, **kw)¶
The SynapseRuleManager is designed to encapsulate the creation of synapses for BlueBrain simulations, handling the data coming from the circuit file. If the config file provides any Connection Rules, those override which synapses are created.
Note that the Connection rules are processed with the assumption that they come in the config file from more general to more specific. E.g.: A column->column connection should come before layer 4 -> layer 2 which should come before L4PC -> L2PC.
Once all synapses are prepared with final weights, the Netcons can be created.
- CONNECTIONS_TYPE = 'Synaptic'¶
The type of connections subclasses handle
- finalize(base_seed=0, **kwargs)¶
Create the actual synapses and netcons. See super() docstring
- replay(spike_manager, src_target_name, dst_target_name, start_delay=0.0)¶
Create special netcons to trigger timed spikes on those synapses.
- Parameters:
spike_manager – map of gids (pre-synaptic) with spike times
src_target_name – Source population:target of the replay connections
dst_target_name – Target whose gids should be replayed
start_delay – Dont deliver events before t=start_delay
- setup_delayed_connection(conn_config)¶
Setup delayed connection weights for synapse initialization.
Find source and target gids and the associated connection, and add the delay and weight to their delay vectors.
- Parameters:
conn_config – Connection configuration parsed from sonata config
- neurodamus.connection_manager.edge_node_pop_names(edge_file, edge_pop_name, src_pop_name=None, dst_pop_name=None) tuple¶
Find the node populations names.
- Parameters:
edge_file – The edge file to extract the population names from
edge_pop_name – The name of the edge population
Returns: tuple of the src-dst population names.
neurodamus.metype¶
Module which defines and handles METypes config (v5/v6 cells)
Classes
|
Class representing an METype. |
Map to hold specific METype info and provide retrieval by gid |
- class neurodamus.metype.BaseCell¶
Class representing an basic cell, e.g. an artificial cell
- property CCell¶
- property CellRef¶
- SECTION_TYPES = [('soma', 'somatic'), ('axon', 'axonal'), ('dend', 'basal'), ('apic', 'apical'), ('ais', 'AIS'), ('node', 'nodal'), ('myelin', 'myelinated')]¶
- connect2target(target_pp=None)¶
Connects empty cell to target
- get_sec(section_id)¶
Inverse of get_section_id. Given a global section_id, returns the section from the cell.
- Parameters:
section_id – The global index of the section
- Returns:
Reference to the section in the cell
Note: section_id is based on the original cell, before removing the axon. Asking for one of the removed sections will raise an error. Asking for one of the two remaining sections is still possible. The offsets are still calculated based on the original cell structure.
- get_section_counts()¶
Lazily compute and cache section counts, one per entry in SECTION_TYPES.
All section lists are treated as optional (getattr with fallback). The axon is special-cased: we use nSecAxonalOrig to preserve the original count even after axon deletion.
Note: this is manually cached via _section_counts rather than using @cached_property because the class uses __slots__ (for memory efficiency across many cell instances), and cached_property requires an instance __dict__ to store its value.
- get_section_id(section)¶
Calculate the global index of a given section within its cell.
- Parameters:
section – The specific section for which the index is required
- Returns:
The global index of the section, applicable for neuron mapping
Note: section_id is based on the original cell, before removing the axon.
Warning: this method returns the original section_id, which may not be valid if the axon was removed. The offsets are still calculated based on the original cell structure.
- raw_gid¶
- re_init_rng(ion_seed)¶
- class neurodamus.metype.Cell_V6(gid, meinfo, circuit_conf)¶
- compute_segment_global_coordinates()¶
Retrieves the local extreme points of every section segment, convert to global coordinates, and assign to attribute self.segment_global_coords Returns: {section_name: list of the [x,y,z] coordinates of the segment end points} e.g. a soma with 3 segments -> {“cell.soma[0]”: [[x1,y1,z1], [x2,y2,z2]]}
- compute_segment_local_coordinates()¶
Retrieves the local extreme points of every section segment, assign to self.segment_local_coords
- delete_axon()¶
- static get_local_seg_extremes(nseg, pp)¶
Compute the local position of beginning and end of each compartment in a section Assumption: all the compartments have the same length :param nseg: number of compartments. :param pp: a nX4 matrix of positions of points. :param The first col give the relative position: :type The first col give the relative position: x in neuron :param : :type : x in neuron :param axis. It is in the interval [0: :param 1].: :param The other 3 columns give x: :param y: :param z triplets of the points in a global system of: :param reference.:
Returns: a matrix 3Xn of the position of the extremes of every proper compartment
- local_to_global_coord_mapping(points)¶
- local_to_global_matrix¶
- segment_global_coords¶
- segment_local_coords¶
- class neurodamus.metype.EmptyCell(gid, cell)¶
Class representing an empty cell, e.g. an artificial cell Workaround for the neuron issue https://github.com/neuronsimulator/nrn/issues/635
- gid¶
- class neurodamus.metype.METype(gid, etype_path, emodel, morpho_path, meinfos=None, detailed_axon=False)¶
Class representing an METype. Will instantiate a Hoc-level cell as well
- KEEP_AXON_FLAG = 400¶
- connect2target(target_pp=None)¶
Connects MEtype cell to target
- Parameters:
target_pp – target point process [default: None]
Returns: NetCon obj
- delete_axon()¶
- exc_mini_frequency¶
- extra_attrs¶
- getHypAmp()¶
- getThreshold()¶
- property gid¶
- inh_mini_frequency¶
- morpho_extension = 'asc'¶
The extension to be applied to morphology files
- re_init_rng(ion_seed)¶
Re-Init RNG for cell
- Parameters:
ion_seed – ion channel seed
- setHypAmp(value)¶
- setThreshold(value)¶
- property synlist¶
- class neurodamus.metype.METypeItem(morph_name, etype=None, emodel_tpl=None, mtype=None, threshold_current=0, holding_current=0, exc_mini_frequency=0, inh_mini_frequency=0, add_params=None, position=None, rotation=None, scale=1.0)¶
Metadata about an METype, each possibly used by several cells.
- add_params¶
- emodel_tpl¶
- etype¶
- exc_mini_frequency¶
- extra_attrs¶
- holding_current¶
- inh_mini_frequency¶
- local_to_global_coord_mapping(points)¶
- local_to_global_matrix¶
- morph_name¶
- mtype¶
- threshold_current¶
- class neurodamus.metype.METypeManager¶
Map to hold specific METype info and provide retrieval by gid
- property gids¶
- insert(gid, morph_name, *me_data, **kwargs)¶
Function to add an METypeItem to internal data structure
- load_infoNP(gidvec, morph_list, model_templates, mtypes, etypes, threshold_currents=None, holding_currents=None, exc_mini_freqs=None, inh_mini_freqs=None, positions=None, rotations=None, add_params_list=None)¶
Loads METype information in bulk from Numpy arrays
- class neurodamus.metype.PointCell(gid, cell_info, _circuit_conf)¶
Class representing a minimal, single section cell for dry-runs
- property CCell¶
- property CellRef¶
- property all¶
- connect2target(target_pp=None)¶
- getHypAmp()¶
- getThreshold()¶
- property input_resistance¶
- property nSecAll¶
- re_init_rng(ion_seed)¶
- exception neurodamus.metype.SectionIdError¶
- neurodamus.metype.vector_rotate_translate(points, transform_matrix)¶
Rotate/translate a vector of 3D points according to a transformation matrix.
- Note: Rotation is done directly using the Einstein Sum method, similarly to scipy,
avoiding intermediate states.
neurodamus.replay¶
Stimulus implementation where incoming synaptic events are replayed for a single gid
Classes
|
Holds and manages gid spike time information, specially for Replay. |
- exception neurodamus.replay.MissingSpikesPopulationError¶
An exception triggered when a given node population is not found, we may want to handle
- class neurodamus.replay.SpikeManager(spike_filename, delay=0, population=None)¶
Holds and manages gid spike time information, specially for Replay.
A SynapseReplay stim can be used for a single gid that has all the synapses instantiated. Given a spikes file from a previous run, this object uses a NetStim object to retrigger the synapses at the appropriate time as though the presynaptic cells were present and active.
Internally the spikes are stored in a
neurodamus.utils.multimap.GroupedMultiMap- filter_map(pre_gids)¶
Returns a raw dict of pre_gid->spikes for the given pre gids.
- get_map()¶
Returns the
GroupedMultiMapwith all the spikes.
- open_spike_file(filename, delay, population=None)¶
Opens a given spike file.
- Parameters:
filename – path to spike out file. Interpret as binary or ascii according to extension
delay – delay to apply to spike times
neurodamus.gap_junction¶
Main module for handling and instantiating synaptical connections
Classes
- class neurodamus.gap_junction.GapJunctionConnParameters¶
Glial-glial gap junction connection parameters.
This class overrides the _fields attribute from the base SynapseParameters class to define a specific set of parameters relevant for gap junctions.
The _optional and _reserved dictionaries are inherited from the base class and apply unchanged.
Note
Only the _fields dictionary is overridden.
The dtype construction and utility methods are reused as-is.
- class neurodamus.gap_junction.GapJunctionManager(gj_conf, target_manager, cell_manager, src_cell_manager=None, **kw)¶
The GapJunctionManager is similar to the SynapseRuleManager. It will open dedicated connectivity files which will have the locations and conductance strengths of gap junctions detected in the circuit. The user will have the capacity to scale the conductance weights.
- CONNECTIONS_TYPE = 'GapJunction'¶
The type of connections subclasses handle
- SynapseReader¶
alias of
GapJunctionSynapseReader
- configure_connections(conn_conf)¶
Gap Junctions dont configure_connections
- create_connections(*_, **_kw)¶
Gap Junctions dont use connection blocks, connect all belonging to target
- finalize(*_, **_kw)¶
Instantiates the netcons and Synapses for all connections.
Note: All weight scalars should have their final values.
- Parameters:
base_seed – optional argument to adjust synapse RNGs (default=0)
_conn_type – (Internal) A string repr of the connectivity type
conn_params – Additional finalize parameters for the specific _finalize_conns E.g. replay_mode (Default: Auto-Detect) Use DISABLED to skip replay and COMPLETE to instantiate VecStims in all synapses
- save_seclamp()¶
Save seclamps to a file
- class neurodamus.gap_junction.GapJunctionSynapseReader(edge_file, population=None, *_, **kw)¶
- Parameters¶
alias of
GapJunctionConnParameters
- parameter_mapping = {'weight': 'conductance'}¶