Changeset 362
- Timestamp:
- 12/08/08 18:35:59 (3 years ago)
- Location:
- trunk
- Files:
-
- 7 modified
-
examples/sfn2008/sfn_example_simulated_data.py (modified) (1 diff)
-
examples/sfn2008/sfn_example_stgen.py (modified) (2 diffs)
-
examples/single_neuron/CRF_neuron_vs_signal.py (modified) (1 diff)
-
examples/single_neuron/SpikeTrain2Play.wav (modified) (previous)
-
examples/single_neuron/results/fig-CRF_neuron_vs_signal.png (modified) (previous)
-
src/__init__.py (modified) (2 diffs)
-
src/signals.py (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/sfn2008/sfn_example_simulated_data.py
r350 r362 28 28 29 29 # isi distribution 30 hs = s.isi_hist() 31 pylab.figure() 32 pylab.plot(hs[1],hs[0]) 30 hs = s.isi_hist(bins=20, display=True) 33 31 34 32 -
trunk/examples/sfn2008/sfn_example_stgen.py
r350 r362 29 29 print "Spiketrain 1:" 30 30 print "mean rate: %f" % st1.mean_rate() 31 print "coefficient of varia nce: %f" % st1.cv_isi()31 print "coefficient of variation: %f" % st1.cv_isi() 32 32 print "fano factor: %f" % st1.fano_factor_isi() 33 33 … … 35 35 print "Spiketrain 2:" 36 36 print "mean rate: %f" % st2.mean_rate() 37 print "coefficient of varia nce: %f" % st2.cv_isi()37 print "coefficient of variation: %f" % st2.cv_isi() 38 38 print "fano factor: %f" % st2.fano_factor_isi() 39 39 -
trunk/examples/single_neuron/CRF_neuron_vs_signal.py
r326 r362 27 27 28 28 29 N_exp_snr = 2 529 N_exp_snr = 20 30 30 N_exp_noise = 9 31 31 -
trunk/src/__init__.py
r358 r362 3 3 ========== 4 4 5 NeuroTools is not a neural simulator, but rathera collection of tools5 NeuroTools is not a neural simulator, but a collection of tools 6 6 to support all tasks associated with a neural simulation project which 7 7 are not handled by the simulation engine. … … 42 42 ######################################################### 43 43 44 # The nice thing would be to gather edevery non standard44 # The nice thing would be to gather every non standard 45 45 # dependency here, in order to centralize the warning 46 46 # messages and the check -
trunk/src/signals.py
r358 r362 316 316 can use the average irregularity across all neurons. 317 317 318 http://en.wikipedia.org/wiki/Coefficient_of_variation 319 318 320 See also 319 321 isi, cv_kl … … 351 353 """ 352 354 isi = self.isi() / 1000. 353 if len(isi) == 0:355 if len(isi) < 2: 354 356 logging.debug("Warning, a CV can't be computed because there are not enough spikes") 355 357 return numpy.nan … … 357 359 if newnum: 358 360 proba_isi, xaxis = numpy.histogram(isi, bins=bins, normed=True, new=True) 359 #xaxis = xaxis[:len(xaxis)-1]361 xaxis = xaxis[:-1] 360 362 else: 361 363 proba_isi, xaxis = numpy.histogram(isi, bins=bins, normed=True) … … 374 376 375 377 The Fano Factor is defined as the variance of the isi divided by the mean of the isi 378 379 http://en.wikipedia.org/wiki/Fano_factor 376 380 377 381 See also … … 1169 1173 if newnum: 1170 1174 values, xaxis = numpy.histogram(isis, bins=bins, normed=True, new=newnum) 1171 xaxis = xaxis[: len(xaxis)-1]1175 xaxis = xaxis[:-1] 1172 1176 else: 1173 1177 values, xaxis = numpy.histogram(isis, bins=bins, normed=True) … … 1177 1181 else: 1178 1182 xlabel = "Inter Spike Interval (ms)" 1179 ylabel = " % of Neurons"1183 ylabel = "Probability" 1180 1184 set_labels(subplot, xlabel, ylabel) 1181 1185 subplot.plot(xaxis, values, **kwargs) 1186 subplot.yticks([]) # arbitrary units 1182 1187 pylab.draw() 1183 1188 … … 1263 1268 if newnum: 1264 1269 values, xaxis = numpy.histogram(cvs, bins=bins, normed=True, new=newnum) 1265 xaxis = xaxis[: len(xaxis)-1]1270 xaxis = xaxis[:-1] 1266 1271 else: 1267 1272 values, xaxis = numpy.histogram(cvs, bins=bins, normed=True) … … 1412 1417 if newnum: 1413 1418 values, xaxis = numpy.histogram(rates, nbins, normed=True, new=newnum) 1414 xaxis = xaxis[: len(xaxis)-1]1419 xaxis = xaxis[:-1] 1415 1420 else: 1416 1421 values, xaxis = numpy.histogram(rates, nbins, normed=True)
