bmtk.simulator.popnet package

Submodules

bmtk.simulator.popnet.config module

class bmtk.simulator.popnet.config.Config(*args, **kwargs)[source]

Bases: bmtk.simulator.core.simulation_config.SimulationConfig

bmtk.simulator.popnet.config.from_json(config_file, validate=False)[source]

bmtk.simulator.popnet.popedge module

class bmtk.simulator.popnet.popedge.PopEdge(source_pop, target_pop, edge_params, dynamics_params)[source]

Bases: bmtk.simulator.popnet.popedge.SimEdge

delay
nsyns
params
source
target
weight
class bmtk.simulator.popnet.popedge.SimEdge(original_params, dynamics_params)[source]

Bases: object

edge_type_id

bmtk.simulator.popnet.popnetwork module

class bmtk.simulator.popnet.popnetwork.ExtPopulation(pop_id)[source]

Bases: bmtk.simulator.popnet.popnetwork.Population

build(firing_rate)[source]
firing_rate
record
class bmtk.simulator.popnet.popnetwork.PopConnection(src_pop, trg_pop)[source]

Bases: object

add_edge(edge)[source]
build()[source]
dipde_obj
class bmtk.simulator.popnet.popnetwork.PopEdge(edge, property_map, graph)[source]

Bases: object

delay
nsyns
weight
class bmtk.simulator.popnet.popnetwork.PopNetwork(group_by='node_type_id', **properties)[source]

Bases: bmtk.simulator.core.simulator_network.SimNetwork

add_rates(rates, node_set)[source]
add_spike_trains(spike_trains, node_set)[source]
build_nodes()[source]
build_recurrent_edges()[source]
connections
edges_table(target_network, source_network)[source]
find_edges(source_nodes=None, target_nodes=None)[source]
get_edges(source_network)[source]
get_population(node_set, gid)[source]
get_populations(network)[source]
internal_populations
populations
rebuild()[source]
class bmtk.simulator.popnet.popnetwork.Population(pop_id)[source]

Bases: object

add_node(pnode)[source]
build()[source]
dipde_obj
get_gids()[source]
pop_id
record

bmtk.simulator.popnet.popnode module

class bmtk.simulator.popnet.popnode.ExternalPopulation(node_id, graph, network, params)[source]

Bases: bmtk.simulator.popnet.popnode.PopNode

firing_rate
is_firing_rate_set
is_internal
class bmtk.simulator.popnet.popnode.InternalNode(node_id, graph, network, params)[source]

Bases: bmtk.simulator.popnet.popnode.PopNode

dv
is_internal
tau_m
v_max
v_min
class bmtk.simulator.popnet.popnode.PopNode(node_id, graph, network, params)[source]

Bases: bmtk.simulator.popnet.popnode.SimNode

add_gid(gid)[source]
dynamics_params
get_gids()[source]
is_internal
network

Name of network node belongs too.

node_id
pop_id
class bmtk.simulator.popnet.popnode.SimNode(node_id, graph, network, params)[source]

Bases: object

model_params

Parameters (json file, nml, dictionary) that describe a specific node

network

Name of network node belongs too.

node_id
node_type_id

bmtk.simulator.popnet.popsimulator module

class bmtk.simulator.popnet.popsimulator.PopSimulator(graph, dt=0.0001, tstop=0.0, overwrite=True)[source]

Bases: bmtk.simulator.core.simulator.Simulator

add_rate_hz(network, pop_id, rate, force=False)[source]

Set the firing rate of an external population.

This should be done before calling build_cells(). If a population has already been assigned a firing rate an error will occur unless force=True.

Parameters:
  • network – name of network with wanted exteranl population
  • pop_id – name/id of external population
  • rate – firing rate in Hz.
  • force – will overwrite existing firing rates
add_rates_nwb(network, nwb_file, trial, force=False)[source]

Creates external population firing rates from an NWB file.

Will iterate through a processing trial of an NWB file by assigning gids the population it belongs too and taking the average firing rate.

This should be done before calling build_cells(). If a population has already been assigned a firing rate an error will occur unless force=True.

Parameters:
  • network – Name of network with external populations.
  • nwb_file – NWB file with spike rates.
  • trial – trial id in NWB file
  • force – will overwrite existing firing rates
build_populations()[source]

Build dipde Population objects from graph nodes.

To calculate external populations firing rates, it first see if a population’s firing rate has been manually set in the graph. Otherwise it attempts to calulate the firing rate from the call to add_rate_hz, add_rates_NWB, etc. (which should be called first).

connections
dt
classmethod from_config(configure, graph)[source]
populations
rates_file
run(tstop=None)[source]
set_external_connections(network_name)[source]

Sets the external connections for populations in a given network.

Parameters:network_name – name of external network with External Populations to connect to internal pops.
set_logging(log_file)[source]
set_recurrent_connections()[source]

Initialize internal connections.

tstop

bmtk.simulator.popnet.sonata_adaptors module

class bmtk.simulator.popnet.sonata_adaptors.PopEdgeAdaptor(network)[source]

Bases: bmtk.simulator.core.sonata_reader.edge_adaptor.EdgeAdaptor

get_edge(sonata_edge)[source]
class bmtk.simulator.popnet.sonata_adaptors.PopNetEdge(sonata_edge, edge_adaptor)[source]

Bases: bmtk.simulator.core.sonata_reader.edge_adaptor.SonataBaseEdge

syn_weight

bmtk.simulator.popnet.utils module

class bmtk.simulator.popnet.utils.KeyDefaultDict[source]

Bases: collections.defaultdict

bmtk.simulator.popnet.utils.assert_model_known(model, model_dict)[source]

Test if a model in in the model_dict; if not, raise UnknownModelError

bmtk.simulator.popnet.utils.create_firing_rate_server(t, y)[source]
bmtk.simulator.popnet.utils.create_instance(data_dict)[source]

Helper function to create an object from a dictionary containing:

“module”: The name of the module containing the class “class”: The name of the class to be used to create the object

bmtk.simulator.popnet.utils.create_nwb_server_file_path(nwb_file_name, nwb_path)[source]
bmtk.simulator.popnet.utils.create_population_list(node_table, model_table)[source]

Create a population list from the node and model pandas tables

bmtk.simulator.popnet.utils.df_to_csv(df, save_file_name, index=False, sep=' ', na_rep='None')[source]
bmtk.simulator.popnet.utils.get_firing_rate_from_nwb(populations, nwb_file, trial)[source]

Calculates firing rates for an external population

bmtk.simulator.popnet.utils.get_firing_rates(populations, spike_trains)[source]

Calculates firing rates for an external population

bmtk.simulator.popnet.utils.get_mesoscale_connectivity_dict()[source]
bmtk.simulator.popnet.utils.list_of_dicts_to_dict_of_lists(list_of_dicts, default=None)[source]
bmtk.simulator.popnet.utils.network_dict_to_target_adjacency_dict(network_dict)[source]
bmtk.simulator.popnet.utils.population_list_to_csv(population_list, save_file_name)[source]
bmtk.simulator.popnet.utils.population_list_to_dataframe(population_list)[source]
bmtk.simulator.popnet.utils.population_to_dict_for_dataframe(p)[source]
bmtk.simulator.popnet.utils.reorder_columns_in_frame(frame, var)[source]

Module contents