File: examples-frompapers-computing with neural synchrony-coincidence detection and synchrony_Fig1C.txt

package info (click to toggle)
brian 1.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, stretch
  • size: 23,436 kB
  • sloc: python: 68,707; cpp: 29,040; ansic: 5,182; sh: 111; makefile: 61
file content (58 lines) | stat: -rw-r--r-- 1,509 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.. currentmodule:: brian

.. index::
   pair: example usage; subplot
   pair: example usage; plot
   pair: example usage; loadtxt
   pair: example usage; log
   pair: example usage; figure
   pair: example usage; show
   pair: example usage; savefig
   pair: example usage; rc
   pair: example usage; xlabel
   pair: example usage; ylabel
   pair: example usage; ylim

.. _example-frompapers-computing with neural synchrony-coincidence detection and synchrony_Fig1C:

Example: Fig1C (frompapers/computing with neural synchrony/coincidence detection and synchrony)
===============================================================================================

Timescale and strength

::

    from brian import *
    
    rc('lines',linewidth=2)
    rc('font',size=16)
    rc('xtick',labelsize=16)
    rc('ytick',labelsize=16)
    rc('legend',fontsize=16)
    rc('axes',labelsize=16,titlesize=16)
    w,h=rcParamsDefault['figure.figsize']
    fontsize=16
    
    SNR,timescale,strength=loadtxt('reproducibility.txt')
    SNR=10*log(SNR)/log(10)
    #SNR=SNR[1:]
    #timescale=timescale[1:]
    #strength=strength[1:]
    
    figure(figsize=(w*1.5,h*.5))
    subplot(121)
    plot(SNR,timescale/ms,'k')
    #plot(SNR,timescale/ms,'r.')
    plot(SNR,0*SNR+7,'k--')
    xlabel('SNR (dB)')
    ylabel('Precision (ms)')
    subplot(122)
    plot(SNR,strength*100,'k')
    ylim(0,100)
    #plot(SNR,strength*100,'r.')
    xlabel('SNR (dB)')
    ylabel('Reliability (%)')
    savefig('FigC.eps')
    show()