File: stdunits.py

package info (click to toggle)
brian 2.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,872 kB
  • sloc: python: 51,820; cpp: 2,033; makefile: 108; sh: 72
file content (142 lines) | stat: -rw-r--r-- 1,934 bytes parent folder | download | duplicates (2)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
######### PHYSICAL UNIT NAMES #####################
# ------------------------------------ Dan Goodman -
# These are optional shorthand unit names which in
# most circumstances shouldn't clash with local names

"""Optional short unit names

This module defines the following short unit names:

mV, mA, uA (micro_amp), nA, pA, mF, uF, nF, nS, mS, uS, ms,
Hz, kHz, MHz, cm, cm2, cm3, mm, mm2, mm3, um, um2, um3
"""
# isort:skip_file

from .allunits import (
    mvolt,
    mamp,
    uamp,
    namp,
    pamp,
    pfarad,
    ufarad,
    nfarad,
    nsiemens,
    usiemens,
    msiemens,
    msecond,
    usecond,
    hertz,
    khertz,
    Mhertz,
    cmetre,
    cmetre2,
    cmetre3,
    mmetre,
    mmetre2,
    mmetre3,
    umetre,
    umetre2,
    umetre3,
    mmolar,
    umolar,
    nmolar,
)
from .allunits import all_units

__all__ = [
    "mV",
    "mA",
    "uA",
    "nA",
    "pA",
    "pF",
    "uF",
    "nF",
    "nS",
    "uS",
    "mS",
    "ms",
    "us",
    "Hz",
    "kHz",
    "MHz",
    "cm",
    "cm2",
    "cm3",
    "mm",
    "mm2",
    "mm3",
    "um",
    "um2",
    "um3",
    "mM",
    "uM",
    "nM",
]
mV = mvolt

mA = mamp
uA = uamp
nA = namp
pA = pamp

pF = pfarad
uF = ufarad
nF = nfarad

nS = nsiemens
uS = usiemens
mS = msiemens

ms = msecond
us = usecond

Hz = hertz
kHz = khertz
MHz = Mhertz

cm = cmetre
cm2 = cmetre2
cm3 = cmetre3
mm = mmetre
mm2 = mmetre2
mm3 = mmetre3
um = umetre
um2 = umetre2
um3 = umetre3

mM = mmolar
uM = umolar
nM = nmolar

stdunits = {
    "mV": mV,
    "mA": mA,
    "uA": uA,
    "nA": nA,
    "pA": pA,
    "pF": pF,
    "uF": uF,
    "nF": nF,
    "nS": nS,
    "uS": uS,
    "ms": ms,
    "us": us,
    "Hz": Hz,
    "kHz": kHz,
    "MHz": MHz,
    "cm": cm,
    "cm2": cm2,
    "cm3": cm3,
    "mm": mm,
    "mm2": mm2,
    "mm3": mm3,
    "um": um,
    "um2": um2,
    "um3": um3,
    "mM": mM,
    "uM": uM,
    "nM": nM,
}
all_units.extend(stdunits.values())