File: radiation.py

package info (click to toggle)
python-quantities 0.16.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 864 kB
  • sloc: python: 8,006; makefile: 72; sh: 3
file content (56 lines) | stat: -rw-r--r-- 1,033 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
"""
"""

from ..unitquantity import UnitQuantity
from .time import s
from .mass import kg
from .energy import J
from .electromagnetism import coulomb


Bq = becquerel = UnitQuantity(
    'becquerel',
    1/s,
    symbol='Bq',
    aliases=['becquerels']
)
Ci = curie = UnitQuantity(
    'curie',
    3.7e10*becquerel,
    symbol='Ci',
    aliases=['curies']
)
rd = rutherford = UnitQuantity(
    'rutherford',
    1e6*Bq,
    symbol='Rd',
    aliases=['rutherfords'],
    doc='this unit is obsolete, in favor of 1e6 Bq'
)
Gy = gray = Sv = sievert = UnitQuantity(
    'gray',
    J/kg,
    symbol='Gy',
    aliases=['grays', 'Sv', 'sievert', 'sieverts']
)
rem = UnitQuantity(
    'rem',
    1e-2*sievert,
    aliases=['rems']
)
rads = UnitQuantity(
    'rads',
    1e-2*gray,
    doc='''
    rad is commonly used symbol for radian. 
    rads unit of radiation is deprecated.
    '''
)
R = roentgen = UnitQuantity(
    'roentgen',
    2.58e-4*coulomb/kg,
    symbol='R',
    aliases=['roentgens']
)

del UnitQuantity, s, kg, J, coulomb