Once the signal is filtered, the spikes are detected. Amplitude thresholding is commonly used, although other spike detection methods have been implemented, e.g., two-point procedure (Borghi et al., 2007; Maccione et al., 2009) and template-matching (Kim and McNames, 2007). The threshold is usually set as a multiple (5 times) of the baseline noise level, calculated as the root mean square (RMS) of the signals with a mean value of zero. In the presence of many spikes, the threshold can be estimated using a measure based on the median, which is less sensitive to outliers and therefore more robust with regard to spike frequency (Quian Quiroga et al., 2004).