DimensionalPhysicalConstant
planck.models.DimensionalPhysicalConstant
ยค
DimensionalPhysicalConstant(symbol, name=None, values=None)
Bases: dict
Parameters:
Name | Type | Description | Default |
---|---|---|---|
symbol
|
str
|
Constant symbol |
required |
name
|
str
|
Constant name |
None
|
values
|
Dict[str, float]
|
Constant values expressed in different units |
None
|
Examples:
from planck import models
from planck import units
from planck import sp_constants
const = models.DimensionalPhysicalConstant(
symbol="g_acc",
name="Gravitational acceleration",
values={
"m/s2": sp_constants.g,
"ft/s2": sp_constants.g * units["m"]["ft"],
},
)
print(const)
'''
Gravitational acceleration [g_acc]:
{'m/s2': 9.80665, 'ft/s2': 32.17404855643045}
'''
Source code in planck/models/dimensionalphysicalconstant.py
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 |
|