if (myCollectSpikesFlag && (myCollectSpikesRatio == 1 || i % myCollectSpikesRatio == 0)) {
try {
InstantaneousOutput output = myNodes[i].getOrigin(Neuron.AXON).getValues();
if (output instanceof PreciseSpikeOutput) {
PreciseSpikeOutput precise=((PreciseSpikeOutput) output);
if (precise.getValues()[0]) {
mySpikePattern.addSpike(i, endTime+precise.getSpikeTimes()[0]);
}
} else if (output instanceof SpikeOutput && ((SpikeOutput) output).getValues()[0]) {
mySpikePattern.addSpike(i, endTime);
}
} catch (StructuralException e) {