bmtk.simulator.popnet.dipde package#
Submodules#
bmtk.simulator.popnet.dipde.popedge module#
bmtk.simulator.popnet.dipde.popnetwork module#
- class bmtk.simulator.popnet.dipde.popnetwork.ExtPopulation(pop_id)[source]#
Bases:
Population- property firing_rate#
- property record#
- class bmtk.simulator.popnet.dipde.popnetwork.PopConnection(src_pop, trg_pop)[source]#
Bases:
object- property dipde_obj#
- class bmtk.simulator.popnet.dipde.popnetwork.PopEdge(edge, property_map, graph)[source]#
Bases:
object- property delay#
- property nsyns#
- property weight#
bmtk.simulator.popnet.dipde.popnode module#
- class bmtk.simulator.popnet.dipde.popnode.ExternalPopulation(node_id, graph, network, params)[source]#
Bases:
PopNode- property firing_rate#
- property is_firing_rate_set#
- property is_internal#
- class bmtk.simulator.popnet.dipde.popnode.InternalNode(node_id, graph, network, params)[source]#
Bases:
PopNode- property dv#
- property is_internal#
- property tau_m#
- property v_max#
- property v_min#
bmtk.simulator.popnet.dipde.popsimulator module#
- class bmtk.simulator.popnet.dipde.popsimulator.PopSimulator(graph, dt=0.0001, tstop=0.0, overwrite=True)[source]#
Bases:
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).
- property connections#
- property dt#
- property populations#
- property rates_file#
- 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.
- property tstop#
bmtk.simulator.popnet.dipde.sonata_adaptors module#
- class bmtk.simulator.popnet.dipde.sonata_adaptors.PopEdgeAdaptor(network)[source]#
Bases:
EdgeAdaptor
- class bmtk.simulator.popnet.dipde.sonata_adaptors.PopNetEdge(sonata_edge, edge_adaptor)[source]#
Bases:
SonataBaseEdge- property syn_weight#
bmtk.simulator.popnet.dipde.utils module#
- bmtk.simulator.popnet.dipde.utils.assert_model_known(model, model_dict)[source]#
Test if a model in in the model_dict; if not, raise UnknownModelError
- bmtk.simulator.popnet.dipde.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.dipde.utils.create_population_list(node_table, model_table)[source]#
Create a population list from the node and model pandas tables
- bmtk.simulator.popnet.dipde.utils.df_to_csv(df, save_file_name, index=False, sep=' ', na_rep='None')[source]#
- bmtk.simulator.popnet.dipde.utils.get_firing_rate_from_nwb(populations, nwb_file, trial)[source]#
Calculates firing rates for an external population
- bmtk.simulator.popnet.dipde.utils.get_firing_rates(populations, spike_trains)[source]#
Calculates firing rates for an external population