StimFreq = 60 //(Hz)
StimCount = 1
StimSpace = tstop / StimCount
StimDurRatio = 0.8
pool = new Vector(Totals.x(EC))
pool.indgen(0, 29, 1)
objref Pat1, Pat2
Pat1 = new Vector()
Pat1 = GenerateVector(12)
for j = 0, StimCount-1 {
stim= new NetStim(0.5)
stim.interval = (1/ StimFreq) * 1000
stim.start = j * (StimSpace) +1
stim.number = 1 //(StimSpace * StimDurRatio) / stim.interval
// Pat2 = new Vector()
// Pat2 = GenerateVector(1)
// Pat1.append(Pat2.x(0))
applyStim(stim, Pat1, 10)
Stims.append(stim)
} //for j
obfunc ParseTrials() { localobj spikes, activity, spikeT, spikeID
spikeT = $o1
spikeID = $o2
simTime = $3
binCount = $4
neuronCount = $5
binDuration = simTime/binCount
activity = new Matrix(neuronCount, binCount)
for t = 0, spikeT.size() -1 {
ind = int(spikeT.x(t) / binDuration)
activity.x(spikeID.x(t), ind) +=1
} // for t
return (activity)
}