miv_simulator.spikedata#

Functions

get_env_spike_dict(env[, include_artificial])

Constructs a dictionary with per-gid per-trial spike times from the output vectors with spike times and gids contained in env.

make_spike_dict(spkinds, spkts)

Given arrays with cell indices and spike times, returns a dictionary with per-cell spike times.

read_spike_events(input_file, ...[, ...])

Reads spike trains from a NeuroH5 file, and returns a dictionary with spike times and cell indices.

spike_bin_counts(spkdict, time_bins)

spike_density_estimate(population, spkdict, ...)

Calculates spike density function for the given spike trains.

miv_simulator.spikedata.get_env_spike_dict(env, include_artificial=True)[source]#

Constructs a dictionary with per-gid per-trial spike times from the output vectors with spike times and gids contained in env.

Return type:

Dict[str, Dict[uint32, List[ndarray]]]

miv_simulator.spikedata.read_spike_events(input_file, population_names, namespace_id, spike_train_attr_name='t', time_range=None, max_spikes=None, n_trials=-1, merge_trials=False, comm=None, io_size=0, include_artificial=True)[source]#

Reads spike trains from a NeuroH5 file, and returns a dictionary with spike times and cell indices. :type input_file: :param input_file: str (path to file) :type population_names: :param population_names: list of str :type namespace_id: :param namespace_id: str :type spike_train_attr_name: :param spike_train_attr_name: str :type time_range: :param time_range: list of float :type max_spikes: :param max_spikes: float :type n_trials: :param n_trials: int :type merge_trials: :param merge_trials: bool :return: dict

miv_simulator.spikedata.make_spike_dict(spkinds, spkts)[source]#

Given arrays with cell indices and spike times, returns a dictionary with per-cell spike times.

miv_simulator.spikedata.spike_density_estimate(population, spkdict, time_bins, arena_id=None, trajectory_id=None, output_file_path=None, progress=False, inferred_rate_attr_name='Inferred Rate Map', **kwargs)[source]#

Calculates spike density function for the given spike trains. :type population: :param population: :type spkdict: :param spkdict: :type time_bins: :param time_bins: :type arena_id: :param arena_id: str :type trajectory_id: :param trajectory_id: str :type output_file_path: :param output_file_path: :type progress: :param progress: :type inferred_rate_attr_name: :param inferred_rate_attr_name: str :type kwargs: :param kwargs: dict :return: dict