Fixed bug: external simulator has 0 duration lenght->spike_rate will use whol trace. Spike window is converted to integer in every function.