# How to simulate spike trains?
Spikes generated spontaneously by neurons, a process termed spontaneous activity, which is hypothesised to be characterised by a reduced number of spikes generated at a lower firing rate.
It has been hypothesised by the scientific community for some time that a single burst should comprise at least three spikes and be generated at a high firing rate. This is believed to result in smaller ISI values in the burst compared to other neuronal activity patterns.
It has been established that Pause possesses a larger ISI value. In the electrical activities of some neurons, a typical burst is often preceded by a pause.
Tonic is defined as a pattern that demonstrates regularity. Its visual feature is that all ISI values within each tonic are similar.
Firstly, four patterns are provided for the user to select according to your needs: Spontaneous Activity, Burst, Pause and Tonic. If you don't require one or more of these patterns, you can set the values to 0. Otherwise, the ratio of the various patterns can be designed as your expect (the sum of patterns value is 1).
Secondly, you need to consider the minimum number of spikes in each pattern, or a range. At the same time, you need to determine the range of ISI values in each pattern, which will help you more clearly identify the pattern you want. Scientific studies have demonstrated the existence of specific rules governing the distribution of ISI, with the gamma distribution being particularly effective in reflecting the ISI distribution in neuronal spike trains. Of course, you can also choose other distribution types.
Ultimately, the duration of each spike train can be selected. Additionally, the number of neurons is selectable, with the assumption that each spike train is generated by a single neuron.
In this way, you will get the spike train you want, click download to get the data stored in .csv file format, and the ISI distribution plots. If necessary, you can set some additional parameters, which are more complicated to set.