#include <spiking_utils.hpp>
|
template<typename T > |
static PopulationBase | add_typed_population (Network &network, const NeuronParameter &neuronParams, const size_t size, const typename T::Signals &rec_signal=typename T::Signals().record_spikes()) |
|
template<typename T > |
static cypress::PopulationBase | add_typed_population_no_record (Network &network, const NeuronParameter &neuronParams, const size_t size) |
|
static const NeuronType & | detect_type (std::string neuron_type_str) |
|
static cypress::PopulationBase | add_population (const std::string neuron_type_str, Network &network, const NeuronParameter &neuronParams, const size_t size, const std::string record_signal="") |
|
static bool | rerun_fixed_number_trials (Network &network, Backend &backend, Real time, size_t n_trials=3) |
|
static int | calc_num_spikes (const std::vector< cypress::Real > &spiketrain, const cypress::Real start=0.0, const cypress::Real end=0.0) |
| Calculate the number of spikes of spiketrain in interval [start,stop]. More...
|
|
template<typename T > |
static std::vector< int > | calc_num_spikes_vec (const cypress::Matrix< T > &spiketrains, const cypress::Real start=0.0, const cypress::Real end=std::numeric_limits< cypress::Real >::max()) |
| Calculate the number of spikes in a vector of spiketrains in intervall [start,stop]. More...
|
|
template<typename T > |
static std::vector< T > | spike_time_binning (const Real &start, const Real &stop, const size_t &n_bins, const std::vector< cypress::Real > &spike_times) |
|
static std::vector< Real > | spike_time_binning_TTFS (const Real &start, const Real &stop, const size_t &n_bins, const std::vector< cypress::Real > &spike_times) |
|
Runs SpikingUtils::add_typed_population, but gets a string containing the neuron type instead of a template argument
- Parameters
-
neuron_type_str | string naming the neuron type |
network | instace in wich the population is placed |
neuronParams | Neuron parameters of the cell in the population |
size | Number of neurons in the population |
record_signal | string of the signal to be recorded by the backend, e.g. "spikes" or "v" |
template<typename T >
static PopulationBase cypress::SpikingUtils::add_typed_population |
( |
Network & |
network, |
|
|
const NeuronParameter & |
neuronParams, |
|
|
const size_t |
size, |
|
|
const typename T::Signals & |
rec_signal = typename T::Signals().record_spikes() |
|
) |
| |
|
inlinestatic |
Creates a population of type T and adds them to m_net
- Parameters
-
network | instace in wich the population is placed |
neuronParams | Neuron parameters of the cell in the population |
size | Number of neurons in the population |
rec_signal | signal to be recorded by the backend |
- Returns
- Network containing the add Population (same as network)
Creates a population of type T and adds them to m_net without recording
- Parameters
-
network | instace in wich the population is placed |
neuronParams | Neuron parameters of the cell in the population |
size | Number of neurons in the population |
- Returns
- Network containing the add Population (same as network)
Calculate the number of spikes of spiketrain in interval [start,stop].
- Parameters
-
spiketrain | The spiketrain for which the number of spikes should be calculated |
start | Timepoint from which counting starts |
end | Endpoint where counting stops |
- Returns
- int returns the number of spikes in [start, stop]
Calculate the number of spikes in a vector of spiketrains in intervall [start,stop].
- Parameters
-
spiketrains | The vector of spiketrains for which the number of spikes should be calculated |
start | Timepoint from which counting starts |
end | Endpoint where counting stops, leave empty to count all |
- Returns
- int returns the number of spikes in [start, stop]
static const NeuronType& cypress::SpikingUtils::detect_type |
( |
std::string |
neuron_type_str | ) |
|
|
static |
Generates a NeuronType object from a string
- Parameters
-
neuron_type_str | string naming the neuron type |
- Returns
- the corresponding NeuronType object
static bool cypress::SpikingUtils::rerun_fixed_number_trials |
( |
Network & |
network, |
|
|
Backend & |
backend, |
|
|
Real |
time, |
|
|
size_t |
n_trials = 3 |
|
) |
| |
|
static |
Tries to run the simulation on given backend several times if backend produces an unexpected error (needed for e.g. BrainScaleS).
- Parameters
-
network | network object to simulate |
backend | target of the simulation |
time | simulation time |
n_trials | number of trials before giving up |
- Returns
- true if simulation was succesful
template<typename T >
static std::vector<T> cypress::SpikingUtils::spike_time_binning |
( |
const Real & |
start, |
|
|
const Real & |
stop, |
|
|
const size_t & |
n_bins, |
|
|
const std::vector< cypress::Real > & |
spike_times |
|
) |
| |
|
inlinestatic |
Calculate the number of spikes in given intervals (bins) of a single spike train. Size of bins is calculated from start, stop and the number of bins n_bins
- Parameters
-
start | time for starting the binning. First bin is [start, start + bin_size] |
stop | end time of last bin |
n_bins | number of bins |
spike_times | vector containing spike times as given by neuron.signals().data(0) |
- Returns
- A vector with each entry representing a bin, containing the number of spikes that appeared in that bin
static std::vector<Real> cypress::SpikingUtils::spike_time_binning_TTFS |
( |
const Real & |
start, |
|
|
const Real & |
stop, |
|
|
const size_t & |
n_bins, |
|
|
const std::vector< cypress::Real > & |
spike_times |
|
) |
| |
|
static |
Calculate the first spike in given intervals (bins) of a single spike train. Size of bins is calculated from start, stop and the number of bins n_bins
- Parameters
-
start | time for starting the binning. First bin is [start, start + bin_size] |
stop | end time of last bin |
n_bins | number of bins |
spike_times | vector containing spike times as given by neuron.signals().data(0) |
- Returns
- A vector with each entry representing a bin, containing the first spike that appeared in that bin
The documentation for this class was generated from the following file: