ALLEN INSTITUTE

# bmtk.simulator.pointnet package

## Subpackages

- bmtk.simulator.pointnet.default_setters package
  - Submodules
  - bmtk.simulator.pointnet.default_setters.cell_models module
    - `loadNESTModel()`
  - bmtk.simulator.pointnet.default_setters.synapse_models module
    - `static_synapse()`
  - bmtk.simulator.pointnet.default_setters.synaptic_weights module
    - `default_weight_fnc()`
  - Module contents
- bmtk.simulator.pointnet.modules package
  - Submodules
  - bmtk.simulator.pointnet.modules.ecephys_module module
    - `PointECEphysUnitsModule`
      - `PointECEphysUnitsModule.initialize()`
    - `set_spikes()`
    - `set_spikes_nest2()`
    - `set_spikes_nest3()`
  - bmtk.simulator.pointnet.modules.iclamp module
    - `IClampMod`
      - `IClampMod.initialize()`
  - bmtk.simulator.pointnet.modules.multimeter_reporter module
    - `MultimeterMod`
      - `MultimeterMod.finalize()`
      - `MultimeterMod.initialize()`
    - `create_multimeter()`
    - `create_multimeter_nest2()`
    - `create_multimeter_nest3()`
    - `read_dat()`
    - `read_dat_nest2()`
    - `read_dat_nest3()`
  - bmtk.simulator.pointnet.modules.record_spikes module
    - `SpikesMod`
      - `SpikesMod.finalize()`
      - `SpikesMod.initialize()`
    - `create_spike_detector()`
    - `create_spike_detector_nest2()`
    - `create_spike_detector_nest3()`
    - `read_spikes_file()`
    - `read_spikes_file_nest2()`
    - `read_spikes_file_nest3()`
  - bmtk.simulator.pointnet.modules.sim_module module
    - `SimulatorMod`
      - `SimulatorMod.block()`
      - `SimulatorMod.finalize()`
      - `SimulatorMod.initialize()`
      - `SimulatorMod.preload()`
      - `SimulatorMod.step()`
  - bmtk.simulator.pointnet.modules.spikes_inputs module
    - `SpikesInputsMod`
      - `SpikesInputsMod.initialize()`
  - bmtk.simulator.pointnet.modules.weight_recorder module
    - `WeightRecorder`
      - `WeightRecorder.finalize()`
      - `WeightRecorder.preload()`
  - Module contents

## Submodules

## bmtk.simulator.pointnet.config module

class bmtk.simulator.pointnet.config.Config(dict_obj)

  Bases: `SimulationConfig`

  property io

bmtk.simulator.pointnet.config.from_dict(config_file, validate=False)

bmtk.simulator.pointnet.config.from_json(config_file, validate=False)

## bmtk.simulator.pointnet.gids module

class bmtk.simulator.pointnet.gids.GidPool

  Bases: `object`

  add(name, node_id, gid)
  add_gids(name, node_ids, gids)
  add_nestids(name, node_ids, nest_ids)
  create_pool(name)
  get_gid(name, node_id)
  get_gids(name, node_ids)
  get_nestids(name, node_ids)
  get_node_ids(nest_ids, with_populations=True)
  get_pool_id(gid)
  property gids
  property nestid2nodeid_df
  property populations

class bmtk.simulator.pointnet.gids.PopulationID(node_id, population)

  Bases: `tuple`

  node_id

    Alias for field number 0

  population

    Alias for field number 1

bmtk.simulator.pointnet.gids.ids2list(nest_ids)

bmtk.simulator.pointnet.gids.ids2list_nest2(nest_ids)

bmtk.simulator.pointnet.gids.ids2list_nest3(nest_ids)

## bmtk.simulator.pointnet.glif_utils module

bmtk.simulator.pointnet.glif_utils.convert_aibs2nest(model_template, dynamics_params)

bmtk.simulator.pointnet.glif_utils.converter_builtin(model_template, dynamics_params)

bmtk.simulator.pointnet.glif_utils.converter_modules(model_template, dynamics_params)

bmtk.simulator.pointnet.glif_utils.lif_aibs_converter(config, tau_syn=[5.5, 8.5, 2.8, 5.8])
  Parameters:

    config

  Returns:

bmtk.simulator.pointnet.glif_utils.lif_asc_aibs_converter(config, tau_syn=[5.5, 8.5, 2.8, 5.8])
  Parameters:

    config

  Returns:

bmtk.simulator.pointnet.glif_utils.lif_asc_psc_aibs_converter(config, syn_tau=[5.5, 8.5, 2.8, 5.8])

  Creates a nest glif_lif_asc_psc object

bmtk.simulator.pointnet.glif_utils.lif_psc_aibs_converter(config, syn_tau=[5.5, 8.5, 2.8, 5.8])

  Creates a nest glif_lif_psc object

bmtk.simulator.pointnet.glif_utils.lif_r_aibs_converter(config)
  Parameters:

    config

  Returns:

bmtk.simulator.pointnet.glif_utils.lif_r_asc_a_aibs_converter(config)

  Creates a nest glif_lif_r_asc_a object

bmtk.simulator.pointnet.glif_utils.lif_r_asc_a_psc_aibs_converter(config, syn_tau=[5.5, 8.5, 2.8, 5.8])

  Creates a nest glif_lif_r_asc_a_psc object

bmtk.simulator.pointnet.glif_utils.lif_r_asc_aibs_converter(config)

  Creates a nest glif_lif_r_asc object

bmtk.simulator.pointnet.glif_utils.lif_r_asc_psc_aibs_converter(config, syn_tau=[5.5, 8.5, 2.8, 5.8])

  Creates a nest glif_lif_r_asc_psc object

bmtk.simulator.pointnet.glif_utils.lif_r_psc_aibs_converter(config, syn_tau=[5.5, 8.5, 2.8, 5.8])

  Creates a nest glif_lif_r_psc object

## bmtk.simulator.pointnet.io_tools module

Functions for logging, writing and reading from file.

class bmtk.simulator.pointnet.io_tools.NestIOUtils

  Bases: `IOUtils`

  barrier()

    MPI Barrier call

  quiet_simulator()

    Turns off logging/messages of the native simulator

  setup_output_dir(config_dir, log_file, overwrite=True)

## bmtk.simulator.pointnet.nest_utils module

bmtk.simulator.pointnet.nest_utils.get_version()

  Trys to get NEST version major, minor, and patch (optional) of the current running version of nest. Will return as a list of ints [major, minor, patch], although patch may be None.

  Returns:

    [major, minor, patch] if able to parse version, None if fails. ‘patch’ may be None value.

## bmtk.simulator.pointnet.pointnetwork module

class bmtk.simulator.pointnet.pointnetwork.PointNetwork(**properties)

  Bases: `SimNetwork`

  add_nest_module(module_path)
  add_spike_trains(spike_trains, node_set, sg_params={'precise_times': True})
  add_weight_function(fnc, name=None, **kwargs)
  build_nodes()
  build_recurrent_edges(force_resolution=False)
  find_edges(source_nodes=None, target_nodes=None)
  get_node_id(population, node_id)
  get_nodes_df(population)
  get_weight_function(name)
  property gid_map
  property gid_pool
  property py_function_caches
  set_default_weight_function(fnc)

bmtk.simulator.pointnet.pointnetwork.set_spikes(node_id, nest_obj, spike_trains)

bmtk.simulator.pointnet.pointnetwork.set_spikes_nest2(node_id, nest_obj, spike_trains)

bmtk.simulator.pointnet.pointnetwork.set_spikes_nest3(node_id, nest_obj, spike_trains)

## bmtk.simulator.pointnet.pointsimulator module

class bmtk.simulator.pointnet.pointsimulator.PointSimulator(graph, dt=0.001, overwrite=True, print_time=False, n_thread=1)

  Bases: `Simulator`

  add_mod(mod)
  property dt
  classmethod from_config(configure, graph, n_thread=None)
  get_spike_generator_params()
  property gid_map
  property n_steps
  property net
  run(tstop=None)
  set_spike_generator_params(**params)
  simulation_time(units='ms')
  property tstart
  property tstop

## bmtk.simulator.pointnet.property_map module

class bmtk.simulator.pointnet.property_map.EdgePropertyMap(graph, source_population, target_population)

  Bases: `object`

  classmethod build_map(edge_group, biograph)
  synaptic_model(edge)
  synpatic_params(edge)

class bmtk.simulator.pointnet.property_map.NodePropertyMap(graph)

  Bases: `object`

  classmethod build_map(node_group, graph)
  load_cell(node)

bmtk.simulator.pointnet.property_map.gid(self, node)

bmtk.simulator.pointnet.property_map.group_dynamics_params(self, node)

bmtk.simulator.pointnet.property_map.model_params(self, node)

bmtk.simulator.pointnet.property_map.model_params_batched(self, node_type_id)

bmtk.simulator.pointnet.property_map.model_type(self, node)

bmtk.simulator.pointnet.property_map.model_type_batched(self, node_type_id)

bmtk.simulator.pointnet.property_map.no_syns(self, edge)

bmtk.simulator.pointnet.property_map.node_id(self, node)

bmtk.simulator.pointnet.property_map.nsyns(self, edge)

bmtk.simulator.pointnet.property_map.syn_weight(self, edge)

bmtk.simulator.pointnet.property_map.types_dynamics_params(self, node)

bmtk.simulator.pointnet.property_map.weight_function(self, edge)

## bmtk.simulator.pointnet.pyfunction_cache module

## bmtk.simulator.pointnet.sonata_adaptors module

class bmtk.simulator.pointnet.sonata_adaptors.PointEdge(sonata_edge, edge_adaptor)

  Bases: `SonataBaseEdge`

  property nest_params
  property source_node_ids
  property target_node_ids

class bmtk.simulator.pointnet.sonata_adaptors.PointEdgeAdaptor(network)

  Bases: `EdgeAdaptor`

  property batch_process
  get_batches(edge_group)
  get_edge(sonata_node)
  static patch_adaptor(adaptor, edge_group)
  static preprocess_edge_types(network, edge_population)
  synaptic_params(edge)

class bmtk.simulator.pointnet.sonata_adaptors.PointEdgeBatched(source_nids, target_nids, nest_params)

  Bases: `object`

  property nest_params
  property source_node_ids
  property target_node_ids

class bmtk.simulator.pointnet.sonata_adaptors.PointNode(node, prop_adaptor)

  Bases: `SonataBaseNode`

  build()
  property gids
  property n_nodes
  property nest_ids
  property nest_model
  property nest_params
  property node_ids

class bmtk.simulator.pointnet.sonata_adaptors.PointNodeAdaptor(network)

  Bases: `NodeAdaptor`

  property batch_process
  get_batches(node_group)
  get_node(sonata_node)
  static patch_adaptor(adaptor, node_group, network)
  static preprocess_node_types(network, node_population)

class bmtk.simulator.pointnet.sonata_adaptors.PointNodeBatched(node_ids, gids, node_types_table, node_type_id, grp_indices, node_group)

  Bases: `object`

  build()
  property gids
  property model_name
  property model_schema
  property model_template
  property model_type
  property n_nodes
  property nest_ids
  property nest_model
  property nest_params
  property node_ids

bmtk.simulator.pointnet.sonata_adaptors.all_null(node_group, column_name)

  Helper function to determine if a column has any non-NULL values

bmtk.simulator.pointnet.sonata_adaptors.point_syn_weight(self, edge, src_node, trg_node)

## bmtk.simulator.pointnet.utils module

bmtk.simulator.pointnet.utils.gen_recurrent_csv(num, offset, csv_file)

bmtk.simulator.pointnet.utils.gen_recurrent_h5(num, offset, h5_file)

bmtk.simulator.pointnet.utils.load_conns(cnn_fn)

  load information regarding connectivity from csv files

  Parameters:
    cnn_fn: json file name for connection information
  Returns:
    connection dictionary

bmtk.simulator.pointnet.utils.load_params(node_name, model_name)

  load information regarding nodes and cell_models from csv files

  Parameters:
    node_name: json file name for node information
    model_name: json file name for neuron model information
  Returns:
    node_info: 2d array of node info read out from the json file
    mode_info: 2d array of model info read out from the json file
    dict_coordinates: dictionary of coordinates. keyword is the node_id and entries are the x,y and z coordinates.

bmtk.simulator.pointnet.utils.read_LGN_activity(trial_num, file_name)

bmtk.simulator.pointnet.utils.read_conns(file_name)

## Module contents