File: hrf_delta.py

package info (click to toggle)
nipy 0.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,352 kB
  • sloc: python: 39,115; ansic: 30,931; makefile: 210; sh: 93
file content (25 lines) | stat: -rw-r--r-- 509 bytes parent folder | download | duplicates (3)
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
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
This plot demonstrates a neuronal model that is a sum
of delta functions times coefficient values
"""

import matplotlib.pyplot as plt

# Coefficients for a and b
ba = 1
bb = -2

# Times for a and b
ta = [0,4,8,12,16]
tb = [2,6,10,14,18]

for t in ta:
    plt.plot([t,t],[0,ba],c='r')
for t in tb:
    plt.plot([t,t],[0,bb],c='b')

a = plt.gca()
a.set_xlabel(r'$t$')
a.set_ylabel(r'$n(t)$')