Neighboring events include those whose peak is at site K (n1 events), or whose second highest peak is at site K (n2 spikes). Thus, there are n1+n2 neighboring events for n1 events at site K.
To deal with probe drift, events that occur close in time are considered as neighbors. Otherwise, temporally proximal neighbors are considered such that |to_i-to_j| < (n1+n2)/P.nTime_clu; to_i: temporal order of spike i; to_j: temporal order of spike j (Graphics to be added)