From 9976f4e3df74f3243c344ef6cd42fcbf757ca2d9 Mon Sep 17 00:00:00 2001 From: lucas-wilkins Date: Mon, 5 Aug 2024 09:14:59 +0100 Subject: [PATCH 1/3] Some units --- sasdata/data.py | 3 +- sasdata/metadata.py | 36 ++++++++++---- sasdata/quantities/quantities.py | 49 ++++++++++++++++++- sasdata/quantities/units_table.py | 78 +++++++++++++++++++++++++++++++ 4 files changed, 155 insertions(+), 11 deletions(-) create mode 100644 sasdata/quantities/units_table.py diff --git a/sasdata/data.py b/sasdata/data.py index 29eb7d1..f8e31e1 100644 --- a/sasdata/data.py +++ b/sasdata/data.py @@ -1,5 +1,6 @@ from dataclasses import dataclass -from units_temp import Quantity, NamedQuantity +from quantities.quantities import Quantity, NamedQuantity +from sasdata.metadata import MetaData import numpy as np diff --git a/sasdata/metadata.py b/sasdata/metadata.py index 4377fd2..894a71e 100644 --- a/sasdata/metadata.py +++ b/sasdata/metadata.py @@ -1,4 +1,4 @@ -from typing import Generic, TypeVar +from typing import TypeVar from numpy._typing import ArrayLike @@ -8,14 +8,11 @@ class RawMetaData: pass -class MetaData: - pass - FieldDataType = TypeVar("FieldDataType") OutputDataType = TypeVar("OutputDataType") -class Accessor(Generic[FieldDataType, OutputDataType]): +class Accessor[FieldDataType, OutputDataType]: def __init__(self, target_field: str): self._target_field = target_field @@ -33,18 +30,29 @@ def __init__(self, target_field: str, units_field: str | None = None): super().__init__(target_field) self._units_field = units_field - def _get_units(self) -> Unit: + def _units(self) -> Unit: pass def _raw_values(self) -> ArrayLike: pass + @property + def value(self) -> Quantity[ArrayLike]: + return Quantity(self._raw_values(), self._units()) + + +class StringAccessor(Accessor[str, str]): + + def _raw_values(self) -> str: + pass -class StringAccessor(Accessor[str]): @property def value(self) -> str: return self._raw_values() +# +# Quantity specific accessors, provides helper methods for quantities with known dimensionality +# class LengthAccessor(QuantityAccessor): @property @@ -61,4 +69,16 @@ class TemperatureAccessor(QuantityAccessor): class AbsoluteTemperatureAccessor(QuantityAccessor): - pass \ No newline at end of file + pass + + +# +# Main metadata object +# + + +class MetaData: + def __init__(self, raw: RawMetaData): + self._raw = raw + + # Put the structure of the metadata that should be exposed to a power-user / developer in here diff --git a/sasdata/quantities/quantities.py b/sasdata/quantities/quantities.py index 05ee51c..464f3c6 100644 --- a/sasdata/quantities/quantities.py +++ b/sasdata/quantities/quantities.py @@ -1,6 +1,9 @@ from typing import Collection, Sequence, TypeVar, Generic from dataclasses import dataclass +from numpy._typing import ArrayLike + + class Dimensions: """ @@ -58,6 +61,17 @@ def __pow__(self, power: int): self.current * power, self.temperature * power) + def __eq__(self, other: "Dimensions"): + if isinstance(other, Dimensions): + return (self.length == other.length and + self.time == other.time and + self.mass == other.mass and + self.current == other.current and + self.temperature == other.temperature) + + return NotImplemented + + @dataclass class UnitName: @@ -102,9 +116,12 @@ def __pow__(self, power: int): return Unit(self.scale**power, self.dimensions**power) + def equivalent(self, other: "Unit"): + return self.dimensions == other.dimensions + -QuantityType = TypeVar("QuantityType") -class Quantity(Generic[QuantityType]): +# QuantityType = TypeVar("QuantityType") +class Quantity[QuantityType]: def __init__(self, value: QuantityType, units: Unit): self.value = value self.units = units @@ -112,6 +129,34 @@ def __init__(self, value: QuantityType, units: Unit): def in_units_of(self, units: Unit) -> QuantityType: pass + def __mul__(self, other: ArrayLike | "Quantity" ) -> "Quantity": + if isinstance(other, Quantity): + pass + + else: + pass + + def __truediv__(self, other: float | "Quantity") -> "Quantity": + if isinstance(other, Quantity): + pass + + else: + pass + + def __rdiv__(self, other: float | "Quantity") -> "Quantity": + if isinstance(other, Quantity): + pass + + else: + pass + def __add__(self, other: "Quantity") -> "Quantity": + if isinstance(other, Quantity): + pass + + def __sub__(self, other: "Quantity") -> "Quantity": + if isinstance(other, Quantity): + pass + class ExpressionMethod: pass diff --git a/sasdata/quantities/units_table.py b/sasdata/quantities/units_table.py new file mode 100644 index 0000000..5a2d6b5 --- /dev/null +++ b/sasdata/quantities/units_table.py @@ -0,0 +1,78 @@ +""" +Builds a data file containing details of units +""" + +import numpy as np + +bigger_magnitudes = [ + ("E", None, "exa", 1e18), + ("P", None, "peta", 1e15), + ("T", None, "tera", 1e12), + ("G", None, "giga", 1e9), + ("M", None, "mega", 1e6), + ("k", None, "kilo", 1e3) ] + +smaller_magnitudes = [ + ("m", None, "milli", 1e-3), + ("u", "µ", "micro", 1e-6), + ("n", None, "nano", 1e-9), + ("p", None, "pico", 1e-12), + ("f", None, "femto", 1e-15), + ("a", None, "atto", 1e-18)] + +all_magnitudes = bigger_magnitudes + smaller_magnitudes + +# Length, time, mass, current, temperature +base_si_units = [ + ("m", None, "meter", "meters", 1, 1, 0, 0, 0, 0, all_magnitudes), + ("s", None, "second", "seconds", 1, 0, 1, 0, 0, 0, smaller_magnitudes), + ("g", None, "gram", "grams", 1, 0, 0, 1, 0, 0, all_magnitudes), + ("A", None, "amp", "amps", 1, 0, 0, 0, 1, 0, all_magnitudes), + ("K", None, "kelvin", "kelvin", 1, 0, 0, 0, 0, 1, all_magnitudes) ] + +derived_si_units = [ + ("Hz", None, "hertz", "hertz", 1, 0, -1, 0, 0, 0, all_magnitudes), + ("N", None, "newton", "newtons", 1, 1, -2, 1, 0, 0, all_magnitudes), + ("Pa", None, "pascal", "pascals", 1, -1, -2, 1, 0, 0, all_magnitudes), + ("J", None, "joule", "joules", 1, 2, -2, 1, 0, 0, all_magnitudes), + ("W", None, "watt", "watts", 1, 2, -3, 1, 0, 0, all_magnitudes), + ("C", None, "coulomb", "coulombs", 1, 0, 1, 0, 1, 0, all_magnitudes), + ("V", None, "volts", "volts", 1, 2, -3, 1, -1, 0, all_magnitudes), + ("Ohm", "Ω", "ohm", "ohms", 1, 2, -3, 1, -2, 0, all_magnitudes), + ("F", None, "farad", "farads", 1, -2, 4, -1, 2, 0, all_magnitudes), + ("S", None, "siemens", "siemens", 1, -2, 3, -1, 2, 0, all_magnitudes), + ("Wb", None, "weber", "webers", 1, 2, -2, 1, -1, 0, all_magnitudes), + ("T", None, "tesla", "tesla", 1, 2, -2, 1, -1, 0, all_magnitudes), + ("H", None, "henry", "henry", 1, 2, -2, 1, -2, 0, all_magnitudes), + ("C", None, "degree Celsius", "degrees Celsius", 1, 0, 0, 0, 0, 1, []) +] + +non_si_units = [ + ("A", None, "angstrom", "angstroms", 1e-10, 1, 0, 0, 0, 0, []), + ("min", None, "minute", "minutes", 60, 0, 1, 0, 0, 0, []), + ("hr", None, "hour", "hours", 360, 0, 1, 0, 0, 0, []), + ("d", None, "day", "days", 360*24, 0, 1, 0, 0, 0, []), + ("day", None, "day", "days", 360*24, 0, 1, 0, 0, 0, []), + ("y", None, "year", "years", 360*24*365.2425, 0, 1, 0, 0, 0, []), + ("yr", None, "year", "years", 360*24*365.2425, 0, 1, 0, 0, 0, []), + ("deg", None, "degree", "degrees", 180/np.pi, 0, 0, 0, 0, 0, []), + ("rad", None, "radian", "radians", 1, 0, 0, 0, 0, 0, []), + ("sr", None, "stradian", "stradians", 1, 0, 0, 0, 0, 0, []) +] + +all_units = base_si_units + derived_si_units + non_si_units + +encoding = "utf-8" + +with open("unit_data.txt", mode='w', encoding=encoding) as fid: + for symbol, special_symbol, singular, plural, scale, length, time, mass, current, temperature, magnitudes in all_units: + fid.write(f"'{symbol}', '{special_symbol}', '{singular}', '{plural}', ") + fid.write(f"{scale}, {length}, {time}, {mass}, {current}, {temperature}\n") + + for mag_symbol, mag_special_symbol, name, mag_scale in magnitudes: + + combined_symbol = (mag_symbol if mag_special_symbol is None else mag_special_symbol) + \ + (symbol if special_symbol is None else special_symbol) + + fid.write(f"'{mag_symbol}{symbol}', '{combined_symbol}', '{name}{singular}', '{name}{plural}', ") + fid.write(f"{scale * mag_scale}, {length}, {time}, {mass}, {current}, {temperature}\n") From 677008a94577687dc3458b896bcb297d2742f221 Mon Sep 17 00:00:00 2001 From: lucas-wilkins Date: Tue, 6 Aug 2024 10:23:39 +0100 Subject: [PATCH 2/3] Work towards outline --- sasdata/quantities/quantities.py | 131 ++---------------------------- sasdata/quantities/units_base.py | 118 +++++++++++++++++++++++++++ sasdata/quantities/units_table.py | 85 ++++++++++++++++++- sasdata/quantities/units_tests.py | 46 +++++++++++ 4 files changed, 254 insertions(+), 126 deletions(-) create mode 100644 sasdata/quantities/units_base.py create mode 100644 sasdata/quantities/units_tests.py diff --git a/sasdata/quantities/quantities.py b/sasdata/quantities/quantities.py index 464f3c6..8a001ba 100644 --- a/sasdata/quantities/quantities.py +++ b/sasdata/quantities/quantities.py @@ -1,126 +1,12 @@ -from typing import Collection, Sequence, TypeVar, Generic +from typing import Collection, Sequence, TypeVar, Generic, Self from dataclasses import dataclass from numpy._typing import ArrayLike +from sasdata.quantities.units_base import Unit -class Dimensions: - """ +QuantityType = TypeVar("QuantityType") - Note that some SI Base units are - - For example, moles and angular measures are dimensionless from this perspective, and candelas are - - """ - def __init__(self, - length: int = 0, - time: int = 0, - mass: int = 0, - current: int = 0, - temperature: int = 0): - - self.length = length - self.time = time - self.mass = mass - self.current = current - self.temperature = temperature - - def __mul__(self, other: "Dimensions"): - - if not isinstance(other, Dimensions): - return NotImplemented - - return Dimensions( - self.length + other.length, - self.time + other.time, - self.mass + other.mass, - self.current + other.current, - self.temperature + other.temperature) - - def __truediv__(self, other: "Dimensions"): - - if not isinstance(other, Dimensions): - return NotImplemented - - return Dimensions( - self.length - other.length, - self.time - other.time, - self.mass - other.mass, - self.current - other.current, - self.temperature - other.temperature) - - def __pow__(self, power: int): - - if not isinstance(power, int): - return NotImplemented - - return Dimensions( - self.length * power, - self.time * power, - self.mass * power, - self.current * power, - self.temperature * power) - - def __eq__(self, other: "Dimensions"): - if isinstance(other, Dimensions): - return (self.length == other.length and - self.time == other.time and - self.mass == other.mass and - self.current == other.current and - self.temperature == other.temperature) - - return NotImplemented - - - -@dataclass -class UnitName: - ascii_name: str - unicode_name: str | None = None - - @property - def best_name(self): - if self.unicode_name is None: - return self.ascii_name - else: - return self.unicode_name - -class Unit: - def __init__(self, - si_scaling_factor: float, - dimensions: Dimensions, - name: UnitName | None = None): - - self.scale = si_scaling_factor - self.dimensions = dimensions - self.name = name - - def _components(self, tokens: Sequence["UnitToken"]): - pass - - def __mul__(self, other: "Unit"): - if not isinstance(other, Unit): - return NotImplemented - - return Unit(self.scale * other.scale, self.dimensions * other.dimensions) - - def __truediv__(self, other: "Unit"): - if not isinstance(other, Unit): - return NotImplemented - - return Unit(self.scale / other.scale, self.dimensions / other.dimensions) - - def __pow__(self, power: int): - if not isinstance(power, int): - return NotImplemented - - return Unit(self.scale**power, self.dimensions**power) - - def equivalent(self, other: "Unit"): - return self.dimensions == other.dimensions - - -# QuantityType = TypeVar("QuantityType") class Quantity[QuantityType]: def __init__(self, value: QuantityType, units: Unit): self.value = value @@ -129,34 +15,35 @@ def __init__(self, value: QuantityType, units: Unit): def in_units_of(self, units: Unit) -> QuantityType: pass - def __mul__(self, other: ArrayLike | "Quantity" ) -> "Quantity": + def __mul__(self: Self, other: ArrayLike | Self ) -> Self: if isinstance(other, Quantity): pass else: pass - def __truediv__(self, other: float | "Quantity") -> "Quantity": + def __truediv__(self: Self, other: float | Self) -> Self: if isinstance(other, Quantity): pass else: pass - def __rdiv__(self, other: float | "Quantity") -> "Quantity": + def __rdiv__(self: Self, other: float | Self) -> Self: if isinstance(other, Quantity): pass else: pass - def __add__(self, other: "Quantity") -> "Quantity": + def __add__(self: Self, other: Self) -> Self: if isinstance(other, Quantity): pass - def __sub__(self, other: "Quantity") -> "Quantity": + def __sub__(self: Self, other: Self) -> Self: if isinstance(other, Quantity): pass + class ExpressionMethod: pass diff --git a/sasdata/quantities/units_base.py b/sasdata/quantities/units_base.py new file mode 100644 index 0000000..d29785c --- /dev/null +++ b/sasdata/quantities/units_base.py @@ -0,0 +1,118 @@ +from dataclasses import dataclass +from typing import Sequence, Self, TypeVar + +import numpy as np + + +class Dimensions: + """ + + Note that some SI Base units are + + For example, moles and angular measures are dimensionless from this perspective, and candelas are + + """ + def __init__(self, + length: int = 0, + time: int = 0, + mass: int = 0, + current: int = 0, + temperature: int = 0): + + self.length = length + self.time = time + self.mass = mass + self.current = current + self.temperature = temperature + + def __mul__(self: Self, other: Self): + + if not isinstance(other, Dimensions): + return NotImplemented + + return Dimensions( + self.length + other.length, + self.time + other.time, + self.mass + other.mass, + self.current + other.current, + self.temperature + other.temperature) + + def __truediv__(self: Self, other: Self): + + if not isinstance(other, Dimensions): + return NotImplemented + + return Dimensions( + self.length - other.length, + self.time - other.time, + self.mass - other.mass, + self.current - other.current, + self.temperature - other.temperature) + + def __pow__(self, power: int): + + if not isinstance(power, int): + return NotImplemented + + return Dimensions( + self.length * power, + self.time * power, + self.mass * power, + self.current * power, + self.temperature * power) + + def __eq__(self: Self, other: Self): + if isinstance(other, Dimensions): + return (self.length == other.length and + self.time == other.time and + self.mass == other.mass and + self.current == other.current and + self.temperature == other.temperature) + + return NotImplemented + + def __hash__(self): + return hash((self.length, self.time, self.mass, self.current, self.temperature)) + +class Unit: + def __init__(self, + si_scaling_factor: float, + dimensions: Dimensions): + + self.scale = si_scaling_factor + self.dimensions = dimensions + + def _components(self, tokens: Sequence["UnitToken"]): + pass + + def __mul__(self: Self, other: Self): + if not isinstance(other, Unit): + return NotImplemented + + return Unit(self.scale * other.scale, self.dimensions * other.dimensions) + + def __truediv__(self: Self, other: Self): + if not isinstance(other, Unit): + return NotImplemented + + return Unit(self.scale / other.scale, self.dimensions / other.dimensions) + + def __rtruediv__(self: Self, other: Self): + if isinstance(other, Unit): + return Unit(other.scale / self.scale, other.dimensions / self.dimensions) + elif isinstance(other, (int, float)): + return Unit(other / self.scale, self.dimensions ** -1) + else: + return NotImplemented + + def __pow__(self, power: int): + if not isinstance(power, int): + return NotImplemented + + return Unit(self.scale**power, self.dimensions**power) + + def equivalent(self: Self, other: Self): + return self.dimensions == other.dimensions + + def __eq__(self: Self, other: Self): + return self.equivalent(other) and np.abs(np.log(self.scale/other.scale)) < 1e-5 diff --git a/sasdata/quantities/units_table.py b/sasdata/quantities/units_table.py index 5a2d6b5..ac59e0d 100644 --- a/sasdata/quantities/units_table.py +++ b/sasdata/quantities/units_table.py @@ -3,6 +3,7 @@ """ import numpy as np +from collections import defaultdict bigger_magnitudes = [ ("E", None, "exa", 1e18), @@ -64,15 +65,91 @@ encoding = "utf-8" +def write_unit_string(fid, symbol, special_symbol, singular, plural, scale, length, time, mass, current, temperature): + fid.write(f"'{symbol}', '{special_symbol}', '{singular}', '{plural}', ") + fid.write(f"{scale}, {length}, {time}, {mass}, {current}, {temperature}\n") + + with open("unit_data.txt", mode='w', encoding=encoding) as fid: for symbol, special_symbol, singular, plural, scale, length, time, mass, current, temperature, magnitudes in all_units: - fid.write(f"'{symbol}', '{special_symbol}', '{singular}', '{plural}', ") - fid.write(f"{scale}, {length}, {time}, {mass}, {current}, {temperature}\n") + + write_unit_string(fid, symbol, special_symbol, singular, plural, + scale, length, time, mass, current, temperature) for mag_symbol, mag_special_symbol, name, mag_scale in magnitudes: combined_symbol = (mag_symbol if mag_special_symbol is None else mag_special_symbol) + \ (symbol if special_symbol is None else special_symbol) - fid.write(f"'{mag_symbol}{symbol}', '{combined_symbol}', '{name}{singular}', '{name}{plural}', ") - fid.write(f"{scale * mag_scale}, {length}, {time}, {mass}, {current}, {temperature}\n") + write_unit_string(fid,f"{mag_symbol}{symbol}", combined_symbol, f"{name}{singular}", + f"{name}{plural}", scale * mag_scale, length, time, mass, current, temperature) + + +def format_name(name: str): + return name.replace(" ", "_") + +header = """ + +Autogenerated file by units_table.py + + + + ******** DO NOT EDIT BY HAND ******** + + + +""" + +with open("units.py", 'w', encoding=encoding) as fid: + + # Write warning header + fid.write('"""'+header+'"""') + + # Write in class definitions + fid.write("\n\n" + "#\n" + "# Included from units_base.py\n" + "#\n\n") + + with open("units_base.py", 'r') as base: + for line in base: + fid.write(line) + + # Write in unit definitions + fid.write("\n\n" + "#\n" + "# Specific units \n" + "#\n\n") + + symbol_lookup = {} + unit_types = defaultdict(list) + + for symbol, special_symbol, singular, plural, scale, length, time, mass, current, temperature, magnitudes in all_units: + + formatted_plural = format_name(plural) + + fid.write(f"{formatted_plural} = Unit({scale}, Dimensions({length}, {time}, {mass}, {current}, {temperature}))\n") + + symbol_lookup[symbol] = formatted_plural + if special_symbol is not None: + symbol_lookup[special_symbol] = formatted_plural + + for mag_symbol, mag_special_symbol, name, mag_scale in magnitudes: + + combined_special_symbol = (mag_symbol if mag_special_symbol is None else mag_special_symbol) + \ + (symbol if special_symbol is None else special_symbol) + + combined_symbol = mag_symbol + symbol + + combined_name = f"{name}{formatted_plural}" + + fid.write(f"{combined_name} = Unit({scale * mag_scale}, Dimensions({length}, {time}, {mass}, {current}, {temperature}))\n") + + symbol_lookup[combined_symbol] = combined_name + symbol_lookup[combined_special_symbol] = combined_name + + fid.write("symbol_lookup = {\n") + for k in symbol_lookup: + fid.write(f' "{k}": {symbol_lookup[k]},\n') + fid.write("}\n\n") + diff --git a/sasdata/quantities/units_tests.py b/sasdata/quantities/units_tests.py new file mode 100644 index 0000000..383725f --- /dev/null +++ b/sasdata/quantities/units_tests.py @@ -0,0 +1,46 @@ +import sasdata.quantities.units as units +from sasdata.quantities.units import Unit + +class EqualUnits: + def __init__(self, test_name: str, *units): + self.test_name = "Equality: " + test_name + self.units: list[Unit] = list(units) + + def run_test(self): + for i, unit_1 in enumerate(self.units): + for unit_2 in self.units[i+1:]: + assert unit_1.equivalent(unit_2), "Units should be equivalent" + assert unit_1 == unit_2, "Units should be equal" + + +class EquivalentButUnequalUnits: + def __init__(self, test_name: str, *units): + self.test_name = "Equivalence: " + test_name + self.units: list[Unit] = list(units) + + def run_test(self): + for i, unit_1 in enumerate(self.units): + for unit_2 in self.units[i+1:]: + assert unit_1.equivalent(unit_2), "Units should be equivalent" + assert unit_1 != unit_2, "Units should not be equal" + + +tests = [ + + EqualUnits("Pressure", + units.pascals, + units.newtons / units.meters ** 2, + units.micronewtons * units.millimeters ** -2), + + EqualUnits("Resistance", + units.ohms, + units.volts / units.amps, + 1e-3/units.millisiemens) + + +] + + +for test in tests: + print(test.test_name) + test.run_test() \ No newline at end of file From 41d63eb746d9769948ec20977b36ce0072724cf7 Mon Sep 17 00:00:00 2001 From: lucas-wilkins Date: Tue, 6 Aug 2024 14:34:38 +0100 Subject: [PATCH 3/3] Units now available and grouped --- .../{units_base.py => _units_base.py} | 54 +- sasdata/quantities/_units_table.py | 268 +++ sasdata/quantities/quantities.py | 2 +- sasdata/quantities/unicode_superscript.py | 12 + sasdata/quantities/units.py | 1968 +++++++++++++++++ sasdata/quantities/units_table.py | 155 -- 6 files changed, 2301 insertions(+), 158 deletions(-) rename sasdata/quantities/{units_base.py => _units_base.py} (67%) create mode 100644 sasdata/quantities/_units_table.py create mode 100644 sasdata/quantities/unicode_superscript.py create mode 100644 sasdata/quantities/units.py delete mode 100644 sasdata/quantities/units_table.py diff --git a/sasdata/quantities/units_base.py b/sasdata/quantities/_units_base.py similarity index 67% rename from sasdata/quantities/units_base.py rename to sasdata/quantities/_units_base.py index d29785c..3a324d4 100644 --- a/sasdata/quantities/units_base.py +++ b/sasdata/quantities/_units_base.py @@ -3,6 +3,8 @@ import numpy as np +from sasdata.quantities.unicode_superscript import int_as_unicode_superscript + class Dimensions: """ @@ -72,15 +74,58 @@ def __eq__(self: Self, other: Self): return NotImplemented def __hash__(self): - return hash((self.length, self.time, self.mass, self.current, self.temperature)) + """ Unique representation of units using Godel like encoding""" + + two_powers = 0 + if self.length < 0: + two_powers += 1 + + if self.time < 0: + two_powers += 2 + + if self.mass < 0: + two_powers += 4 + + if self.current < 0: + two_powers += 8 + + if self.temperature < 0: + two_powers += 16 + + return 2**two_powers * 3**abs(self.length) * 5**abs(self.time) * \ + 7**abs(self.mass) * 11**abs(self.current) * 13**abs(self.temperature) + + def __repr__(self): + s = "" + for name, size in [ + ("L", self.length), + ("T", self.time), + ("M", self.mass), + ("C", self.current), + ("K", self.temperature)]: + + if size == 0: + pass + elif size == 1: + s += f"{name}" + else: + s += f"{name}{int_as_unicode_superscript(size)}" + + return s class Unit: def __init__(self, si_scaling_factor: float, - dimensions: Dimensions): + dimensions: Dimensions, + name: str | None = None, + ascii_symbol: str | None = None, + symbol: str | None = None): self.scale = si_scaling_factor self.dimensions = dimensions + self.name = name + self.ascii_symbol = ascii_symbol + self.symbol = symbol def _components(self, tokens: Sequence["UnitToken"]): pass @@ -116,3 +161,8 @@ def equivalent(self: Self, other: Self): def __eq__(self: Self, other: Self): return self.equivalent(other) and np.abs(np.log(self.scale/other.scale)) < 1e-5 + +class UnitGroup: + def __init__(self, name: str, units: list[Unit]): + self.name = name + self.units = sorted(units, key=lambda unit: unit.scale) diff --git a/sasdata/quantities/_units_table.py b/sasdata/quantities/_units_table.py new file mode 100644 index 0000000..9b88cab --- /dev/null +++ b/sasdata/quantities/_units_table.py @@ -0,0 +1,268 @@ +""" +Builds a data file containing details of units +""" + +import numpy as np +from collections import defaultdict +from _units_base import Dimensions, Unit + +bigger_magnitudes = [ + ("E", None, "exa", 1e18), + ("P", None, "peta", 1e15), + ("T", None, "tera", 1e12), + ("G", None, "giga", 1e9), + ("M", None, "mega", 1e6), + ("k", None, "kilo", 1e3) ] + +smaller_magnitudes = [ + ("m", None, "milli", 1e-3), + ("u", "µ", "micro", 1e-6), + ("n", None, "nano", 1e-9), + ("p", None, "pico", 1e-12), + ("f", None, "femto", 1e-15), + ("a", None, "atto", 1e-18)] + +all_magnitudes = bigger_magnitudes + smaller_magnitudes + +# Length, time, mass, current, temperature +base_si_units = [ + ("m", None, "meter", "meters", 1, 1, 0, 0, 0, 0, all_magnitudes), + ("s", None, "second", "seconds", 1, 0, 1, 0, 0, 0, smaller_magnitudes), + ("g", None, "gram", "grams", 1e-3, 0, 0, 1, 0, 0, all_magnitudes), + ("A", None, "amp", "amps", 1, 0, 0, 0, 1, 0, all_magnitudes), + ("K", None, "kelvin", "kelvin", 1, 0, 0, 0, 0, 1, all_magnitudes) ] + +derived_si_units = [ + ("Hz", None, "hertz", "hertz", 1, 0, -1, 0, 0, 0, all_magnitudes), + ("N", None, "newton", "newtons", 1, 1, -2, 1, 0, 0, all_magnitudes), + ("Pa", None, "pascal", "pascals", 1, -1, -2, 1, 0, 0, all_magnitudes), + ("J", None, "joule", "joules", 1, 2, -2, 1, 0, 0, all_magnitudes), + ("W", None, "watt", "watts", 1, 2, -3, 1, 0, 0, all_magnitudes), + ("C", None, "coulomb", "coulombs", 1, 0, 1, 0, 1, 0, all_magnitudes), + ("V", None, "volts", "volts", 1, 2, -3, 1, -1, 0, all_magnitudes), + ("Ohm", "Ω", "ohm", "ohms", 1, 2, -3, 1, -2, 0, all_magnitudes), + ("F", None, "farad", "farads", 1, -2, 4, -1, 2, 0, all_magnitudes), + ("S", None, "siemens", "siemens", 1, -2, 3, -1, 2, 0, all_magnitudes), + ("Wb", None, "weber", "webers", 1, 2, -2, 1, -1, 0, all_magnitudes), + ("T", None, "tesla", "tesla", 1, 0, -2, 1, -1, 0, all_magnitudes), + ("H", None, "henry", "henry", 1, 2, -2, 1, -2, 0, all_magnitudes), + ("C", None, "degree Celsius", "degrees Celsius", 1, 0, 0, 0, 0, 1, []) +] + +non_si_units = [ + ("A", "Å", "angstrom", "angstroms", 1e-10, 1, 0, 0, 0, 0, []), + ("Ang", None, "angstrom", "angstroms", 1e-10, 1, 0, 0, 0, 0, []), + ("min", None, "minute", "minutes", 60, 0, 1, 0, 0, 0, []), + ("hr", None, "hour", "hours", 360, 0, 1, 0, 0, 0, []), + ("d", None, "day", "days", 360*24, 0, 1, 0, 0, 0, []), + ("day", None, "day", "days", 360*24, 0, 1, 0, 0, 0, []), + ("y", None, "year", "years", 360*24*365.2425, 0, 1, 0, 0, 0, []), + ("yr", None, "year", "years", 360*24*365.2425, 0, 1, 0, 0, 0, []), + ("deg", None, "degree", "degrees", 180/np.pi, 0, 0, 0, 0, 0, []), + ("rad", None, "radian", "radians", 1, 0, 0, 0, 0, 0, []), + ("sr", None, "stradian", "stradians", 1, 0, 0, 0, 0, 0, []) +] + + + +all_units = base_si_units + derived_si_units + non_si_units + +encoding = "utf-8" + +def format_name(name: str): + return name.lower().replace(" ", "_") + +header = """ + +Autogenerated file by _units_table.py + + + + ******** DO NOT EDIT BY HAND ******** + + + +""" + +with open("units.py", 'w', encoding=encoding) as fid: + + # Write warning header + fid.write('"""'+header+'"""') + + # Write in class definitions + fid.write("\n\n" + "#\n" + "# Included from _units_base.py\n" + "#\n\n") + + with open("_units_base.py", 'r') as base: + for line in base: + fid.write(line) + + # Write in unit definitions + fid.write("\n\n" + "#\n" + "# Specific units \n" + "#\n\n") + + symbol_lookup = {} + unit_types_temp = defaultdict(list) # Keep track of unit types + unit_types = defaultdict(list) + + for symbol, special_symbol, singular, plural, scale, length, time, mass, current, temperature, magnitudes in all_units: + + formatted_plural = format_name(plural) + formatted_singular = format_name(singular) + + dimensions = Dimensions(length, time, mass, current, temperature) + fid.write(f"{formatted_plural} = Unit({scale}, Dimensions({length}, {time}, {mass}, {current}, {temperature})," + f"name='{formatted_plural}'," + f"ascii_symbol='{symbol}'," + f"symbol='{symbol if special_symbol is None else special_symbol}')\n") + + symbol_lookup[symbol] = formatted_plural + if special_symbol is not None: + symbol_lookup[special_symbol] = formatted_plural + + unit_types_temp[hash(dimensions)].append( + (symbol, special_symbol, formatted_singular, formatted_plural, scale, dimensions)) + + unit_types[hash(dimensions)].append(formatted_plural) + + for mag_symbol, mag_special_symbol, name, mag_scale in magnitudes: + + # Work out the combined symbol, accounts for unicode or not + combined_special_symbol = (mag_symbol if mag_special_symbol is None else mag_special_symbol) + \ + (symbol if special_symbol is None else special_symbol) + + combined_symbol = mag_symbol + symbol + + # Combined unit name + combined_name_singular = f"{name}{formatted_singular}" + combined_name_plural = f"{name}{formatted_plural}" + + combined_scale = scale * mag_scale + + # Units + dimensions = Dimensions(length, time, mass, current, temperature) + fid.write(f"{combined_name_plural} = Unit({combined_scale}, " + f"Dimensions({length}, {time}, {mass}, {current}, {temperature})," + f"name='{combined_name_plural}'," + f"ascii_symbol='{combined_symbol}'," + f"symbol='{combined_special_symbol}')\n") + + symbol_lookup[combined_symbol] = combined_name_plural + symbol_lookup[combined_special_symbol] = combined_name_plural + + unit_types_temp[hash(dimensions)].append( + (combined_symbol, combined_special_symbol, combined_name_singular, + combined_name_plural, combined_scale, dimensions)) + + unit_types[hash(dimensions)].append(combined_name_plural) + + # + # Higher dimensioned types + # + + length_units = unit_types_temp[hash(Dimensions(length=1))] + time_units = unit_types_temp[hash(Dimensions(time=1))] + + # Length based + for symbol, special_symbol, singular, plural, scale, _ in length_units: + for prefix, power, name, unicode_suffix in [ + ("square_", 2, plural, '²'), + ("cubic_", 3, plural, '³'), + ("per_", -1, singular, '⁻¹'), + ("per_square_", -2, singular,'⁻²'), + ("per_cubic_", -3, singular,'⁻³')]: + + dimensions = Dimensions(length=power) + unit_name = prefix + name + unit_special_symbol = (symbol if special_symbol is None else special_symbol) + unicode_suffix + unit_symbol = symbol + f"^{power}" + fid.write(f"{unit_name} = Unit({scale**power}, Dimensions({power}, 0, 0, 0, 0), " + f"name='{unit_name}', " + f"ascii_symbol='{unit_symbol}', " + f"symbol='{unit_special_symbol}')\n") + + unit_types[hash(dimensions)].append(unit_name) + + # Speed and acceleration + for length_symbol, length_special_symbol, _, length_name, length_scale, _ in length_units: + for time_symbol, time_special_symbol, time_name, _, time_scale, _ in time_units: + speed_name = length_name + "_per_" + time_name + accel_name = length_name + "_per_square_" + time_name + + speed_dimensions = Dimensions(length=1, time=-1) + accel_dimensions = Dimensions(length=1, time=-2) + + fid.write(f"{speed_name} " + f"= Unit({length_scale / time_scale}, " + f"Dimensions(1, -1, 0, 0, 0), " + f"name='{speed_name}', " + f"ascii_symbol='{length_symbol}/{time_symbol}', " + f"symbol='{length_special_symbol}{time_special_symbol}⁻¹')\n") + + fid.write(f"{accel_name} = Unit({length_scale / time_scale}, " + f"Dimensions(1, -2, 0, 0, 0), " + f"name='{accel_name}', " + f"ascii_symbol='{length_symbol}/{time_symbol}^2', " + f"symbol='{length_special_symbol}{time_special_symbol}⁻²')\n") + + unit_types[hash(speed_dimensions)].append(speed_name) + unit_types[hash(accel_dimensions)].append(accel_name) + + # + # Write out the symbol lookup table + # + fid.write("\n#\n# Lookup table from symbols to units\n#\n\n") + fid.write("symbol_lookup = {\n") + for k in symbol_lookup: + fid.write(f' "{k}": {symbol_lookup[k]},\n') + fid.write("}\n\n") + + # + # Collections of units by type + # + + dimension_names = [ + ("length", Dimensions(length=1)), + ("area", Dimensions(length=2)), + ("volume", Dimensions(length=3)), + ("inverse_length", Dimensions(length=-1)), + ("inverse_area", Dimensions(length=-2)), + ("inverse_volume", Dimensions(length=-3)), + ("time", Dimensions(time=1)), + ("rate", Dimensions(time=-1)), + ("speed", Dimensions(length=1, time=-1)), + ("acceleration", Dimensions(length=1, time=-2)), + ("force", Dimensions(1, -2, 1, 0, 0)), + ("pressure", Dimensions(-1, -2, 1, 0, 0)), + ("energy", Dimensions(2, -2, 1, 0, 0)), + ("power", Dimensions(2, -3, 1, 0, 0)), + ("charge", Dimensions(0, 1, 0, 1, 0)), + ("potential", Dimensions(2, -3, 1, -1, 0)), + ("resistance", Dimensions(2, -3, 1, -2, 0)), + ("capacitance", Dimensions(-2, 4, -1, 2, 0)), + ("conductance", Dimensions(-2, 3, -1, 2, 0)), + ("magnetic_flux", Dimensions(2, -2, 1, -1, 0)), + ("magnetic_flux_density", Dimensions(0, -2, 1, -1, 0)), + ("inductance", Dimensions(2, -2, 1, -2, 0)), + ("temperature", Dimensions(temperature=1)) + ] + + fid.write("\n#\n# Units by type \n#\n\n") + + for dimension_name, dimensions in dimension_names: + + print(dimensions, hash(dimensions)) + + fid.write(f"\n" + f"{dimension_name} = UnitGroup(\n" + f" name = '{dimension_name}', \n" + f" units = [\n") + + for unit_name in unit_types[hash(dimensions)]: + fid.write(" " + unit_name + ",\n") + + fid.write("])\n") \ No newline at end of file diff --git a/sasdata/quantities/quantities.py b/sasdata/quantities/quantities.py index 8a001ba..2cd9aef 100644 --- a/sasdata/quantities/quantities.py +++ b/sasdata/quantities/quantities.py @@ -3,7 +3,7 @@ from numpy._typing import ArrayLike -from sasdata.quantities.units_base import Unit +from sasdata.quantities.units import Unit QuantityType = TypeVar("QuantityType") diff --git a/sasdata/quantities/unicode_superscript.py b/sasdata/quantities/unicode_superscript.py new file mode 100644 index 0000000..e910b0b --- /dev/null +++ b/sasdata/quantities/unicode_superscript.py @@ -0,0 +1,12 @@ + +_ascii_version = "0123456789-" +_unicode_version = "⁰¹²³⁴⁵⁶⁷⁸⁹⁻" + +def int_as_unicode_superscript(number: int): + string = str(number) + + for old, new in zip(_ascii_version, _unicode_version): + string = string.replace(old, new) + + return string + diff --git a/sasdata/quantities/units.py b/sasdata/quantities/units.py new file mode 100644 index 0000000..75744af --- /dev/null +++ b/sasdata/quantities/units.py @@ -0,0 +1,1968 @@ +""" + +Autogenerated file by _units_table.py + + + + ******** DO NOT EDIT BY HAND ******** + + + +""" + +# +# Included from _units_base.py +# + +from dataclasses import dataclass +from typing import Sequence, Self, TypeVar + +import numpy as np + +from sasdata.quantities.unicode_superscript import int_as_unicode_superscript + + +class Dimensions: + """ + + Note that some SI Base units are + + For example, moles and angular measures are dimensionless from this perspective, and candelas are + + """ + def __init__(self, + length: int = 0, + time: int = 0, + mass: int = 0, + current: int = 0, + temperature: int = 0): + + self.length = length + self.time = time + self.mass = mass + self.current = current + self.temperature = temperature + + def __mul__(self: Self, other: Self): + + if not isinstance(other, Dimensions): + return NotImplemented + + return Dimensions( + self.length + other.length, + self.time + other.time, + self.mass + other.mass, + self.current + other.current, + self.temperature + other.temperature) + + def __truediv__(self: Self, other: Self): + + if not isinstance(other, Dimensions): + return NotImplemented + + return Dimensions( + self.length - other.length, + self.time - other.time, + self.mass - other.mass, + self.current - other.current, + self.temperature - other.temperature) + + def __pow__(self, power: int): + + if not isinstance(power, int): + return NotImplemented + + return Dimensions( + self.length * power, + self.time * power, + self.mass * power, + self.current * power, + self.temperature * power) + + def __eq__(self: Self, other: Self): + if isinstance(other, Dimensions): + return (self.length == other.length and + self.time == other.time and + self.mass == other.mass and + self.current == other.current and + self.temperature == other.temperature) + + return NotImplemented + + def __hash__(self): + """ Unique representation of units using Godel like encoding""" + + two_powers = 0 + if self.length < 0: + two_powers += 1 + + if self.time < 0: + two_powers += 2 + + if self.mass < 0: + two_powers += 4 + + if self.current < 0: + two_powers += 8 + + if self.temperature < 0: + two_powers += 16 + + return 2**two_powers * 3**abs(self.length) * 5**abs(self.time) * \ + 7**abs(self.mass) * 11**abs(self.current) * 13**abs(self.temperature) + + def __repr__(self): + s = "" + for name, size in [ + ("L", self.length), + ("T", self.time), + ("M", self.mass), + ("C", self.current), + ("K", self.temperature)]: + + if size == 0: + pass + elif size == 1: + s += f"{name}" + else: + s += f"{name}{int_as_unicode_superscript(size)}" + + return s + +class Unit: + def __init__(self, + si_scaling_factor: float, + dimensions: Dimensions, + name: str | None = None, + ascii_symbol: str | None = None, + symbol: str | None = None): + + self.scale = si_scaling_factor + self.dimensions = dimensions + self.name = name + self.ascii_symbol = ascii_symbol + self.symbol = symbol + + def _components(self, tokens: Sequence["UnitToken"]): + pass + + def __mul__(self: Self, other: Self): + if not isinstance(other, Unit): + return NotImplemented + + return Unit(self.scale * other.scale, self.dimensions * other.dimensions) + + def __truediv__(self: Self, other: Self): + if not isinstance(other, Unit): + return NotImplemented + + return Unit(self.scale / other.scale, self.dimensions / other.dimensions) + + def __rtruediv__(self: Self, other: Self): + if isinstance(other, Unit): + return Unit(other.scale / self.scale, other.dimensions / self.dimensions) + elif isinstance(other, (int, float)): + return Unit(other / self.scale, self.dimensions ** -1) + else: + return NotImplemented + + def __pow__(self, power: int): + if not isinstance(power, int): + return NotImplemented + + return Unit(self.scale**power, self.dimensions**power) + + def equivalent(self: Self, other: Self): + return self.dimensions == other.dimensions + + def __eq__(self: Self, other: Self): + return self.equivalent(other) and np.abs(np.log(self.scale/other.scale)) < 1e-5 + +class UnitGroup: + def __init__(self, name: str, units: list[Unit]): + self.name = name + self.units = sorted(units, key=lambda unit: unit.scale) + + +# +# Specific units +# + +meters = Unit(1, Dimensions(1, 0, 0, 0, 0),name='meters',ascii_symbol='m',symbol='m') +exameters = Unit(1e+18, Dimensions(1, 0, 0, 0, 0),name='exameters',ascii_symbol='Em',symbol='Em') +petameters = Unit(1000000000000000.0, Dimensions(1, 0, 0, 0, 0),name='petameters',ascii_symbol='Pm',symbol='Pm') +terameters = Unit(1000000000000.0, Dimensions(1, 0, 0, 0, 0),name='terameters',ascii_symbol='Tm',symbol='Tm') +gigameters = Unit(1000000000.0, Dimensions(1, 0, 0, 0, 0),name='gigameters',ascii_symbol='Gm',symbol='Gm') +megameters = Unit(1000000.0, Dimensions(1, 0, 0, 0, 0),name='megameters',ascii_symbol='Mm',symbol='Mm') +kilometers = Unit(1000.0, Dimensions(1, 0, 0, 0, 0),name='kilometers',ascii_symbol='km',symbol='km') +millimeters = Unit(0.001, Dimensions(1, 0, 0, 0, 0),name='millimeters',ascii_symbol='mm',symbol='mm') +micrometers = Unit(1e-06, Dimensions(1, 0, 0, 0, 0),name='micrometers',ascii_symbol='um',symbol='µm') +nanometers = Unit(1e-09, Dimensions(1, 0, 0, 0, 0),name='nanometers',ascii_symbol='nm',symbol='nm') +picometers = Unit(1e-12, Dimensions(1, 0, 0, 0, 0),name='picometers',ascii_symbol='pm',symbol='pm') +femtometers = Unit(1e-15, Dimensions(1, 0, 0, 0, 0),name='femtometers',ascii_symbol='fm',symbol='fm') +attometers = Unit(1e-18, Dimensions(1, 0, 0, 0, 0),name='attometers',ascii_symbol='am',symbol='am') +seconds = Unit(1, Dimensions(0, 1, 0, 0, 0),name='seconds',ascii_symbol='s',symbol='s') +milliseconds = Unit(0.001, Dimensions(0, 1, 0, 0, 0),name='milliseconds',ascii_symbol='ms',symbol='ms') +microseconds = Unit(1e-06, Dimensions(0, 1, 0, 0, 0),name='microseconds',ascii_symbol='us',symbol='µs') +nanoseconds = Unit(1e-09, Dimensions(0, 1, 0, 0, 0),name='nanoseconds',ascii_symbol='ns',symbol='ns') +picoseconds = Unit(1e-12, Dimensions(0, 1, 0, 0, 0),name='picoseconds',ascii_symbol='ps',symbol='ps') +femtoseconds = Unit(1e-15, Dimensions(0, 1, 0, 0, 0),name='femtoseconds',ascii_symbol='fs',symbol='fs') +attoseconds = Unit(1e-18, Dimensions(0, 1, 0, 0, 0),name='attoseconds',ascii_symbol='as',symbol='as') +grams = Unit(0.001, Dimensions(0, 0, 1, 0, 0),name='grams',ascii_symbol='g',symbol='g') +exagrams = Unit(1000000000000000.0, Dimensions(0, 0, 1, 0, 0),name='exagrams',ascii_symbol='Eg',symbol='Eg') +petagrams = Unit(1000000000000.0, Dimensions(0, 0, 1, 0, 0),name='petagrams',ascii_symbol='Pg',symbol='Pg') +teragrams = Unit(1000000000.0, Dimensions(0, 0, 1, 0, 0),name='teragrams',ascii_symbol='Tg',symbol='Tg') +gigagrams = Unit(1000000.0, Dimensions(0, 0, 1, 0, 0),name='gigagrams',ascii_symbol='Gg',symbol='Gg') +megagrams = Unit(1000.0, Dimensions(0, 0, 1, 0, 0),name='megagrams',ascii_symbol='Mg',symbol='Mg') +kilograms = Unit(1.0, Dimensions(0, 0, 1, 0, 0),name='kilograms',ascii_symbol='kg',symbol='kg') +milligrams = Unit(1e-06, Dimensions(0, 0, 1, 0, 0),name='milligrams',ascii_symbol='mg',symbol='mg') +micrograms = Unit(1e-09, Dimensions(0, 0, 1, 0, 0),name='micrograms',ascii_symbol='ug',symbol='µg') +nanograms = Unit(1.0000000000000002e-12, Dimensions(0, 0, 1, 0, 0),name='nanograms',ascii_symbol='ng',symbol='ng') +picograms = Unit(1e-15, Dimensions(0, 0, 1, 0, 0),name='picograms',ascii_symbol='pg',symbol='pg') +femtograms = Unit(1e-18, Dimensions(0, 0, 1, 0, 0),name='femtograms',ascii_symbol='fg',symbol='fg') +attograms = Unit(1.0000000000000001e-21, Dimensions(0, 0, 1, 0, 0),name='attograms',ascii_symbol='ag',symbol='ag') +amps = Unit(1, Dimensions(0, 0, 0, 1, 0),name='amps',ascii_symbol='A',symbol='A') +exaamps = Unit(1e+18, Dimensions(0, 0, 0, 1, 0),name='exaamps',ascii_symbol='EA',symbol='EA') +petaamps = Unit(1000000000000000.0, Dimensions(0, 0, 0, 1, 0),name='petaamps',ascii_symbol='PA',symbol='PA') +teraamps = Unit(1000000000000.0, Dimensions(0, 0, 0, 1, 0),name='teraamps',ascii_symbol='TA',symbol='TA') +gigaamps = Unit(1000000000.0, Dimensions(0, 0, 0, 1, 0),name='gigaamps',ascii_symbol='GA',symbol='GA') +megaamps = Unit(1000000.0, Dimensions(0, 0, 0, 1, 0),name='megaamps',ascii_symbol='MA',symbol='MA') +kiloamps = Unit(1000.0, Dimensions(0, 0, 0, 1, 0),name='kiloamps',ascii_symbol='kA',symbol='kA') +milliamps = Unit(0.001, Dimensions(0, 0, 0, 1, 0),name='milliamps',ascii_symbol='mA',symbol='mA') +microamps = Unit(1e-06, Dimensions(0, 0, 0, 1, 0),name='microamps',ascii_symbol='uA',symbol='µA') +nanoamps = Unit(1e-09, Dimensions(0, 0, 0, 1, 0),name='nanoamps',ascii_symbol='nA',symbol='nA') +picoamps = Unit(1e-12, Dimensions(0, 0, 0, 1, 0),name='picoamps',ascii_symbol='pA',symbol='pA') +femtoamps = Unit(1e-15, Dimensions(0, 0, 0, 1, 0),name='femtoamps',ascii_symbol='fA',symbol='fA') +attoamps = Unit(1e-18, Dimensions(0, 0, 0, 1, 0),name='attoamps',ascii_symbol='aA',symbol='aA') +kelvin = Unit(1, Dimensions(0, 0, 0, 0, 1),name='kelvin',ascii_symbol='K',symbol='K') +exakelvin = Unit(1e+18, Dimensions(0, 0, 0, 0, 1),name='exakelvin',ascii_symbol='EK',symbol='EK') +petakelvin = Unit(1000000000000000.0, Dimensions(0, 0, 0, 0, 1),name='petakelvin',ascii_symbol='PK',symbol='PK') +terakelvin = Unit(1000000000000.0, Dimensions(0, 0, 0, 0, 1),name='terakelvin',ascii_symbol='TK',symbol='TK') +gigakelvin = Unit(1000000000.0, Dimensions(0, 0, 0, 0, 1),name='gigakelvin',ascii_symbol='GK',symbol='GK') +megakelvin = Unit(1000000.0, Dimensions(0, 0, 0, 0, 1),name='megakelvin',ascii_symbol='MK',symbol='MK') +kilokelvin = Unit(1000.0, Dimensions(0, 0, 0, 0, 1),name='kilokelvin',ascii_symbol='kK',symbol='kK') +millikelvin = Unit(0.001, Dimensions(0, 0, 0, 0, 1),name='millikelvin',ascii_symbol='mK',symbol='mK') +microkelvin = Unit(1e-06, Dimensions(0, 0, 0, 0, 1),name='microkelvin',ascii_symbol='uK',symbol='µK') +nanokelvin = Unit(1e-09, Dimensions(0, 0, 0, 0, 1),name='nanokelvin',ascii_symbol='nK',symbol='nK') +picokelvin = Unit(1e-12, Dimensions(0, 0, 0, 0, 1),name='picokelvin',ascii_symbol='pK',symbol='pK') +femtokelvin = Unit(1e-15, Dimensions(0, 0, 0, 0, 1),name='femtokelvin',ascii_symbol='fK',symbol='fK') +attokelvin = Unit(1e-18, Dimensions(0, 0, 0, 0, 1),name='attokelvin',ascii_symbol='aK',symbol='aK') +hertz = Unit(1, Dimensions(0, -1, 0, 0, 0),name='hertz',ascii_symbol='Hz',symbol='Hz') +exahertz = Unit(1e+18, Dimensions(0, -1, 0, 0, 0),name='exahertz',ascii_symbol='EHz',symbol='EHz') +petahertz = Unit(1000000000000000.0, Dimensions(0, -1, 0, 0, 0),name='petahertz',ascii_symbol='PHz',symbol='PHz') +terahertz = Unit(1000000000000.0, Dimensions(0, -1, 0, 0, 0),name='terahertz',ascii_symbol='THz',symbol='THz') +gigahertz = Unit(1000000000.0, Dimensions(0, -1, 0, 0, 0),name='gigahertz',ascii_symbol='GHz',symbol='GHz') +megahertz = Unit(1000000.0, Dimensions(0, -1, 0, 0, 0),name='megahertz',ascii_symbol='MHz',symbol='MHz') +kilohertz = Unit(1000.0, Dimensions(0, -1, 0, 0, 0),name='kilohertz',ascii_symbol='kHz',symbol='kHz') +millihertz = Unit(0.001, Dimensions(0, -1, 0, 0, 0),name='millihertz',ascii_symbol='mHz',symbol='mHz') +microhertz = Unit(1e-06, Dimensions(0, -1, 0, 0, 0),name='microhertz',ascii_symbol='uHz',symbol='µHz') +nanohertz = Unit(1e-09, Dimensions(0, -1, 0, 0, 0),name='nanohertz',ascii_symbol='nHz',symbol='nHz') +picohertz = Unit(1e-12, Dimensions(0, -1, 0, 0, 0),name='picohertz',ascii_symbol='pHz',symbol='pHz') +femtohertz = Unit(1e-15, Dimensions(0, -1, 0, 0, 0),name='femtohertz',ascii_symbol='fHz',symbol='fHz') +attohertz = Unit(1e-18, Dimensions(0, -1, 0, 0, 0),name='attohertz',ascii_symbol='aHz',symbol='aHz') +newtons = Unit(1, Dimensions(1, -2, 1, 0, 0),name='newtons',ascii_symbol='N',symbol='N') +exanewtons = Unit(1e+18, Dimensions(1, -2, 1, 0, 0),name='exanewtons',ascii_symbol='EN',symbol='EN') +petanewtons = Unit(1000000000000000.0, Dimensions(1, -2, 1, 0, 0),name='petanewtons',ascii_symbol='PN',symbol='PN') +teranewtons = Unit(1000000000000.0, Dimensions(1, -2, 1, 0, 0),name='teranewtons',ascii_symbol='TN',symbol='TN') +giganewtons = Unit(1000000000.0, Dimensions(1, -2, 1, 0, 0),name='giganewtons',ascii_symbol='GN',symbol='GN') +meganewtons = Unit(1000000.0, Dimensions(1, -2, 1, 0, 0),name='meganewtons',ascii_symbol='MN',symbol='MN') +kilonewtons = Unit(1000.0, Dimensions(1, -2, 1, 0, 0),name='kilonewtons',ascii_symbol='kN',symbol='kN') +millinewtons = Unit(0.001, Dimensions(1, -2, 1, 0, 0),name='millinewtons',ascii_symbol='mN',symbol='mN') +micronewtons = Unit(1e-06, Dimensions(1, -2, 1, 0, 0),name='micronewtons',ascii_symbol='uN',symbol='µN') +nanonewtons = Unit(1e-09, Dimensions(1, -2, 1, 0, 0),name='nanonewtons',ascii_symbol='nN',symbol='nN') +piconewtons = Unit(1e-12, Dimensions(1, -2, 1, 0, 0),name='piconewtons',ascii_symbol='pN',symbol='pN') +femtonewtons = Unit(1e-15, Dimensions(1, -2, 1, 0, 0),name='femtonewtons',ascii_symbol='fN',symbol='fN') +attonewtons = Unit(1e-18, Dimensions(1, -2, 1, 0, 0),name='attonewtons',ascii_symbol='aN',symbol='aN') +pascals = Unit(1, Dimensions(-1, -2, 1, 0, 0),name='pascals',ascii_symbol='Pa',symbol='Pa') +exapascals = Unit(1e+18, Dimensions(-1, -2, 1, 0, 0),name='exapascals',ascii_symbol='EPa',symbol='EPa') +petapascals = Unit(1000000000000000.0, Dimensions(-1, -2, 1, 0, 0),name='petapascals',ascii_symbol='PPa',symbol='PPa') +terapascals = Unit(1000000000000.0, Dimensions(-1, -2, 1, 0, 0),name='terapascals',ascii_symbol='TPa',symbol='TPa') +gigapascals = Unit(1000000000.0, Dimensions(-1, -2, 1, 0, 0),name='gigapascals',ascii_symbol='GPa',symbol='GPa') +megapascals = Unit(1000000.0, Dimensions(-1, -2, 1, 0, 0),name='megapascals',ascii_symbol='MPa',symbol='MPa') +kilopascals = Unit(1000.0, Dimensions(-1, -2, 1, 0, 0),name='kilopascals',ascii_symbol='kPa',symbol='kPa') +millipascals = Unit(0.001, Dimensions(-1, -2, 1, 0, 0),name='millipascals',ascii_symbol='mPa',symbol='mPa') +micropascals = Unit(1e-06, Dimensions(-1, -2, 1, 0, 0),name='micropascals',ascii_symbol='uPa',symbol='µPa') +nanopascals = Unit(1e-09, Dimensions(-1, -2, 1, 0, 0),name='nanopascals',ascii_symbol='nPa',symbol='nPa') +picopascals = Unit(1e-12, Dimensions(-1, -2, 1, 0, 0),name='picopascals',ascii_symbol='pPa',symbol='pPa') +femtopascals = Unit(1e-15, Dimensions(-1, -2, 1, 0, 0),name='femtopascals',ascii_symbol='fPa',symbol='fPa') +attopascals = Unit(1e-18, Dimensions(-1, -2, 1, 0, 0),name='attopascals',ascii_symbol='aPa',symbol='aPa') +joules = Unit(1, Dimensions(2, -2, 1, 0, 0),name='joules',ascii_symbol='J',symbol='J') +exajoules = Unit(1e+18, Dimensions(2, -2, 1, 0, 0),name='exajoules',ascii_symbol='EJ',symbol='EJ') +petajoules = Unit(1000000000000000.0, Dimensions(2, -2, 1, 0, 0),name='petajoules',ascii_symbol='PJ',symbol='PJ') +terajoules = Unit(1000000000000.0, Dimensions(2, -2, 1, 0, 0),name='terajoules',ascii_symbol='TJ',symbol='TJ') +gigajoules = Unit(1000000000.0, Dimensions(2, -2, 1, 0, 0),name='gigajoules',ascii_symbol='GJ',symbol='GJ') +megajoules = Unit(1000000.0, Dimensions(2, -2, 1, 0, 0),name='megajoules',ascii_symbol='MJ',symbol='MJ') +kilojoules = Unit(1000.0, Dimensions(2, -2, 1, 0, 0),name='kilojoules',ascii_symbol='kJ',symbol='kJ') +millijoules = Unit(0.001, Dimensions(2, -2, 1, 0, 0),name='millijoules',ascii_symbol='mJ',symbol='mJ') +microjoules = Unit(1e-06, Dimensions(2, -2, 1, 0, 0),name='microjoules',ascii_symbol='uJ',symbol='µJ') +nanojoules = Unit(1e-09, Dimensions(2, -2, 1, 0, 0),name='nanojoules',ascii_symbol='nJ',symbol='nJ') +picojoules = Unit(1e-12, Dimensions(2, -2, 1, 0, 0),name='picojoules',ascii_symbol='pJ',symbol='pJ') +femtojoules = Unit(1e-15, Dimensions(2, -2, 1, 0, 0),name='femtojoules',ascii_symbol='fJ',symbol='fJ') +attojoules = Unit(1e-18, Dimensions(2, -2, 1, 0, 0),name='attojoules',ascii_symbol='aJ',symbol='aJ') +watts = Unit(1, Dimensions(2, -3, 1, 0, 0),name='watts',ascii_symbol='W',symbol='W') +exawatts = Unit(1e+18, Dimensions(2, -3, 1, 0, 0),name='exawatts',ascii_symbol='EW',symbol='EW') +petawatts = Unit(1000000000000000.0, Dimensions(2, -3, 1, 0, 0),name='petawatts',ascii_symbol='PW',symbol='PW') +terawatts = Unit(1000000000000.0, Dimensions(2, -3, 1, 0, 0),name='terawatts',ascii_symbol='TW',symbol='TW') +gigawatts = Unit(1000000000.0, Dimensions(2, -3, 1, 0, 0),name='gigawatts',ascii_symbol='GW',symbol='GW') +megawatts = Unit(1000000.0, Dimensions(2, -3, 1, 0, 0),name='megawatts',ascii_symbol='MW',symbol='MW') +kilowatts = Unit(1000.0, Dimensions(2, -3, 1, 0, 0),name='kilowatts',ascii_symbol='kW',symbol='kW') +milliwatts = Unit(0.001, Dimensions(2, -3, 1, 0, 0),name='milliwatts',ascii_symbol='mW',symbol='mW') +microwatts = Unit(1e-06, Dimensions(2, -3, 1, 0, 0),name='microwatts',ascii_symbol='uW',symbol='µW') +nanowatts = Unit(1e-09, Dimensions(2, -3, 1, 0, 0),name='nanowatts',ascii_symbol='nW',symbol='nW') +picowatts = Unit(1e-12, Dimensions(2, -3, 1, 0, 0),name='picowatts',ascii_symbol='pW',symbol='pW') +femtowatts = Unit(1e-15, Dimensions(2, -3, 1, 0, 0),name='femtowatts',ascii_symbol='fW',symbol='fW') +attowatts = Unit(1e-18, Dimensions(2, -3, 1, 0, 0),name='attowatts',ascii_symbol='aW',symbol='aW') +coulombs = Unit(1, Dimensions(0, 1, 0, 1, 0),name='coulombs',ascii_symbol='C',symbol='C') +exacoulombs = Unit(1e+18, Dimensions(0, 1, 0, 1, 0),name='exacoulombs',ascii_symbol='EC',symbol='EC') +petacoulombs = Unit(1000000000000000.0, Dimensions(0, 1, 0, 1, 0),name='petacoulombs',ascii_symbol='PC',symbol='PC') +teracoulombs = Unit(1000000000000.0, Dimensions(0, 1, 0, 1, 0),name='teracoulombs',ascii_symbol='TC',symbol='TC') +gigacoulombs = Unit(1000000000.0, Dimensions(0, 1, 0, 1, 0),name='gigacoulombs',ascii_symbol='GC',symbol='GC') +megacoulombs = Unit(1000000.0, Dimensions(0, 1, 0, 1, 0),name='megacoulombs',ascii_symbol='MC',symbol='MC') +kilocoulombs = Unit(1000.0, Dimensions(0, 1, 0, 1, 0),name='kilocoulombs',ascii_symbol='kC',symbol='kC') +millicoulombs = Unit(0.001, Dimensions(0, 1, 0, 1, 0),name='millicoulombs',ascii_symbol='mC',symbol='mC') +microcoulombs = Unit(1e-06, Dimensions(0, 1, 0, 1, 0),name='microcoulombs',ascii_symbol='uC',symbol='µC') +nanocoulombs = Unit(1e-09, Dimensions(0, 1, 0, 1, 0),name='nanocoulombs',ascii_symbol='nC',symbol='nC') +picocoulombs = Unit(1e-12, Dimensions(0, 1, 0, 1, 0),name='picocoulombs',ascii_symbol='pC',symbol='pC') +femtocoulombs = Unit(1e-15, Dimensions(0, 1, 0, 1, 0),name='femtocoulombs',ascii_symbol='fC',symbol='fC') +attocoulombs = Unit(1e-18, Dimensions(0, 1, 0, 1, 0),name='attocoulombs',ascii_symbol='aC',symbol='aC') +volts = Unit(1, Dimensions(2, -3, 1, -1, 0),name='volts',ascii_symbol='V',symbol='V') +exavolts = Unit(1e+18, Dimensions(2, -3, 1, -1, 0),name='exavolts',ascii_symbol='EV',symbol='EV') +petavolts = Unit(1000000000000000.0, Dimensions(2, -3, 1, -1, 0),name='petavolts',ascii_symbol='PV',symbol='PV') +teravolts = Unit(1000000000000.0, Dimensions(2, -3, 1, -1, 0),name='teravolts',ascii_symbol='TV',symbol='TV') +gigavolts = Unit(1000000000.0, Dimensions(2, -3, 1, -1, 0),name='gigavolts',ascii_symbol='GV',symbol='GV') +megavolts = Unit(1000000.0, Dimensions(2, -3, 1, -1, 0),name='megavolts',ascii_symbol='MV',symbol='MV') +kilovolts = Unit(1000.0, Dimensions(2, -3, 1, -1, 0),name='kilovolts',ascii_symbol='kV',symbol='kV') +millivolts = Unit(0.001, Dimensions(2, -3, 1, -1, 0),name='millivolts',ascii_symbol='mV',symbol='mV') +microvolts = Unit(1e-06, Dimensions(2, -3, 1, -1, 0),name='microvolts',ascii_symbol='uV',symbol='µV') +nanovolts = Unit(1e-09, Dimensions(2, -3, 1, -1, 0),name='nanovolts',ascii_symbol='nV',symbol='nV') +picovolts = Unit(1e-12, Dimensions(2, -3, 1, -1, 0),name='picovolts',ascii_symbol='pV',symbol='pV') +femtovolts = Unit(1e-15, Dimensions(2, -3, 1, -1, 0),name='femtovolts',ascii_symbol='fV',symbol='fV') +attovolts = Unit(1e-18, Dimensions(2, -3, 1, -1, 0),name='attovolts',ascii_symbol='aV',symbol='aV') +ohms = Unit(1, Dimensions(2, -3, 1, -2, 0),name='ohms',ascii_symbol='Ohm',symbol='Ω') +exaohms = Unit(1e+18, Dimensions(2, -3, 1, -2, 0),name='exaohms',ascii_symbol='EOhm',symbol='EΩ') +petaohms = Unit(1000000000000000.0, Dimensions(2, -3, 1, -2, 0),name='petaohms',ascii_symbol='POhm',symbol='PΩ') +teraohms = Unit(1000000000000.0, Dimensions(2, -3, 1, -2, 0),name='teraohms',ascii_symbol='TOhm',symbol='TΩ') +gigaohms = Unit(1000000000.0, Dimensions(2, -3, 1, -2, 0),name='gigaohms',ascii_symbol='GOhm',symbol='GΩ') +megaohms = Unit(1000000.0, Dimensions(2, -3, 1, -2, 0),name='megaohms',ascii_symbol='MOhm',symbol='MΩ') +kiloohms = Unit(1000.0, Dimensions(2, -3, 1, -2, 0),name='kiloohms',ascii_symbol='kOhm',symbol='kΩ') +milliohms = Unit(0.001, Dimensions(2, -3, 1, -2, 0),name='milliohms',ascii_symbol='mOhm',symbol='mΩ') +microohms = Unit(1e-06, Dimensions(2, -3, 1, -2, 0),name='microohms',ascii_symbol='uOhm',symbol='µΩ') +nanoohms = Unit(1e-09, Dimensions(2, -3, 1, -2, 0),name='nanoohms',ascii_symbol='nOhm',symbol='nΩ') +picoohms = Unit(1e-12, Dimensions(2, -3, 1, -2, 0),name='picoohms',ascii_symbol='pOhm',symbol='pΩ') +femtoohms = Unit(1e-15, Dimensions(2, -3, 1, -2, 0),name='femtoohms',ascii_symbol='fOhm',symbol='fΩ') +attoohms = Unit(1e-18, Dimensions(2, -3, 1, -2, 0),name='attoohms',ascii_symbol='aOhm',symbol='aΩ') +farads = Unit(1, Dimensions(-2, 4, -1, 2, 0),name='farads',ascii_symbol='F',symbol='F') +exafarads = Unit(1e+18, Dimensions(-2, 4, -1, 2, 0),name='exafarads',ascii_symbol='EF',symbol='EF') +petafarads = Unit(1000000000000000.0, Dimensions(-2, 4, -1, 2, 0),name='petafarads',ascii_symbol='PF',symbol='PF') +terafarads = Unit(1000000000000.0, Dimensions(-2, 4, -1, 2, 0),name='terafarads',ascii_symbol='TF',symbol='TF') +gigafarads = Unit(1000000000.0, Dimensions(-2, 4, -1, 2, 0),name='gigafarads',ascii_symbol='GF',symbol='GF') +megafarads = Unit(1000000.0, Dimensions(-2, 4, -1, 2, 0),name='megafarads',ascii_symbol='MF',symbol='MF') +kilofarads = Unit(1000.0, Dimensions(-2, 4, -1, 2, 0),name='kilofarads',ascii_symbol='kF',symbol='kF') +millifarads = Unit(0.001, Dimensions(-2, 4, -1, 2, 0),name='millifarads',ascii_symbol='mF',symbol='mF') +microfarads = Unit(1e-06, Dimensions(-2, 4, -1, 2, 0),name='microfarads',ascii_symbol='uF',symbol='µF') +nanofarads = Unit(1e-09, Dimensions(-2, 4, -1, 2, 0),name='nanofarads',ascii_symbol='nF',symbol='nF') +picofarads = Unit(1e-12, Dimensions(-2, 4, -1, 2, 0),name='picofarads',ascii_symbol='pF',symbol='pF') +femtofarads = Unit(1e-15, Dimensions(-2, 4, -1, 2, 0),name='femtofarads',ascii_symbol='fF',symbol='fF') +attofarads = Unit(1e-18, Dimensions(-2, 4, -1, 2, 0),name='attofarads',ascii_symbol='aF',symbol='aF') +siemens = Unit(1, Dimensions(-2, 3, -1, 2, 0),name='siemens',ascii_symbol='S',symbol='S') +exasiemens = Unit(1e+18, Dimensions(-2, 3, -1, 2, 0),name='exasiemens',ascii_symbol='ES',symbol='ES') +petasiemens = Unit(1000000000000000.0, Dimensions(-2, 3, -1, 2, 0),name='petasiemens',ascii_symbol='PS',symbol='PS') +terasiemens = Unit(1000000000000.0, Dimensions(-2, 3, -1, 2, 0),name='terasiemens',ascii_symbol='TS',symbol='TS') +gigasiemens = Unit(1000000000.0, Dimensions(-2, 3, -1, 2, 0),name='gigasiemens',ascii_symbol='GS',symbol='GS') +megasiemens = Unit(1000000.0, Dimensions(-2, 3, -1, 2, 0),name='megasiemens',ascii_symbol='MS',symbol='MS') +kilosiemens = Unit(1000.0, Dimensions(-2, 3, -1, 2, 0),name='kilosiemens',ascii_symbol='kS',symbol='kS') +millisiemens = Unit(0.001, Dimensions(-2, 3, -1, 2, 0),name='millisiemens',ascii_symbol='mS',symbol='mS') +microsiemens = Unit(1e-06, Dimensions(-2, 3, -1, 2, 0),name='microsiemens',ascii_symbol='uS',symbol='µS') +nanosiemens = Unit(1e-09, Dimensions(-2, 3, -1, 2, 0),name='nanosiemens',ascii_symbol='nS',symbol='nS') +picosiemens = Unit(1e-12, Dimensions(-2, 3, -1, 2, 0),name='picosiemens',ascii_symbol='pS',symbol='pS') +femtosiemens = Unit(1e-15, Dimensions(-2, 3, -1, 2, 0),name='femtosiemens',ascii_symbol='fS',symbol='fS') +attosiemens = Unit(1e-18, Dimensions(-2, 3, -1, 2, 0),name='attosiemens',ascii_symbol='aS',symbol='aS') +webers = Unit(1, Dimensions(2, -2, 1, -1, 0),name='webers',ascii_symbol='Wb',symbol='Wb') +exawebers = Unit(1e+18, Dimensions(2, -2, 1, -1, 0),name='exawebers',ascii_symbol='EWb',symbol='EWb') +petawebers = Unit(1000000000000000.0, Dimensions(2, -2, 1, -1, 0),name='petawebers',ascii_symbol='PWb',symbol='PWb') +terawebers = Unit(1000000000000.0, Dimensions(2, -2, 1, -1, 0),name='terawebers',ascii_symbol='TWb',symbol='TWb') +gigawebers = Unit(1000000000.0, Dimensions(2, -2, 1, -1, 0),name='gigawebers',ascii_symbol='GWb',symbol='GWb') +megawebers = Unit(1000000.0, Dimensions(2, -2, 1, -1, 0),name='megawebers',ascii_symbol='MWb',symbol='MWb') +kilowebers = Unit(1000.0, Dimensions(2, -2, 1, -1, 0),name='kilowebers',ascii_symbol='kWb',symbol='kWb') +milliwebers = Unit(0.001, Dimensions(2, -2, 1, -1, 0),name='milliwebers',ascii_symbol='mWb',symbol='mWb') +microwebers = Unit(1e-06, Dimensions(2, -2, 1, -1, 0),name='microwebers',ascii_symbol='uWb',symbol='µWb') +nanowebers = Unit(1e-09, Dimensions(2, -2, 1, -1, 0),name='nanowebers',ascii_symbol='nWb',symbol='nWb') +picowebers = Unit(1e-12, Dimensions(2, -2, 1, -1, 0),name='picowebers',ascii_symbol='pWb',symbol='pWb') +femtowebers = Unit(1e-15, Dimensions(2, -2, 1, -1, 0),name='femtowebers',ascii_symbol='fWb',symbol='fWb') +attowebers = Unit(1e-18, Dimensions(2, -2, 1, -1, 0),name='attowebers',ascii_symbol='aWb',symbol='aWb') +tesla = Unit(1, Dimensions(0, -2, 1, -1, 0),name='tesla',ascii_symbol='T',symbol='T') +exatesla = Unit(1e+18, Dimensions(0, -2, 1, -1, 0),name='exatesla',ascii_symbol='ET',symbol='ET') +petatesla = Unit(1000000000000000.0, Dimensions(0, -2, 1, -1, 0),name='petatesla',ascii_symbol='PT',symbol='PT') +teratesla = Unit(1000000000000.0, Dimensions(0, -2, 1, -1, 0),name='teratesla',ascii_symbol='TT',symbol='TT') +gigatesla = Unit(1000000000.0, Dimensions(0, -2, 1, -1, 0),name='gigatesla',ascii_symbol='GT',symbol='GT') +megatesla = Unit(1000000.0, Dimensions(0, -2, 1, -1, 0),name='megatesla',ascii_symbol='MT',symbol='MT') +kilotesla = Unit(1000.0, Dimensions(0, -2, 1, -1, 0),name='kilotesla',ascii_symbol='kT',symbol='kT') +millitesla = Unit(0.001, Dimensions(0, -2, 1, -1, 0),name='millitesla',ascii_symbol='mT',symbol='mT') +microtesla = Unit(1e-06, Dimensions(0, -2, 1, -1, 0),name='microtesla',ascii_symbol='uT',symbol='µT') +nanotesla = Unit(1e-09, Dimensions(0, -2, 1, -1, 0),name='nanotesla',ascii_symbol='nT',symbol='nT') +picotesla = Unit(1e-12, Dimensions(0, -2, 1, -1, 0),name='picotesla',ascii_symbol='pT',symbol='pT') +femtotesla = Unit(1e-15, Dimensions(0, -2, 1, -1, 0),name='femtotesla',ascii_symbol='fT',symbol='fT') +attotesla = Unit(1e-18, Dimensions(0, -2, 1, -1, 0),name='attotesla',ascii_symbol='aT',symbol='aT') +henry = Unit(1, Dimensions(2, -2, 1, -2, 0),name='henry',ascii_symbol='H',symbol='H') +exahenry = Unit(1e+18, Dimensions(2, -2, 1, -2, 0),name='exahenry',ascii_symbol='EH',symbol='EH') +petahenry = Unit(1000000000000000.0, Dimensions(2, -2, 1, -2, 0),name='petahenry',ascii_symbol='PH',symbol='PH') +terahenry = Unit(1000000000000.0, Dimensions(2, -2, 1, -2, 0),name='terahenry',ascii_symbol='TH',symbol='TH') +gigahenry = Unit(1000000000.0, Dimensions(2, -2, 1, -2, 0),name='gigahenry',ascii_symbol='GH',symbol='GH') +megahenry = Unit(1000000.0, Dimensions(2, -2, 1, -2, 0),name='megahenry',ascii_symbol='MH',symbol='MH') +kilohenry = Unit(1000.0, Dimensions(2, -2, 1, -2, 0),name='kilohenry',ascii_symbol='kH',symbol='kH') +millihenry = Unit(0.001, Dimensions(2, -2, 1, -2, 0),name='millihenry',ascii_symbol='mH',symbol='mH') +microhenry = Unit(1e-06, Dimensions(2, -2, 1, -2, 0),name='microhenry',ascii_symbol='uH',symbol='µH') +nanohenry = Unit(1e-09, Dimensions(2, -2, 1, -2, 0),name='nanohenry',ascii_symbol='nH',symbol='nH') +picohenry = Unit(1e-12, Dimensions(2, -2, 1, -2, 0),name='picohenry',ascii_symbol='pH',symbol='pH') +femtohenry = Unit(1e-15, Dimensions(2, -2, 1, -2, 0),name='femtohenry',ascii_symbol='fH',symbol='fH') +attohenry = Unit(1e-18, Dimensions(2, -2, 1, -2, 0),name='attohenry',ascii_symbol='aH',symbol='aH') +degrees_celsius = Unit(1, Dimensions(0, 0, 0, 0, 1),name='degrees_celsius',ascii_symbol='C',symbol='C') +angstroms = Unit(1e-10, Dimensions(1, 0, 0, 0, 0),name='angstroms',ascii_symbol='A',symbol='Å') +angstroms = Unit(1e-10, Dimensions(1, 0, 0, 0, 0),name='angstroms',ascii_symbol='Ang',symbol='Ang') +minutes = Unit(60, Dimensions(0, 1, 0, 0, 0),name='minutes',ascii_symbol='min',symbol='min') +hours = Unit(360, Dimensions(0, 1, 0, 0, 0),name='hours',ascii_symbol='hr',symbol='hr') +days = Unit(8640, Dimensions(0, 1, 0, 0, 0),name='days',ascii_symbol='d',symbol='d') +days = Unit(8640, Dimensions(0, 1, 0, 0, 0),name='days',ascii_symbol='day',symbol='day') +years = Unit(3155695.2, Dimensions(0, 1, 0, 0, 0),name='years',ascii_symbol='y',symbol='y') +years = Unit(3155695.2, Dimensions(0, 1, 0, 0, 0),name='years',ascii_symbol='yr',symbol='yr') +degrees = Unit(57.29577951308232, Dimensions(0, 0, 0, 0, 0),name='degrees',ascii_symbol='deg',symbol='deg') +radians = Unit(1, Dimensions(0, 0, 0, 0, 0),name='radians',ascii_symbol='rad',symbol='rad') +stradians = Unit(1, Dimensions(0, 0, 0, 0, 0),name='stradians',ascii_symbol='sr',symbol='sr') +square_meters = Unit(1, Dimensions(2, 0, 0, 0, 0), name='square_meters', ascii_symbol='m^2', symbol='m²') +cubic_meters = Unit(1, Dimensions(3, 0, 0, 0, 0), name='cubic_meters', ascii_symbol='m^3', symbol='m³') +per_meter = Unit(1.0, Dimensions(-1, 0, 0, 0, 0), name='per_meter', ascii_symbol='m^-1', symbol='m⁻¹') +per_square_meter = Unit(1.0, Dimensions(-2, 0, 0, 0, 0), name='per_square_meter', ascii_symbol='m^-2', symbol='m⁻²') +per_cubic_meter = Unit(1.0, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_meter', ascii_symbol='m^-3', symbol='m⁻³') +square_exameters = Unit(1e+36, Dimensions(2, 0, 0, 0, 0), name='square_exameters', ascii_symbol='Em^2', symbol='Em²') +cubic_exameters = Unit(1e+54, Dimensions(3, 0, 0, 0, 0), name='cubic_exameters', ascii_symbol='Em^3', symbol='Em³') +per_exameter = Unit(1e-18, Dimensions(-1, 0, 0, 0, 0), name='per_exameter', ascii_symbol='Em^-1', symbol='Em⁻¹') +per_square_exameter = Unit(1e-36, Dimensions(-2, 0, 0, 0, 0), name='per_square_exameter', ascii_symbol='Em^-2', symbol='Em⁻²') +per_cubic_exameter = Unit(1e-54, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_exameter', ascii_symbol='Em^-3', symbol='Em⁻³') +square_petameters = Unit(1e+30, Dimensions(2, 0, 0, 0, 0), name='square_petameters', ascii_symbol='Pm^2', symbol='Pm²') +cubic_petameters = Unit(1e+45, Dimensions(3, 0, 0, 0, 0), name='cubic_petameters', ascii_symbol='Pm^3', symbol='Pm³') +per_petameter = Unit(1e-15, Dimensions(-1, 0, 0, 0, 0), name='per_petameter', ascii_symbol='Pm^-1', symbol='Pm⁻¹') +per_square_petameter = Unit(1e-30, Dimensions(-2, 0, 0, 0, 0), name='per_square_petameter', ascii_symbol='Pm^-2', symbol='Pm⁻²') +per_cubic_petameter = Unit(1e-45, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_petameter', ascii_symbol='Pm^-3', symbol='Pm⁻³') +square_terameters = Unit(1e+24, Dimensions(2, 0, 0, 0, 0), name='square_terameters', ascii_symbol='Tm^2', symbol='Tm²') +cubic_terameters = Unit(1e+36, Dimensions(3, 0, 0, 0, 0), name='cubic_terameters', ascii_symbol='Tm^3', symbol='Tm³') +per_terameter = Unit(1e-12, Dimensions(-1, 0, 0, 0, 0), name='per_terameter', ascii_symbol='Tm^-1', symbol='Tm⁻¹') +per_square_terameter = Unit(1e-24, Dimensions(-2, 0, 0, 0, 0), name='per_square_terameter', ascii_symbol='Tm^-2', symbol='Tm⁻²') +per_cubic_terameter = Unit(1e-36, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_terameter', ascii_symbol='Tm^-3', symbol='Tm⁻³') +square_gigameters = Unit(1e+18, Dimensions(2, 0, 0, 0, 0), name='square_gigameters', ascii_symbol='Gm^2', symbol='Gm²') +cubic_gigameters = Unit(1e+27, Dimensions(3, 0, 0, 0, 0), name='cubic_gigameters', ascii_symbol='Gm^3', symbol='Gm³') +per_gigameter = Unit(1e-09, Dimensions(-1, 0, 0, 0, 0), name='per_gigameter', ascii_symbol='Gm^-1', symbol='Gm⁻¹') +per_square_gigameter = Unit(1e-18, Dimensions(-2, 0, 0, 0, 0), name='per_square_gigameter', ascii_symbol='Gm^-2', symbol='Gm⁻²') +per_cubic_gigameter = Unit(1e-27, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_gigameter', ascii_symbol='Gm^-3', symbol='Gm⁻³') +square_megameters = Unit(1000000000000.0, Dimensions(2, 0, 0, 0, 0), name='square_megameters', ascii_symbol='Mm^2', symbol='Mm²') +cubic_megameters = Unit(1e+18, Dimensions(3, 0, 0, 0, 0), name='cubic_megameters', ascii_symbol='Mm^3', symbol='Mm³') +per_megameter = Unit(1e-06, Dimensions(-1, 0, 0, 0, 0), name='per_megameter', ascii_symbol='Mm^-1', symbol='Mm⁻¹') +per_square_megameter = Unit(1e-12, Dimensions(-2, 0, 0, 0, 0), name='per_square_megameter', ascii_symbol='Mm^-2', symbol='Mm⁻²') +per_cubic_megameter = Unit(1e-18, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_megameter', ascii_symbol='Mm^-3', symbol='Mm⁻³') +square_kilometers = Unit(1000000.0, Dimensions(2, 0, 0, 0, 0), name='square_kilometers', ascii_symbol='km^2', symbol='km²') +cubic_kilometers = Unit(1000000000.0, Dimensions(3, 0, 0, 0, 0), name='cubic_kilometers', ascii_symbol='km^3', symbol='km³') +per_kilometer = Unit(0.001, Dimensions(-1, 0, 0, 0, 0), name='per_kilometer', ascii_symbol='km^-1', symbol='km⁻¹') +per_square_kilometer = Unit(1e-06, Dimensions(-2, 0, 0, 0, 0), name='per_square_kilometer', ascii_symbol='km^-2', symbol='km⁻²') +per_cubic_kilometer = Unit(1e-09, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_kilometer', ascii_symbol='km^-3', symbol='km⁻³') +square_millimeters = Unit(1e-06, Dimensions(2, 0, 0, 0, 0), name='square_millimeters', ascii_symbol='mm^2', symbol='mm²') +cubic_millimeters = Unit(1e-09, Dimensions(3, 0, 0, 0, 0), name='cubic_millimeters', ascii_symbol='mm^3', symbol='mm³') +per_millimeter = Unit(1000.0, Dimensions(-1, 0, 0, 0, 0), name='per_millimeter', ascii_symbol='mm^-1', symbol='mm⁻¹') +per_square_millimeter = Unit(1000000.0, Dimensions(-2, 0, 0, 0, 0), name='per_square_millimeter', ascii_symbol='mm^-2', symbol='mm⁻²') +per_cubic_millimeter = Unit(999999999.9999999, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_millimeter', ascii_symbol='mm^-3', symbol='mm⁻³') +square_micrometers = Unit(1e-12, Dimensions(2, 0, 0, 0, 0), name='square_micrometers', ascii_symbol='um^2', symbol='µm²') +cubic_micrometers = Unit(9.999999999999999e-19, Dimensions(3, 0, 0, 0, 0), name='cubic_micrometers', ascii_symbol='um^3', symbol='µm³') +per_micrometer = Unit(1000000.0, Dimensions(-1, 0, 0, 0, 0), name='per_micrometer', ascii_symbol='um^-1', symbol='µm⁻¹') +per_square_micrometer = Unit(1000000000000.0001, Dimensions(-2, 0, 0, 0, 0), name='per_square_micrometer', ascii_symbol='um^-2', symbol='µm⁻²') +per_cubic_micrometer = Unit(1.0000000000000001e+18, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_micrometer', ascii_symbol='um^-3', symbol='µm⁻³') +square_nanometers = Unit(1e-18, Dimensions(2, 0, 0, 0, 0), name='square_nanometers', ascii_symbol='nm^2', symbol='nm²') +cubic_nanometers = Unit(1.0000000000000002e-27, Dimensions(3, 0, 0, 0, 0), name='cubic_nanometers', ascii_symbol='nm^3', symbol='nm³') +per_nanometer = Unit(999999999.9999999, Dimensions(-1, 0, 0, 0, 0), name='per_nanometer', ascii_symbol='nm^-1', symbol='nm⁻¹') +per_square_nanometer = Unit(9.999999999999999e+17, Dimensions(-2, 0, 0, 0, 0), name='per_square_nanometer', ascii_symbol='nm^-2', symbol='nm⁻²') +per_cubic_nanometer = Unit(9.999999999999999e+26, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_nanometer', ascii_symbol='nm^-3', symbol='nm⁻³') +square_picometers = Unit(1e-24, Dimensions(2, 0, 0, 0, 0), name='square_picometers', ascii_symbol='pm^2', symbol='pm²') +cubic_picometers = Unit(1e-36, Dimensions(3, 0, 0, 0, 0), name='cubic_picometers', ascii_symbol='pm^3', symbol='pm³') +per_picometer = Unit(1000000000000.0, Dimensions(-1, 0, 0, 0, 0), name='per_picometer', ascii_symbol='pm^-1', symbol='pm⁻¹') +per_square_picometer = Unit(1e+24, Dimensions(-2, 0, 0, 0, 0), name='per_square_picometer', ascii_symbol='pm^-2', symbol='pm⁻²') +per_cubic_picometer = Unit(1e+36, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_picometer', ascii_symbol='pm^-3', symbol='pm⁻³') +square_femtometers = Unit(1e-30, Dimensions(2, 0, 0, 0, 0), name='square_femtometers', ascii_symbol='fm^2', symbol='fm²') +cubic_femtometers = Unit(1.0000000000000003e-45, Dimensions(3, 0, 0, 0, 0), name='cubic_femtometers', ascii_symbol='fm^3', symbol='fm³') +per_femtometer = Unit(999999999999999.9, Dimensions(-1, 0, 0, 0, 0), name='per_femtometer', ascii_symbol='fm^-1', symbol='fm⁻¹') +per_square_femtometer = Unit(9.999999999999999e+29, Dimensions(-2, 0, 0, 0, 0), name='per_square_femtometer', ascii_symbol='fm^-2', symbol='fm⁻²') +per_cubic_femtometer = Unit(9.999999999999998e+44, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_femtometer', ascii_symbol='fm^-3', symbol='fm⁻³') +square_attometers = Unit(1.0000000000000001e-36, Dimensions(2, 0, 0, 0, 0), name='square_attometers', ascii_symbol='am^2', symbol='am²') +cubic_attometers = Unit(1.0000000000000002e-54, Dimensions(3, 0, 0, 0, 0), name='cubic_attometers', ascii_symbol='am^3', symbol='am³') +per_attometer = Unit(9.999999999999999e+17, Dimensions(-1, 0, 0, 0, 0), name='per_attometer', ascii_symbol='am^-1', symbol='am⁻¹') +per_square_attometer = Unit(9.999999999999999e+35, Dimensions(-2, 0, 0, 0, 0), name='per_square_attometer', ascii_symbol='am^-2', symbol='am⁻²') +per_cubic_attometer = Unit(9.999999999999997e+53, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_attometer', ascii_symbol='am^-3', symbol='am⁻³') +square_angstroms = Unit(1.0000000000000001e-20, Dimensions(2, 0, 0, 0, 0), name='square_angstroms', ascii_symbol='A^2', symbol='Ų') +cubic_angstroms = Unit(1e-30, Dimensions(3, 0, 0, 0, 0), name='cubic_angstroms', ascii_symbol='A^3', symbol='ų') +per_angstrom = Unit(10000000000.0, Dimensions(-1, 0, 0, 0, 0), name='per_angstrom', ascii_symbol='A^-1', symbol='Å⁻¹') +per_square_angstrom = Unit(1e+20, Dimensions(-2, 0, 0, 0, 0), name='per_square_angstrom', ascii_symbol='A^-2', symbol='Å⁻²') +per_cubic_angstrom = Unit(9.999999999999999e+29, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_angstrom', ascii_symbol='A^-3', symbol='Å⁻³') +square_angstroms = Unit(1.0000000000000001e-20, Dimensions(2, 0, 0, 0, 0), name='square_angstroms', ascii_symbol='Ang^2', symbol='Ang²') +cubic_angstroms = Unit(1e-30, Dimensions(3, 0, 0, 0, 0), name='cubic_angstroms', ascii_symbol='Ang^3', symbol='Ang³') +per_angstrom = Unit(10000000000.0, Dimensions(-1, 0, 0, 0, 0), name='per_angstrom', ascii_symbol='Ang^-1', symbol='Ang⁻¹') +per_square_angstrom = Unit(1e+20, Dimensions(-2, 0, 0, 0, 0), name='per_square_angstrom', ascii_symbol='Ang^-2', symbol='Ang⁻²') +per_cubic_angstrom = Unit(9.999999999999999e+29, Dimensions(-3, 0, 0, 0, 0), name='per_cubic_angstrom', ascii_symbol='Ang^-3', symbol='Ang⁻³') +meters_per_second = Unit(1.0, Dimensions(1, -1, 0, 0, 0), name='meters_per_second', ascii_symbol='m/s', symbol='NoneNone⁻¹') +meters_per_square_second = Unit(1.0, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_second', ascii_symbol='m/s^2', symbol='NoneNone⁻²') +meters_per_millisecond = Unit(1000.0, Dimensions(1, -1, 0, 0, 0), name='meters_per_millisecond', ascii_symbol='m/ms', symbol='Nonems⁻¹') +meters_per_square_millisecond = Unit(1000.0, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_millisecond', ascii_symbol='m/ms^2', symbol='Nonems⁻²') +meters_per_microsecond = Unit(1000000.0, Dimensions(1, -1, 0, 0, 0), name='meters_per_microsecond', ascii_symbol='m/us', symbol='Noneµs⁻¹') +meters_per_square_microsecond = Unit(1000000.0, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_microsecond', ascii_symbol='m/us^2', symbol='Noneµs⁻²') +meters_per_nanosecond = Unit(999999999.9999999, Dimensions(1, -1, 0, 0, 0), name='meters_per_nanosecond', ascii_symbol='m/ns', symbol='Nonens⁻¹') +meters_per_square_nanosecond = Unit(999999999.9999999, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_nanosecond', ascii_symbol='m/ns^2', symbol='Nonens⁻²') +meters_per_picosecond = Unit(1000000000000.0, Dimensions(1, -1, 0, 0, 0), name='meters_per_picosecond', ascii_symbol='m/ps', symbol='Noneps⁻¹') +meters_per_square_picosecond = Unit(1000000000000.0, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_picosecond', ascii_symbol='m/ps^2', symbol='Noneps⁻²') +meters_per_femtosecond = Unit(999999999999999.9, Dimensions(1, -1, 0, 0, 0), name='meters_per_femtosecond', ascii_symbol='m/fs', symbol='Nonefs⁻¹') +meters_per_square_femtosecond = Unit(999999999999999.9, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_femtosecond', ascii_symbol='m/fs^2', symbol='Nonefs⁻²') +meters_per_attosecond = Unit(9.999999999999999e+17, Dimensions(1, -1, 0, 0, 0), name='meters_per_attosecond', ascii_symbol='m/as', symbol='Noneas⁻¹') +meters_per_square_attosecond = Unit(9.999999999999999e+17, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_attosecond', ascii_symbol='m/as^2', symbol='Noneas⁻²') +meters_per_minute = Unit(0.016666666666666666, Dimensions(1, -1, 0, 0, 0), name='meters_per_minute', ascii_symbol='m/min', symbol='NoneNone⁻¹') +meters_per_square_minute = Unit(0.016666666666666666, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_minute', ascii_symbol='m/min^2', symbol='NoneNone⁻²') +meters_per_hour = Unit(0.002777777777777778, Dimensions(1, -1, 0, 0, 0), name='meters_per_hour', ascii_symbol='m/hr', symbol='NoneNone⁻¹') +meters_per_square_hour = Unit(0.002777777777777778, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_hour', ascii_symbol='m/hr^2', symbol='NoneNone⁻²') +meters_per_day = Unit(0.00011574074074074075, Dimensions(1, -1, 0, 0, 0), name='meters_per_day', ascii_symbol='m/d', symbol='NoneNone⁻¹') +meters_per_square_day = Unit(0.00011574074074074075, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_day', ascii_symbol='m/d^2', symbol='NoneNone⁻²') +meters_per_day = Unit(0.00011574074074074075, Dimensions(1, -1, 0, 0, 0), name='meters_per_day', ascii_symbol='m/day', symbol='NoneNone⁻¹') +meters_per_square_day = Unit(0.00011574074074074075, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_day', ascii_symbol='m/day^2', symbol='NoneNone⁻²') +meters_per_year = Unit(3.168873850681143e-07, Dimensions(1, -1, 0, 0, 0), name='meters_per_year', ascii_symbol='m/y', symbol='NoneNone⁻¹') +meters_per_square_year = Unit(3.168873850681143e-07, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_year', ascii_symbol='m/y^2', symbol='NoneNone⁻²') +meters_per_year = Unit(3.168873850681143e-07, Dimensions(1, -1, 0, 0, 0), name='meters_per_year', ascii_symbol='m/yr', symbol='NoneNone⁻¹') +meters_per_square_year = Unit(3.168873850681143e-07, Dimensions(1, -2, 0, 0, 0), name='meters_per_square_year', ascii_symbol='m/yr^2', symbol='NoneNone⁻²') +exameters_per_second = Unit(1e+18, Dimensions(1, -1, 0, 0, 0), name='exameters_per_second', ascii_symbol='Em/s', symbol='EmNone⁻¹') +exameters_per_square_second = Unit(1e+18, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_second', ascii_symbol='Em/s^2', symbol='EmNone⁻²') +exameters_per_millisecond = Unit(1e+21, Dimensions(1, -1, 0, 0, 0), name='exameters_per_millisecond', ascii_symbol='Em/ms', symbol='Emms⁻¹') +exameters_per_square_millisecond = Unit(1e+21, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_millisecond', ascii_symbol='Em/ms^2', symbol='Emms⁻²') +exameters_per_microsecond = Unit(1e+24, Dimensions(1, -1, 0, 0, 0), name='exameters_per_microsecond', ascii_symbol='Em/us', symbol='Emµs⁻¹') +exameters_per_square_microsecond = Unit(1e+24, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_microsecond', ascii_symbol='Em/us^2', symbol='Emµs⁻²') +exameters_per_nanosecond = Unit(9.999999999999999e+26, Dimensions(1, -1, 0, 0, 0), name='exameters_per_nanosecond', ascii_symbol='Em/ns', symbol='Emns⁻¹') +exameters_per_square_nanosecond = Unit(9.999999999999999e+26, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_nanosecond', ascii_symbol='Em/ns^2', symbol='Emns⁻²') +exameters_per_picosecond = Unit(1e+30, Dimensions(1, -1, 0, 0, 0), name='exameters_per_picosecond', ascii_symbol='Em/ps', symbol='Emps⁻¹') +exameters_per_square_picosecond = Unit(1e+30, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_picosecond', ascii_symbol='Em/ps^2', symbol='Emps⁻²') +exameters_per_femtosecond = Unit(1e+33, Dimensions(1, -1, 0, 0, 0), name='exameters_per_femtosecond', ascii_symbol='Em/fs', symbol='Emfs⁻¹') +exameters_per_square_femtosecond = Unit(1e+33, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_femtosecond', ascii_symbol='Em/fs^2', symbol='Emfs⁻²') +exameters_per_attosecond = Unit(9.999999999999999e+35, Dimensions(1, -1, 0, 0, 0), name='exameters_per_attosecond', ascii_symbol='Em/as', symbol='Emas⁻¹') +exameters_per_square_attosecond = Unit(9.999999999999999e+35, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_attosecond', ascii_symbol='Em/as^2', symbol='Emas⁻²') +exameters_per_minute = Unit(1.6666666666666666e+16, Dimensions(1, -1, 0, 0, 0), name='exameters_per_minute', ascii_symbol='Em/min', symbol='EmNone⁻¹') +exameters_per_square_minute = Unit(1.6666666666666666e+16, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_minute', ascii_symbol='Em/min^2', symbol='EmNone⁻²') +exameters_per_hour = Unit(2777777777777778.0, Dimensions(1, -1, 0, 0, 0), name='exameters_per_hour', ascii_symbol='Em/hr', symbol='EmNone⁻¹') +exameters_per_square_hour = Unit(2777777777777778.0, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_hour', ascii_symbol='Em/hr^2', symbol='EmNone⁻²') +exameters_per_day = Unit(115740740740740.73, Dimensions(1, -1, 0, 0, 0), name='exameters_per_day', ascii_symbol='Em/d', symbol='EmNone⁻¹') +exameters_per_square_day = Unit(115740740740740.73, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_day', ascii_symbol='Em/d^2', symbol='EmNone⁻²') +exameters_per_day = Unit(115740740740740.73, Dimensions(1, -1, 0, 0, 0), name='exameters_per_day', ascii_symbol='Em/day', symbol='EmNone⁻¹') +exameters_per_square_day = Unit(115740740740740.73, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_day', ascii_symbol='Em/day^2', symbol='EmNone⁻²') +exameters_per_year = Unit(316887385068.1143, Dimensions(1, -1, 0, 0, 0), name='exameters_per_year', ascii_symbol='Em/y', symbol='EmNone⁻¹') +exameters_per_square_year = Unit(316887385068.1143, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_year', ascii_symbol='Em/y^2', symbol='EmNone⁻²') +exameters_per_year = Unit(316887385068.1143, Dimensions(1, -1, 0, 0, 0), name='exameters_per_year', ascii_symbol='Em/yr', symbol='EmNone⁻¹') +exameters_per_square_year = Unit(316887385068.1143, Dimensions(1, -2, 0, 0, 0), name='exameters_per_square_year', ascii_symbol='Em/yr^2', symbol='EmNone⁻²') +petameters_per_second = Unit(1000000000000000.0, Dimensions(1, -1, 0, 0, 0), name='petameters_per_second', ascii_symbol='Pm/s', symbol='PmNone⁻¹') +petameters_per_square_second = Unit(1000000000000000.0, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_second', ascii_symbol='Pm/s^2', symbol='PmNone⁻²') +petameters_per_millisecond = Unit(1e+18, Dimensions(1, -1, 0, 0, 0), name='petameters_per_millisecond', ascii_symbol='Pm/ms', symbol='Pmms⁻¹') +petameters_per_square_millisecond = Unit(1e+18, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_millisecond', ascii_symbol='Pm/ms^2', symbol='Pmms⁻²') +petameters_per_microsecond = Unit(1e+21, Dimensions(1, -1, 0, 0, 0), name='petameters_per_microsecond', ascii_symbol='Pm/us', symbol='Pmµs⁻¹') +petameters_per_square_microsecond = Unit(1e+21, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_microsecond', ascii_symbol='Pm/us^2', symbol='Pmµs⁻²') +petameters_per_nanosecond = Unit(1e+24, Dimensions(1, -1, 0, 0, 0), name='petameters_per_nanosecond', ascii_symbol='Pm/ns', symbol='Pmns⁻¹') +petameters_per_square_nanosecond = Unit(1e+24, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_nanosecond', ascii_symbol='Pm/ns^2', symbol='Pmns⁻²') +petameters_per_picosecond = Unit(1e+27, Dimensions(1, -1, 0, 0, 0), name='petameters_per_picosecond', ascii_symbol='Pm/ps', symbol='Pmps⁻¹') +petameters_per_square_picosecond = Unit(1e+27, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_picosecond', ascii_symbol='Pm/ps^2', symbol='Pmps⁻²') +petameters_per_femtosecond = Unit(9.999999999999999e+29, Dimensions(1, -1, 0, 0, 0), name='petameters_per_femtosecond', ascii_symbol='Pm/fs', symbol='Pmfs⁻¹') +petameters_per_square_femtosecond = Unit(9.999999999999999e+29, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_femtosecond', ascii_symbol='Pm/fs^2', symbol='Pmfs⁻²') +petameters_per_attosecond = Unit(1e+33, Dimensions(1, -1, 0, 0, 0), name='petameters_per_attosecond', ascii_symbol='Pm/as', symbol='Pmas⁻¹') +petameters_per_square_attosecond = Unit(1e+33, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_attosecond', ascii_symbol='Pm/as^2', symbol='Pmas⁻²') +petameters_per_minute = Unit(16666666666666.666, Dimensions(1, -1, 0, 0, 0), name='petameters_per_minute', ascii_symbol='Pm/min', symbol='PmNone⁻¹') +petameters_per_square_minute = Unit(16666666666666.666, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_minute', ascii_symbol='Pm/min^2', symbol='PmNone⁻²') +petameters_per_hour = Unit(2777777777777.778, Dimensions(1, -1, 0, 0, 0), name='petameters_per_hour', ascii_symbol='Pm/hr', symbol='PmNone⁻¹') +petameters_per_square_hour = Unit(2777777777777.778, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_hour', ascii_symbol='Pm/hr^2', symbol='PmNone⁻²') +petameters_per_day = Unit(115740740740.74074, Dimensions(1, -1, 0, 0, 0), name='petameters_per_day', ascii_symbol='Pm/d', symbol='PmNone⁻¹') +petameters_per_square_day = Unit(115740740740.74074, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_day', ascii_symbol='Pm/d^2', symbol='PmNone⁻²') +petameters_per_day = Unit(115740740740.74074, Dimensions(1, -1, 0, 0, 0), name='petameters_per_day', ascii_symbol='Pm/day', symbol='PmNone⁻¹') +petameters_per_square_day = Unit(115740740740.74074, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_day', ascii_symbol='Pm/day^2', symbol='PmNone⁻²') +petameters_per_year = Unit(316887385.0681143, Dimensions(1, -1, 0, 0, 0), name='petameters_per_year', ascii_symbol='Pm/y', symbol='PmNone⁻¹') +petameters_per_square_year = Unit(316887385.0681143, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_year', ascii_symbol='Pm/y^2', symbol='PmNone⁻²') +petameters_per_year = Unit(316887385.0681143, Dimensions(1, -1, 0, 0, 0), name='petameters_per_year', ascii_symbol='Pm/yr', symbol='PmNone⁻¹') +petameters_per_square_year = Unit(316887385.0681143, Dimensions(1, -2, 0, 0, 0), name='petameters_per_square_year', ascii_symbol='Pm/yr^2', symbol='PmNone⁻²') +terameters_per_second = Unit(1000000000000.0, Dimensions(1, -1, 0, 0, 0), name='terameters_per_second', ascii_symbol='Tm/s', symbol='TmNone⁻¹') +terameters_per_square_second = Unit(1000000000000.0, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_second', ascii_symbol='Tm/s^2', symbol='TmNone⁻²') +terameters_per_millisecond = Unit(1000000000000000.0, Dimensions(1, -1, 0, 0, 0), name='terameters_per_millisecond', ascii_symbol='Tm/ms', symbol='Tmms⁻¹') +terameters_per_square_millisecond = Unit(1000000000000000.0, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_millisecond', ascii_symbol='Tm/ms^2', symbol='Tmms⁻²') +terameters_per_microsecond = Unit(1e+18, Dimensions(1, -1, 0, 0, 0), name='terameters_per_microsecond', ascii_symbol='Tm/us', symbol='Tmµs⁻¹') +terameters_per_square_microsecond = Unit(1e+18, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_microsecond', ascii_symbol='Tm/us^2', symbol='Tmµs⁻²') +terameters_per_nanosecond = Unit(1e+21, Dimensions(1, -1, 0, 0, 0), name='terameters_per_nanosecond', ascii_symbol='Tm/ns', symbol='Tmns⁻¹') +terameters_per_square_nanosecond = Unit(1e+21, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_nanosecond', ascii_symbol='Tm/ns^2', symbol='Tmns⁻²') +terameters_per_picosecond = Unit(1e+24, Dimensions(1, -1, 0, 0, 0), name='terameters_per_picosecond', ascii_symbol='Tm/ps', symbol='Tmps⁻¹') +terameters_per_square_picosecond = Unit(1e+24, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_picosecond', ascii_symbol='Tm/ps^2', symbol='Tmps⁻²') +terameters_per_femtosecond = Unit(9.999999999999999e+26, Dimensions(1, -1, 0, 0, 0), name='terameters_per_femtosecond', ascii_symbol='Tm/fs', symbol='Tmfs⁻¹') +terameters_per_square_femtosecond = Unit(9.999999999999999e+26, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_femtosecond', ascii_symbol='Tm/fs^2', symbol='Tmfs⁻²') +terameters_per_attosecond = Unit(9.999999999999999e+29, Dimensions(1, -1, 0, 0, 0), name='terameters_per_attosecond', ascii_symbol='Tm/as', symbol='Tmas⁻¹') +terameters_per_square_attosecond = Unit(9.999999999999999e+29, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_attosecond', ascii_symbol='Tm/as^2', symbol='Tmas⁻²') +terameters_per_minute = Unit(16666666666.666666, Dimensions(1, -1, 0, 0, 0), name='terameters_per_minute', ascii_symbol='Tm/min', symbol='TmNone⁻¹') +terameters_per_square_minute = Unit(16666666666.666666, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_minute', ascii_symbol='Tm/min^2', symbol='TmNone⁻²') +terameters_per_hour = Unit(2777777777.7777777, Dimensions(1, -1, 0, 0, 0), name='terameters_per_hour', ascii_symbol='Tm/hr', symbol='TmNone⁻¹') +terameters_per_square_hour = Unit(2777777777.7777777, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_hour', ascii_symbol='Tm/hr^2', symbol='TmNone⁻²') +terameters_per_day = Unit(115740740.74074075, Dimensions(1, -1, 0, 0, 0), name='terameters_per_day', ascii_symbol='Tm/d', symbol='TmNone⁻¹') +terameters_per_square_day = Unit(115740740.74074075, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_day', ascii_symbol='Tm/d^2', symbol='TmNone⁻²') +terameters_per_day = Unit(115740740.74074075, Dimensions(1, -1, 0, 0, 0), name='terameters_per_day', ascii_symbol='Tm/day', symbol='TmNone⁻¹') +terameters_per_square_day = Unit(115740740.74074075, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_day', ascii_symbol='Tm/day^2', symbol='TmNone⁻²') +terameters_per_year = Unit(316887.38506811426, Dimensions(1, -1, 0, 0, 0), name='terameters_per_year', ascii_symbol='Tm/y', symbol='TmNone⁻¹') +terameters_per_square_year = Unit(316887.38506811426, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_year', ascii_symbol='Tm/y^2', symbol='TmNone⁻²') +terameters_per_year = Unit(316887.38506811426, Dimensions(1, -1, 0, 0, 0), name='terameters_per_year', ascii_symbol='Tm/yr', symbol='TmNone⁻¹') +terameters_per_square_year = Unit(316887.38506811426, Dimensions(1, -2, 0, 0, 0), name='terameters_per_square_year', ascii_symbol='Tm/yr^2', symbol='TmNone⁻²') +gigameters_per_second = Unit(1000000000.0, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_second', ascii_symbol='Gm/s', symbol='GmNone⁻¹') +gigameters_per_square_second = Unit(1000000000.0, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_second', ascii_symbol='Gm/s^2', symbol='GmNone⁻²') +gigameters_per_millisecond = Unit(1000000000000.0, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_millisecond', ascii_symbol='Gm/ms', symbol='Gmms⁻¹') +gigameters_per_square_millisecond = Unit(1000000000000.0, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_millisecond', ascii_symbol='Gm/ms^2', symbol='Gmms⁻²') +gigameters_per_microsecond = Unit(1000000000000000.0, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_microsecond', ascii_symbol='Gm/us', symbol='Gmµs⁻¹') +gigameters_per_square_microsecond = Unit(1000000000000000.0, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_microsecond', ascii_symbol='Gm/us^2', symbol='Gmµs⁻²') +gigameters_per_nanosecond = Unit(1e+18, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_nanosecond', ascii_symbol='Gm/ns', symbol='Gmns⁻¹') +gigameters_per_square_nanosecond = Unit(1e+18, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_nanosecond', ascii_symbol='Gm/ns^2', symbol='Gmns⁻²') +gigameters_per_picosecond = Unit(1e+21, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_picosecond', ascii_symbol='Gm/ps', symbol='Gmps⁻¹') +gigameters_per_square_picosecond = Unit(1e+21, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_picosecond', ascii_symbol='Gm/ps^2', symbol='Gmps⁻²') +gigameters_per_femtosecond = Unit(1e+24, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_femtosecond', ascii_symbol='Gm/fs', symbol='Gmfs⁻¹') +gigameters_per_square_femtosecond = Unit(1e+24, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_femtosecond', ascii_symbol='Gm/fs^2', symbol='Gmfs⁻²') +gigameters_per_attosecond = Unit(9.999999999999999e+26, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_attosecond', ascii_symbol='Gm/as', symbol='Gmas⁻¹') +gigameters_per_square_attosecond = Unit(9.999999999999999e+26, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_attosecond', ascii_symbol='Gm/as^2', symbol='Gmas⁻²') +gigameters_per_minute = Unit(16666666.666666666, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_minute', ascii_symbol='Gm/min', symbol='GmNone⁻¹') +gigameters_per_square_minute = Unit(16666666.666666666, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_minute', ascii_symbol='Gm/min^2', symbol='GmNone⁻²') +gigameters_per_hour = Unit(2777777.777777778, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_hour', ascii_symbol='Gm/hr', symbol='GmNone⁻¹') +gigameters_per_square_hour = Unit(2777777.777777778, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_hour', ascii_symbol='Gm/hr^2', symbol='GmNone⁻²') +gigameters_per_day = Unit(115740.74074074074, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_day', ascii_symbol='Gm/d', symbol='GmNone⁻¹') +gigameters_per_square_day = Unit(115740.74074074074, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_day', ascii_symbol='Gm/d^2', symbol='GmNone⁻²') +gigameters_per_day = Unit(115740.74074074074, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_day', ascii_symbol='Gm/day', symbol='GmNone⁻¹') +gigameters_per_square_day = Unit(115740.74074074074, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_day', ascii_symbol='Gm/day^2', symbol='GmNone⁻²') +gigameters_per_year = Unit(316.88738506811427, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_year', ascii_symbol='Gm/y', symbol='GmNone⁻¹') +gigameters_per_square_year = Unit(316.88738506811427, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_year', ascii_symbol='Gm/y^2', symbol='GmNone⁻²') +gigameters_per_year = Unit(316.88738506811427, Dimensions(1, -1, 0, 0, 0), name='gigameters_per_year', ascii_symbol='Gm/yr', symbol='GmNone⁻¹') +gigameters_per_square_year = Unit(316.88738506811427, Dimensions(1, -2, 0, 0, 0), name='gigameters_per_square_year', ascii_symbol='Gm/yr^2', symbol='GmNone⁻²') +megameters_per_second = Unit(1000000.0, Dimensions(1, -1, 0, 0, 0), name='megameters_per_second', ascii_symbol='Mm/s', symbol='MmNone⁻¹') +megameters_per_square_second = Unit(1000000.0, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_second', ascii_symbol='Mm/s^2', symbol='MmNone⁻²') +megameters_per_millisecond = Unit(1000000000.0, Dimensions(1, -1, 0, 0, 0), name='megameters_per_millisecond', ascii_symbol='Mm/ms', symbol='Mmms⁻¹') +megameters_per_square_millisecond = Unit(1000000000.0, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_millisecond', ascii_symbol='Mm/ms^2', symbol='Mmms⁻²') +megameters_per_microsecond = Unit(1000000000000.0, Dimensions(1, -1, 0, 0, 0), name='megameters_per_microsecond', ascii_symbol='Mm/us', symbol='Mmµs⁻¹') +megameters_per_square_microsecond = Unit(1000000000000.0, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_microsecond', ascii_symbol='Mm/us^2', symbol='Mmµs⁻²') +megameters_per_nanosecond = Unit(1000000000000000.0, Dimensions(1, -1, 0, 0, 0), name='megameters_per_nanosecond', ascii_symbol='Mm/ns', symbol='Mmns⁻¹') +megameters_per_square_nanosecond = Unit(1000000000000000.0, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_nanosecond', ascii_symbol='Mm/ns^2', symbol='Mmns⁻²') +megameters_per_picosecond = Unit(1e+18, Dimensions(1, -1, 0, 0, 0), name='megameters_per_picosecond', ascii_symbol='Mm/ps', symbol='Mmps⁻¹') +megameters_per_square_picosecond = Unit(1e+18, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_picosecond', ascii_symbol='Mm/ps^2', symbol='Mmps⁻²') +megameters_per_femtosecond = Unit(9.999999999999999e+20, Dimensions(1, -1, 0, 0, 0), name='megameters_per_femtosecond', ascii_symbol='Mm/fs', symbol='Mmfs⁻¹') +megameters_per_square_femtosecond = Unit(9.999999999999999e+20, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_femtosecond', ascii_symbol='Mm/fs^2', symbol='Mmfs⁻²') +megameters_per_attosecond = Unit(1e+24, Dimensions(1, -1, 0, 0, 0), name='megameters_per_attosecond', ascii_symbol='Mm/as', symbol='Mmas⁻¹') +megameters_per_square_attosecond = Unit(1e+24, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_attosecond', ascii_symbol='Mm/as^2', symbol='Mmas⁻²') +megameters_per_minute = Unit(16666.666666666668, Dimensions(1, -1, 0, 0, 0), name='megameters_per_minute', ascii_symbol='Mm/min', symbol='MmNone⁻¹') +megameters_per_square_minute = Unit(16666.666666666668, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_minute', ascii_symbol='Mm/min^2', symbol='MmNone⁻²') +megameters_per_hour = Unit(2777.777777777778, Dimensions(1, -1, 0, 0, 0), name='megameters_per_hour', ascii_symbol='Mm/hr', symbol='MmNone⁻¹') +megameters_per_square_hour = Unit(2777.777777777778, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_hour', ascii_symbol='Mm/hr^2', symbol='MmNone⁻²') +megameters_per_day = Unit(115.74074074074075, Dimensions(1, -1, 0, 0, 0), name='megameters_per_day', ascii_symbol='Mm/d', symbol='MmNone⁻¹') +megameters_per_square_day = Unit(115.74074074074075, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_day', ascii_symbol='Mm/d^2', symbol='MmNone⁻²') +megameters_per_day = Unit(115.74074074074075, Dimensions(1, -1, 0, 0, 0), name='megameters_per_day', ascii_symbol='Mm/day', symbol='MmNone⁻¹') +megameters_per_square_day = Unit(115.74074074074075, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_day', ascii_symbol='Mm/day^2', symbol='MmNone⁻²') +megameters_per_year = Unit(0.3168873850681143, Dimensions(1, -1, 0, 0, 0), name='megameters_per_year', ascii_symbol='Mm/y', symbol='MmNone⁻¹') +megameters_per_square_year = Unit(0.3168873850681143, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_year', ascii_symbol='Mm/y^2', symbol='MmNone⁻²') +megameters_per_year = Unit(0.3168873850681143, Dimensions(1, -1, 0, 0, 0), name='megameters_per_year', ascii_symbol='Mm/yr', symbol='MmNone⁻¹') +megameters_per_square_year = Unit(0.3168873850681143, Dimensions(1, -2, 0, 0, 0), name='megameters_per_square_year', ascii_symbol='Mm/yr^2', symbol='MmNone⁻²') +kilometers_per_second = Unit(1000.0, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_second', ascii_symbol='km/s', symbol='kmNone⁻¹') +kilometers_per_square_second = Unit(1000.0, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_second', ascii_symbol='km/s^2', symbol='kmNone⁻²') +kilometers_per_millisecond = Unit(1000000.0, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_millisecond', ascii_symbol='km/ms', symbol='kmms⁻¹') +kilometers_per_square_millisecond = Unit(1000000.0, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_millisecond', ascii_symbol='km/ms^2', symbol='kmms⁻²') +kilometers_per_microsecond = Unit(1000000000.0, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_microsecond', ascii_symbol='km/us', symbol='kmµs⁻¹') +kilometers_per_square_microsecond = Unit(1000000000.0, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_microsecond', ascii_symbol='km/us^2', symbol='kmµs⁻²') +kilometers_per_nanosecond = Unit(999999999999.9999, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_nanosecond', ascii_symbol='km/ns', symbol='kmns⁻¹') +kilometers_per_square_nanosecond = Unit(999999999999.9999, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_nanosecond', ascii_symbol='km/ns^2', symbol='kmns⁻²') +kilometers_per_picosecond = Unit(1000000000000000.0, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_picosecond', ascii_symbol='km/ps', symbol='kmps⁻¹') +kilometers_per_square_picosecond = Unit(1000000000000000.0, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_picosecond', ascii_symbol='km/ps^2', symbol='kmps⁻²') +kilometers_per_femtosecond = Unit(9.999999999999999e+17, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_femtosecond', ascii_symbol='km/fs', symbol='kmfs⁻¹') +kilometers_per_square_femtosecond = Unit(9.999999999999999e+17, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_femtosecond', ascii_symbol='km/fs^2', symbol='kmfs⁻²') +kilometers_per_attosecond = Unit(9.999999999999999e+20, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_attosecond', ascii_symbol='km/as', symbol='kmas⁻¹') +kilometers_per_square_attosecond = Unit(9.999999999999999e+20, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_attosecond', ascii_symbol='km/as^2', symbol='kmas⁻²') +kilometers_per_minute = Unit(16.666666666666668, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_minute', ascii_symbol='km/min', symbol='kmNone⁻¹') +kilometers_per_square_minute = Unit(16.666666666666668, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_minute', ascii_symbol='km/min^2', symbol='kmNone⁻²') +kilometers_per_hour = Unit(2.7777777777777777, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_hour', ascii_symbol='km/hr', symbol='kmNone⁻¹') +kilometers_per_square_hour = Unit(2.7777777777777777, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_hour', ascii_symbol='km/hr^2', symbol='kmNone⁻²') +kilometers_per_day = Unit(0.11574074074074074, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_day', ascii_symbol='km/d', symbol='kmNone⁻¹') +kilometers_per_square_day = Unit(0.11574074074074074, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_day', ascii_symbol='km/d^2', symbol='kmNone⁻²') +kilometers_per_day = Unit(0.11574074074074074, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_day', ascii_symbol='km/day', symbol='kmNone⁻¹') +kilometers_per_square_day = Unit(0.11574074074074074, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_day', ascii_symbol='km/day^2', symbol='kmNone⁻²') +kilometers_per_year = Unit(0.0003168873850681143, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_year', ascii_symbol='km/y', symbol='kmNone⁻¹') +kilometers_per_square_year = Unit(0.0003168873850681143, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_year', ascii_symbol='km/y^2', symbol='kmNone⁻²') +kilometers_per_year = Unit(0.0003168873850681143, Dimensions(1, -1, 0, 0, 0), name='kilometers_per_year', ascii_symbol='km/yr', symbol='kmNone⁻¹') +kilometers_per_square_year = Unit(0.0003168873850681143, Dimensions(1, -2, 0, 0, 0), name='kilometers_per_square_year', ascii_symbol='km/yr^2', symbol='kmNone⁻²') +millimeters_per_second = Unit(0.001, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_second', ascii_symbol='mm/s', symbol='mmNone⁻¹') +millimeters_per_square_second = Unit(0.001, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_second', ascii_symbol='mm/s^2', symbol='mmNone⁻²') +millimeters_per_millisecond = Unit(1.0, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_millisecond', ascii_symbol='mm/ms', symbol='mmms⁻¹') +millimeters_per_square_millisecond = Unit(1.0, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_millisecond', ascii_symbol='mm/ms^2', symbol='mmms⁻²') +millimeters_per_microsecond = Unit(1000.0000000000001, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_microsecond', ascii_symbol='mm/us', symbol='mmµs⁻¹') +millimeters_per_square_microsecond = Unit(1000.0000000000001, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_microsecond', ascii_symbol='mm/us^2', symbol='mmµs⁻²') +millimeters_per_nanosecond = Unit(1000000.0, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_nanosecond', ascii_symbol='mm/ns', symbol='mmns⁻¹') +millimeters_per_square_nanosecond = Unit(1000000.0, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_nanosecond', ascii_symbol='mm/ns^2', symbol='mmns⁻²') +millimeters_per_picosecond = Unit(1000000000.0, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_picosecond', ascii_symbol='mm/ps', symbol='mmps⁻¹') +millimeters_per_square_picosecond = Unit(1000000000.0, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_picosecond', ascii_symbol='mm/ps^2', symbol='mmps⁻²') +millimeters_per_femtosecond = Unit(1000000000000.0, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_femtosecond', ascii_symbol='mm/fs', symbol='mmfs⁻¹') +millimeters_per_square_femtosecond = Unit(1000000000000.0, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_femtosecond', ascii_symbol='mm/fs^2', symbol='mmfs⁻²') +millimeters_per_attosecond = Unit(1000000000000000.0, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_attosecond', ascii_symbol='mm/as', symbol='mmas⁻¹') +millimeters_per_square_attosecond = Unit(1000000000000000.0, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_attosecond', ascii_symbol='mm/as^2', symbol='mmas⁻²') +millimeters_per_minute = Unit(1.6666666666666667e-05, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_minute', ascii_symbol='mm/min', symbol='mmNone⁻¹') +millimeters_per_square_minute = Unit(1.6666666666666667e-05, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_minute', ascii_symbol='mm/min^2', symbol='mmNone⁻²') +millimeters_per_hour = Unit(2.777777777777778e-06, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_hour', ascii_symbol='mm/hr', symbol='mmNone⁻¹') +millimeters_per_square_hour = Unit(2.777777777777778e-06, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_hour', ascii_symbol='mm/hr^2', symbol='mmNone⁻²') +millimeters_per_day = Unit(1.1574074074074074e-07, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_day', ascii_symbol='mm/d', symbol='mmNone⁻¹') +millimeters_per_square_day = Unit(1.1574074074074074e-07, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_day', ascii_symbol='mm/d^2', symbol='mmNone⁻²') +millimeters_per_day = Unit(1.1574074074074074e-07, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_day', ascii_symbol='mm/day', symbol='mmNone⁻¹') +millimeters_per_square_day = Unit(1.1574074074074074e-07, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_day', ascii_symbol='mm/day^2', symbol='mmNone⁻²') +millimeters_per_year = Unit(3.168873850681143e-10, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_year', ascii_symbol='mm/y', symbol='mmNone⁻¹') +millimeters_per_square_year = Unit(3.168873850681143e-10, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_year', ascii_symbol='mm/y^2', symbol='mmNone⁻²') +millimeters_per_year = Unit(3.168873850681143e-10, Dimensions(1, -1, 0, 0, 0), name='millimeters_per_year', ascii_symbol='mm/yr', symbol='mmNone⁻¹') +millimeters_per_square_year = Unit(3.168873850681143e-10, Dimensions(1, -2, 0, 0, 0), name='millimeters_per_square_year', ascii_symbol='mm/yr^2', symbol='mmNone⁻²') +micrometers_per_second = Unit(1e-06, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_second', ascii_symbol='um/s', symbol='µmNone⁻¹') +micrometers_per_square_second = Unit(1e-06, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_second', ascii_symbol='um/s^2', symbol='µmNone⁻²') +micrometers_per_millisecond = Unit(0.001, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_millisecond', ascii_symbol='um/ms', symbol='µmms⁻¹') +micrometers_per_square_millisecond = Unit(0.001, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_millisecond', ascii_symbol='um/ms^2', symbol='µmms⁻²') +micrometers_per_microsecond = Unit(1.0, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_microsecond', ascii_symbol='um/us', symbol='µmµs⁻¹') +micrometers_per_square_microsecond = Unit(1.0, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_microsecond', ascii_symbol='um/us^2', symbol='µmµs⁻²') +micrometers_per_nanosecond = Unit(999.9999999999999, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_nanosecond', ascii_symbol='um/ns', symbol='µmns⁻¹') +micrometers_per_square_nanosecond = Unit(999.9999999999999, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_nanosecond', ascii_symbol='um/ns^2', symbol='µmns⁻²') +micrometers_per_picosecond = Unit(1000000.0, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_picosecond', ascii_symbol='um/ps', symbol='µmps⁻¹') +micrometers_per_square_picosecond = Unit(1000000.0, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_picosecond', ascii_symbol='um/ps^2', symbol='µmps⁻²') +micrometers_per_femtosecond = Unit(999999999.9999999, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_femtosecond', ascii_symbol='um/fs', symbol='µmfs⁻¹') +micrometers_per_square_femtosecond = Unit(999999999.9999999, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_femtosecond', ascii_symbol='um/fs^2', symbol='µmfs⁻²') +micrometers_per_attosecond = Unit(999999999999.9999, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_attosecond', ascii_symbol='um/as', symbol='µmas⁻¹') +micrometers_per_square_attosecond = Unit(999999999999.9999, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_attosecond', ascii_symbol='um/as^2', symbol='µmas⁻²') +micrometers_per_minute = Unit(1.6666666666666667e-08, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_minute', ascii_symbol='um/min', symbol='µmNone⁻¹') +micrometers_per_square_minute = Unit(1.6666666666666667e-08, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_minute', ascii_symbol='um/min^2', symbol='µmNone⁻²') +micrometers_per_hour = Unit(2.7777777777777776e-09, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_hour', ascii_symbol='um/hr', symbol='µmNone⁻¹') +micrometers_per_square_hour = Unit(2.7777777777777776e-09, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_hour', ascii_symbol='um/hr^2', symbol='µmNone⁻²') +micrometers_per_day = Unit(1.1574074074074074e-10, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_day', ascii_symbol='um/d', symbol='µmNone⁻¹') +micrometers_per_square_day = Unit(1.1574074074074074e-10, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_day', ascii_symbol='um/d^2', symbol='µmNone⁻²') +micrometers_per_day = Unit(1.1574074074074074e-10, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_day', ascii_symbol='um/day', symbol='µmNone⁻¹') +micrometers_per_square_day = Unit(1.1574074074074074e-10, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_day', ascii_symbol='um/day^2', symbol='µmNone⁻²') +micrometers_per_year = Unit(3.168873850681143e-13, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_year', ascii_symbol='um/y', symbol='µmNone⁻¹') +micrometers_per_square_year = Unit(3.168873850681143e-13, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_year', ascii_symbol='um/y^2', symbol='µmNone⁻²') +micrometers_per_year = Unit(3.168873850681143e-13, Dimensions(1, -1, 0, 0, 0), name='micrometers_per_year', ascii_symbol='um/yr', symbol='µmNone⁻¹') +micrometers_per_square_year = Unit(3.168873850681143e-13, Dimensions(1, -2, 0, 0, 0), name='micrometers_per_square_year', ascii_symbol='um/yr^2', symbol='µmNone⁻²') +nanometers_per_second = Unit(1e-09, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_second', ascii_symbol='nm/s', symbol='nmNone⁻¹') +nanometers_per_square_second = Unit(1e-09, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_second', ascii_symbol='nm/s^2', symbol='nmNone⁻²') +nanometers_per_millisecond = Unit(1e-06, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_millisecond', ascii_symbol='nm/ms', symbol='nmms⁻¹') +nanometers_per_square_millisecond = Unit(1e-06, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_millisecond', ascii_symbol='nm/ms^2', symbol='nmms⁻²') +nanometers_per_microsecond = Unit(0.001, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_microsecond', ascii_symbol='nm/us', symbol='nmµs⁻¹') +nanometers_per_square_microsecond = Unit(0.001, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_microsecond', ascii_symbol='nm/us^2', symbol='nmµs⁻²') +nanometers_per_nanosecond = Unit(1.0, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_nanosecond', ascii_symbol='nm/ns', symbol='nmns⁻¹') +nanometers_per_square_nanosecond = Unit(1.0, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_nanosecond', ascii_symbol='nm/ns^2', symbol='nmns⁻²') +nanometers_per_picosecond = Unit(1000.0000000000001, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_picosecond', ascii_symbol='nm/ps', symbol='nmps⁻¹') +nanometers_per_square_picosecond = Unit(1000.0000000000001, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_picosecond', ascii_symbol='nm/ps^2', symbol='nmps⁻²') +nanometers_per_femtosecond = Unit(1000000.0, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_femtosecond', ascii_symbol='nm/fs', symbol='nmfs⁻¹') +nanometers_per_square_femtosecond = Unit(1000000.0, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_femtosecond', ascii_symbol='nm/fs^2', symbol='nmfs⁻²') +nanometers_per_attosecond = Unit(1000000000.0, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_attosecond', ascii_symbol='nm/as', symbol='nmas⁻¹') +nanometers_per_square_attosecond = Unit(1000000000.0, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_attosecond', ascii_symbol='nm/as^2', symbol='nmas⁻²') +nanometers_per_minute = Unit(1.6666666666666667e-11, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_minute', ascii_symbol='nm/min', symbol='nmNone⁻¹') +nanometers_per_square_minute = Unit(1.6666666666666667e-11, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_minute', ascii_symbol='nm/min^2', symbol='nmNone⁻²') +nanometers_per_hour = Unit(2.777777777777778e-12, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_hour', ascii_symbol='nm/hr', symbol='nmNone⁻¹') +nanometers_per_square_hour = Unit(2.777777777777778e-12, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_hour', ascii_symbol='nm/hr^2', symbol='nmNone⁻²') +nanometers_per_day = Unit(1.1574074074074076e-13, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_day', ascii_symbol='nm/d', symbol='nmNone⁻¹') +nanometers_per_square_day = Unit(1.1574074074074076e-13, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_day', ascii_symbol='nm/d^2', symbol='nmNone⁻²') +nanometers_per_day = Unit(1.1574074074074076e-13, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_day', ascii_symbol='nm/day', symbol='nmNone⁻¹') +nanometers_per_square_day = Unit(1.1574074074074076e-13, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_day', ascii_symbol='nm/day^2', symbol='nmNone⁻²') +nanometers_per_year = Unit(3.1688738506811433e-16, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_year', ascii_symbol='nm/y', symbol='nmNone⁻¹') +nanometers_per_square_year = Unit(3.1688738506811433e-16, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_year', ascii_symbol='nm/y^2', symbol='nmNone⁻²') +nanometers_per_year = Unit(3.1688738506811433e-16, Dimensions(1, -1, 0, 0, 0), name='nanometers_per_year', ascii_symbol='nm/yr', symbol='nmNone⁻¹') +nanometers_per_square_year = Unit(3.1688738506811433e-16, Dimensions(1, -2, 0, 0, 0), name='nanometers_per_square_year', ascii_symbol='nm/yr^2', symbol='nmNone⁻²') +picometers_per_second = Unit(1e-12, Dimensions(1, -1, 0, 0, 0), name='picometers_per_second', ascii_symbol='pm/s', symbol='pmNone⁻¹') +picometers_per_square_second = Unit(1e-12, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_second', ascii_symbol='pm/s^2', symbol='pmNone⁻²') +picometers_per_millisecond = Unit(1e-09, Dimensions(1, -1, 0, 0, 0), name='picometers_per_millisecond', ascii_symbol='pm/ms', symbol='pmms⁻¹') +picometers_per_square_millisecond = Unit(1e-09, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_millisecond', ascii_symbol='pm/ms^2', symbol='pmms⁻²') +picometers_per_microsecond = Unit(1e-06, Dimensions(1, -1, 0, 0, 0), name='picometers_per_microsecond', ascii_symbol='pm/us', symbol='pmµs⁻¹') +picometers_per_square_microsecond = Unit(1e-06, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_microsecond', ascii_symbol='pm/us^2', symbol='pmµs⁻²') +picometers_per_nanosecond = Unit(0.001, Dimensions(1, -1, 0, 0, 0), name='picometers_per_nanosecond', ascii_symbol='pm/ns', symbol='pmns⁻¹') +picometers_per_square_nanosecond = Unit(0.001, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_nanosecond', ascii_symbol='pm/ns^2', symbol='pmns⁻²') +picometers_per_picosecond = Unit(1.0, Dimensions(1, -1, 0, 0, 0), name='picometers_per_picosecond', ascii_symbol='pm/ps', symbol='pmps⁻¹') +picometers_per_square_picosecond = Unit(1.0, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_picosecond', ascii_symbol='pm/ps^2', symbol='pmps⁻²') +picometers_per_femtosecond = Unit(999.9999999999999, Dimensions(1, -1, 0, 0, 0), name='picometers_per_femtosecond', ascii_symbol='pm/fs', symbol='pmfs⁻¹') +picometers_per_square_femtosecond = Unit(999.9999999999999, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_femtosecond', ascii_symbol='pm/fs^2', symbol='pmfs⁻²') +picometers_per_attosecond = Unit(999999.9999999999, Dimensions(1, -1, 0, 0, 0), name='picometers_per_attosecond', ascii_symbol='pm/as', symbol='pmas⁻¹') +picometers_per_square_attosecond = Unit(999999.9999999999, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_attosecond', ascii_symbol='pm/as^2', symbol='pmas⁻²') +picometers_per_minute = Unit(1.6666666666666667e-14, Dimensions(1, -1, 0, 0, 0), name='picometers_per_minute', ascii_symbol='pm/min', symbol='pmNone⁻¹') +picometers_per_square_minute = Unit(1.6666666666666667e-14, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_minute', ascii_symbol='pm/min^2', symbol='pmNone⁻²') +picometers_per_hour = Unit(2.7777777777777776e-15, Dimensions(1, -1, 0, 0, 0), name='picometers_per_hour', ascii_symbol='pm/hr', symbol='pmNone⁻¹') +picometers_per_square_hour = Unit(2.7777777777777776e-15, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_hour', ascii_symbol='pm/hr^2', symbol='pmNone⁻²') +picometers_per_day = Unit(1.1574074074074073e-16, Dimensions(1, -1, 0, 0, 0), name='picometers_per_day', ascii_symbol='pm/d', symbol='pmNone⁻¹') +picometers_per_square_day = Unit(1.1574074074074073e-16, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_day', ascii_symbol='pm/d^2', symbol='pmNone⁻²') +picometers_per_day = Unit(1.1574074074074073e-16, Dimensions(1, -1, 0, 0, 0), name='picometers_per_day', ascii_symbol='pm/day', symbol='pmNone⁻¹') +picometers_per_square_day = Unit(1.1574074074074073e-16, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_day', ascii_symbol='pm/day^2', symbol='pmNone⁻²') +picometers_per_year = Unit(3.168873850681143e-19, Dimensions(1, -1, 0, 0, 0), name='picometers_per_year', ascii_symbol='pm/y', symbol='pmNone⁻¹') +picometers_per_square_year = Unit(3.168873850681143e-19, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_year', ascii_symbol='pm/y^2', symbol='pmNone⁻²') +picometers_per_year = Unit(3.168873850681143e-19, Dimensions(1, -1, 0, 0, 0), name='picometers_per_year', ascii_symbol='pm/yr', symbol='pmNone⁻¹') +picometers_per_square_year = Unit(3.168873850681143e-19, Dimensions(1, -2, 0, 0, 0), name='picometers_per_square_year', ascii_symbol='pm/yr^2', symbol='pmNone⁻²') +femtometers_per_second = Unit(1e-15, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_second', ascii_symbol='fm/s', symbol='fmNone⁻¹') +femtometers_per_square_second = Unit(1e-15, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_second', ascii_symbol='fm/s^2', symbol='fmNone⁻²') +femtometers_per_millisecond = Unit(1e-12, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_millisecond', ascii_symbol='fm/ms', symbol='fmms⁻¹') +femtometers_per_square_millisecond = Unit(1e-12, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_millisecond', ascii_symbol='fm/ms^2', symbol='fmms⁻²') +femtometers_per_microsecond = Unit(1e-09, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_microsecond', ascii_symbol='fm/us', symbol='fmµs⁻¹') +femtometers_per_square_microsecond = Unit(1e-09, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_microsecond', ascii_symbol='fm/us^2', symbol='fmµs⁻²') +femtometers_per_nanosecond = Unit(1e-06, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_nanosecond', ascii_symbol='fm/ns', symbol='fmns⁻¹') +femtometers_per_square_nanosecond = Unit(1e-06, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_nanosecond', ascii_symbol='fm/ns^2', symbol='fmns⁻²') +femtometers_per_picosecond = Unit(0.001, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_picosecond', ascii_symbol='fm/ps', symbol='fmps⁻¹') +femtometers_per_square_picosecond = Unit(0.001, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_picosecond', ascii_symbol='fm/ps^2', symbol='fmps⁻²') +femtometers_per_femtosecond = Unit(1.0, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_femtosecond', ascii_symbol='fm/fs', symbol='fmfs⁻¹') +femtometers_per_square_femtosecond = Unit(1.0, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_femtosecond', ascii_symbol='fm/fs^2', symbol='fmfs⁻²') +femtometers_per_attosecond = Unit(1000.0, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_attosecond', ascii_symbol='fm/as', symbol='fmas⁻¹') +femtometers_per_square_attosecond = Unit(1000.0, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_attosecond', ascii_symbol='fm/as^2', symbol='fmas⁻²') +femtometers_per_minute = Unit(1.6666666666666667e-17, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_minute', ascii_symbol='fm/min', symbol='fmNone⁻¹') +femtometers_per_square_minute = Unit(1.6666666666666667e-17, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_minute', ascii_symbol='fm/min^2', symbol='fmNone⁻²') +femtometers_per_hour = Unit(2.777777777777778e-18, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_hour', ascii_symbol='fm/hr', symbol='fmNone⁻¹') +femtometers_per_square_hour = Unit(2.777777777777778e-18, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_hour', ascii_symbol='fm/hr^2', symbol='fmNone⁻²') +femtometers_per_day = Unit(1.1574074074074075e-19, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_day', ascii_symbol='fm/d', symbol='fmNone⁻¹') +femtometers_per_square_day = Unit(1.1574074074074075e-19, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_day', ascii_symbol='fm/d^2', symbol='fmNone⁻²') +femtometers_per_day = Unit(1.1574074074074075e-19, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_day', ascii_symbol='fm/day', symbol='fmNone⁻¹') +femtometers_per_square_day = Unit(1.1574074074074075e-19, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_day', ascii_symbol='fm/day^2', symbol='fmNone⁻²') +femtometers_per_year = Unit(3.168873850681143e-22, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_year', ascii_symbol='fm/y', symbol='fmNone⁻¹') +femtometers_per_square_year = Unit(3.168873850681143e-22, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_year', ascii_symbol='fm/y^2', symbol='fmNone⁻²') +femtometers_per_year = Unit(3.168873850681143e-22, Dimensions(1, -1, 0, 0, 0), name='femtometers_per_year', ascii_symbol='fm/yr', symbol='fmNone⁻¹') +femtometers_per_square_year = Unit(3.168873850681143e-22, Dimensions(1, -2, 0, 0, 0), name='femtometers_per_square_year', ascii_symbol='fm/yr^2', symbol='fmNone⁻²') +attometers_per_second = Unit(1e-18, Dimensions(1, -1, 0, 0, 0), name='attometers_per_second', ascii_symbol='am/s', symbol='amNone⁻¹') +attometers_per_square_second = Unit(1e-18, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_second', ascii_symbol='am/s^2', symbol='amNone⁻²') +attometers_per_millisecond = Unit(1e-15, Dimensions(1, -1, 0, 0, 0), name='attometers_per_millisecond', ascii_symbol='am/ms', symbol='amms⁻¹') +attometers_per_square_millisecond = Unit(1e-15, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_millisecond', ascii_symbol='am/ms^2', symbol='amms⁻²') +attometers_per_microsecond = Unit(1.0000000000000002e-12, Dimensions(1, -1, 0, 0, 0), name='attometers_per_microsecond', ascii_symbol='am/us', symbol='amµs⁻¹') +attometers_per_square_microsecond = Unit(1.0000000000000002e-12, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_microsecond', ascii_symbol='am/us^2', symbol='amµs⁻²') +attometers_per_nanosecond = Unit(1e-09, Dimensions(1, -1, 0, 0, 0), name='attometers_per_nanosecond', ascii_symbol='am/ns', symbol='amns⁻¹') +attometers_per_square_nanosecond = Unit(1e-09, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_nanosecond', ascii_symbol='am/ns^2', symbol='amns⁻²') +attometers_per_picosecond = Unit(1.0000000000000002e-06, Dimensions(1, -1, 0, 0, 0), name='attometers_per_picosecond', ascii_symbol='am/ps', symbol='amps⁻¹') +attometers_per_square_picosecond = Unit(1.0000000000000002e-06, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_picosecond', ascii_symbol='am/ps^2', symbol='amps⁻²') +attometers_per_femtosecond = Unit(0.001, Dimensions(1, -1, 0, 0, 0), name='attometers_per_femtosecond', ascii_symbol='am/fs', symbol='amfs⁻¹') +attometers_per_square_femtosecond = Unit(0.001, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_femtosecond', ascii_symbol='am/fs^2', symbol='amfs⁻²') +attometers_per_attosecond = Unit(1.0, Dimensions(1, -1, 0, 0, 0), name='attometers_per_attosecond', ascii_symbol='am/as', symbol='amas⁻¹') +attometers_per_square_attosecond = Unit(1.0, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_attosecond', ascii_symbol='am/as^2', symbol='amas⁻²') +attometers_per_minute = Unit(1.6666666666666668e-20, Dimensions(1, -1, 0, 0, 0), name='attometers_per_minute', ascii_symbol='am/min', symbol='amNone⁻¹') +attometers_per_square_minute = Unit(1.6666666666666668e-20, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_minute', ascii_symbol='am/min^2', symbol='amNone⁻²') +attometers_per_hour = Unit(2.7777777777777778e-21, Dimensions(1, -1, 0, 0, 0), name='attometers_per_hour', ascii_symbol='am/hr', symbol='amNone⁻¹') +attometers_per_square_hour = Unit(2.7777777777777778e-21, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_hour', ascii_symbol='am/hr^2', symbol='amNone⁻²') +attometers_per_day = Unit(1.1574074074074074e-22, Dimensions(1, -1, 0, 0, 0), name='attometers_per_day', ascii_symbol='am/d', symbol='amNone⁻¹') +attometers_per_square_day = Unit(1.1574074074074074e-22, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_day', ascii_symbol='am/d^2', symbol='amNone⁻²') +attometers_per_day = Unit(1.1574074074074074e-22, Dimensions(1, -1, 0, 0, 0), name='attometers_per_day', ascii_symbol='am/day', symbol='amNone⁻¹') +attometers_per_square_day = Unit(1.1574074074074074e-22, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_day', ascii_symbol='am/day^2', symbol='amNone⁻²') +attometers_per_year = Unit(3.1688738506811433e-25, Dimensions(1, -1, 0, 0, 0), name='attometers_per_year', ascii_symbol='am/y', symbol='amNone⁻¹') +attometers_per_square_year = Unit(3.1688738506811433e-25, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_year', ascii_symbol='am/y^2', symbol='amNone⁻²') +attometers_per_year = Unit(3.1688738506811433e-25, Dimensions(1, -1, 0, 0, 0), name='attometers_per_year', ascii_symbol='am/yr', symbol='amNone⁻¹') +attometers_per_square_year = Unit(3.1688738506811433e-25, Dimensions(1, -2, 0, 0, 0), name='attometers_per_square_year', ascii_symbol='am/yr^2', symbol='amNone⁻²') +angstroms_per_second = Unit(1e-10, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_second', ascii_symbol='A/s', symbol='ÅNone⁻¹') +angstroms_per_square_second = Unit(1e-10, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_second', ascii_symbol='A/s^2', symbol='ÅNone⁻²') +angstroms_per_millisecond = Unit(1e-07, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_millisecond', ascii_symbol='A/ms', symbol='Åms⁻¹') +angstroms_per_square_millisecond = Unit(1e-07, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_millisecond', ascii_symbol='A/ms^2', symbol='Åms⁻²') +angstroms_per_microsecond = Unit(0.0001, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_microsecond', ascii_symbol='A/us', symbol='ŵs⁻¹') +angstroms_per_square_microsecond = Unit(0.0001, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_microsecond', ascii_symbol='A/us^2', symbol='ŵs⁻²') +angstroms_per_nanosecond = Unit(0.09999999999999999, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_nanosecond', ascii_symbol='A/ns', symbol='Åns⁻¹') +angstroms_per_square_nanosecond = Unit(0.09999999999999999, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_nanosecond', ascii_symbol='A/ns^2', symbol='Åns⁻²') +angstroms_per_picosecond = Unit(100.0, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_picosecond', ascii_symbol='A/ps', symbol='Åps⁻¹') +angstroms_per_square_picosecond = Unit(100.0, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_picosecond', ascii_symbol='A/ps^2', symbol='Åps⁻²') +angstroms_per_femtosecond = Unit(100000.0, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_femtosecond', ascii_symbol='A/fs', symbol='Åfs⁻¹') +angstroms_per_square_femtosecond = Unit(100000.0, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_femtosecond', ascii_symbol='A/fs^2', symbol='Åfs⁻²') +angstroms_per_attosecond = Unit(100000000.0, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_attosecond', ascii_symbol='A/as', symbol='Åas⁻¹') +angstroms_per_square_attosecond = Unit(100000000.0, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_attosecond', ascii_symbol='A/as^2', symbol='Åas⁻²') +angstroms_per_minute = Unit(1.6666666666666668e-12, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_minute', ascii_symbol='A/min', symbol='ÅNone⁻¹') +angstroms_per_square_minute = Unit(1.6666666666666668e-12, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_minute', ascii_symbol='A/min^2', symbol='ÅNone⁻²') +angstroms_per_hour = Unit(2.777777777777778e-13, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_hour', ascii_symbol='A/hr', symbol='ÅNone⁻¹') +angstroms_per_square_hour = Unit(2.777777777777778e-13, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_hour', ascii_symbol='A/hr^2', symbol='ÅNone⁻²') +angstroms_per_day = Unit(1.1574074074074074e-14, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_day', ascii_symbol='A/d', symbol='ÅNone⁻¹') +angstroms_per_square_day = Unit(1.1574074074074074e-14, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_day', ascii_symbol='A/d^2', symbol='ÅNone⁻²') +angstroms_per_day = Unit(1.1574074074074074e-14, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_day', ascii_symbol='A/day', symbol='ÅNone⁻¹') +angstroms_per_square_day = Unit(1.1574074074074074e-14, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_day', ascii_symbol='A/day^2', symbol='ÅNone⁻²') +angstroms_per_year = Unit(3.168873850681143e-17, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_year', ascii_symbol='A/y', symbol='ÅNone⁻¹') +angstroms_per_square_year = Unit(3.168873850681143e-17, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_year', ascii_symbol='A/y^2', symbol='ÅNone⁻²') +angstroms_per_year = Unit(3.168873850681143e-17, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_year', ascii_symbol='A/yr', symbol='ÅNone⁻¹') +angstroms_per_square_year = Unit(3.168873850681143e-17, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_year', ascii_symbol='A/yr^2', symbol='ÅNone⁻²') +angstroms_per_second = Unit(1e-10, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_second', ascii_symbol='Ang/s', symbol='NoneNone⁻¹') +angstroms_per_square_second = Unit(1e-10, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_second', ascii_symbol='Ang/s^2', symbol='NoneNone⁻²') +angstroms_per_millisecond = Unit(1e-07, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_millisecond', ascii_symbol='Ang/ms', symbol='Nonems⁻¹') +angstroms_per_square_millisecond = Unit(1e-07, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_millisecond', ascii_symbol='Ang/ms^2', symbol='Nonems⁻²') +angstroms_per_microsecond = Unit(0.0001, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_microsecond', ascii_symbol='Ang/us', symbol='Noneµs⁻¹') +angstroms_per_square_microsecond = Unit(0.0001, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_microsecond', ascii_symbol='Ang/us^2', symbol='Noneµs⁻²') +angstroms_per_nanosecond = Unit(0.09999999999999999, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_nanosecond', ascii_symbol='Ang/ns', symbol='Nonens⁻¹') +angstroms_per_square_nanosecond = Unit(0.09999999999999999, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_nanosecond', ascii_symbol='Ang/ns^2', symbol='Nonens⁻²') +angstroms_per_picosecond = Unit(100.0, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_picosecond', ascii_symbol='Ang/ps', symbol='Noneps⁻¹') +angstroms_per_square_picosecond = Unit(100.0, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_picosecond', ascii_symbol='Ang/ps^2', symbol='Noneps⁻²') +angstroms_per_femtosecond = Unit(100000.0, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_femtosecond', ascii_symbol='Ang/fs', symbol='Nonefs⁻¹') +angstroms_per_square_femtosecond = Unit(100000.0, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_femtosecond', ascii_symbol='Ang/fs^2', symbol='Nonefs⁻²') +angstroms_per_attosecond = Unit(100000000.0, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_attosecond', ascii_symbol='Ang/as', symbol='Noneas⁻¹') +angstroms_per_square_attosecond = Unit(100000000.0, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_attosecond', ascii_symbol='Ang/as^2', symbol='Noneas⁻²') +angstroms_per_minute = Unit(1.6666666666666668e-12, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_minute', ascii_symbol='Ang/min', symbol='NoneNone⁻¹') +angstroms_per_square_minute = Unit(1.6666666666666668e-12, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_minute', ascii_symbol='Ang/min^2', symbol='NoneNone⁻²') +angstroms_per_hour = Unit(2.777777777777778e-13, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_hour', ascii_symbol='Ang/hr', symbol='NoneNone⁻¹') +angstroms_per_square_hour = Unit(2.777777777777778e-13, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_hour', ascii_symbol='Ang/hr^2', symbol='NoneNone⁻²') +angstroms_per_day = Unit(1.1574074074074074e-14, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_day', ascii_symbol='Ang/d', symbol='NoneNone⁻¹') +angstroms_per_square_day = Unit(1.1574074074074074e-14, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_day', ascii_symbol='Ang/d^2', symbol='NoneNone⁻²') +angstroms_per_day = Unit(1.1574074074074074e-14, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_day', ascii_symbol='Ang/day', symbol='NoneNone⁻¹') +angstroms_per_square_day = Unit(1.1574074074074074e-14, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_day', ascii_symbol='Ang/day^2', symbol='NoneNone⁻²') +angstroms_per_year = Unit(3.168873850681143e-17, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_year', ascii_symbol='Ang/y', symbol='NoneNone⁻¹') +angstroms_per_square_year = Unit(3.168873850681143e-17, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_year', ascii_symbol='Ang/y^2', symbol='NoneNone⁻²') +angstroms_per_year = Unit(3.168873850681143e-17, Dimensions(1, -1, 0, 0, 0), name='angstroms_per_year', ascii_symbol='Ang/yr', symbol='NoneNone⁻¹') +angstroms_per_square_year = Unit(3.168873850681143e-17, Dimensions(1, -2, 0, 0, 0), name='angstroms_per_square_year', ascii_symbol='Ang/yr^2', symbol='NoneNone⁻²') + +# +# Lookup table from symbols to units +# + +symbol_lookup = { + "m": meters, + "Em": exameters, + "Pm": petameters, + "Tm": terameters, + "Gm": gigameters, + "Mm": megameters, + "km": kilometers, + "mm": millimeters, + "um": micrometers, + "µm": micrometers, + "nm": nanometers, + "pm": picometers, + "fm": femtometers, + "am": attometers, + "s": seconds, + "ms": milliseconds, + "us": microseconds, + "µs": microseconds, + "ns": nanoseconds, + "ps": picoseconds, + "fs": femtoseconds, + "as": attoseconds, + "g": grams, + "Eg": exagrams, + "Pg": petagrams, + "Tg": teragrams, + "Gg": gigagrams, + "Mg": megagrams, + "kg": kilograms, + "mg": milligrams, + "ug": micrograms, + "µg": micrograms, + "ng": nanograms, + "pg": picograms, + "fg": femtograms, + "ag": attograms, + "A": angstroms, + "EA": exaamps, + "PA": petaamps, + "TA": teraamps, + "GA": gigaamps, + "MA": megaamps, + "kA": kiloamps, + "mA": milliamps, + "uA": microamps, + "µA": microamps, + "nA": nanoamps, + "pA": picoamps, + "fA": femtoamps, + "aA": attoamps, + "K": kelvin, + "EK": exakelvin, + "PK": petakelvin, + "TK": terakelvin, + "GK": gigakelvin, + "MK": megakelvin, + "kK": kilokelvin, + "mK": millikelvin, + "uK": microkelvin, + "µK": microkelvin, + "nK": nanokelvin, + "pK": picokelvin, + "fK": femtokelvin, + "aK": attokelvin, + "Hz": hertz, + "EHz": exahertz, + "PHz": petahertz, + "THz": terahertz, + "GHz": gigahertz, + "MHz": megahertz, + "kHz": kilohertz, + "mHz": millihertz, + "uHz": microhertz, + "µHz": microhertz, + "nHz": nanohertz, + "pHz": picohertz, + "fHz": femtohertz, + "aHz": attohertz, + "N": newtons, + "EN": exanewtons, + "PN": petanewtons, + "TN": teranewtons, + "GN": giganewtons, + "MN": meganewtons, + "kN": kilonewtons, + "mN": millinewtons, + "uN": micronewtons, + "µN": micronewtons, + "nN": nanonewtons, + "pN": piconewtons, + "fN": femtonewtons, + "aN": attonewtons, + "Pa": pascals, + "EPa": exapascals, + "PPa": petapascals, + "TPa": terapascals, + "GPa": gigapascals, + "MPa": megapascals, + "kPa": kilopascals, + "mPa": millipascals, + "uPa": micropascals, + "µPa": micropascals, + "nPa": nanopascals, + "pPa": picopascals, + "fPa": femtopascals, + "aPa": attopascals, + "J": joules, + "EJ": exajoules, + "PJ": petajoules, + "TJ": terajoules, + "GJ": gigajoules, + "MJ": megajoules, + "kJ": kilojoules, + "mJ": millijoules, + "uJ": microjoules, + "µJ": microjoules, + "nJ": nanojoules, + "pJ": picojoules, + "fJ": femtojoules, + "aJ": attojoules, + "W": watts, + "EW": exawatts, + "PW": petawatts, + "TW": terawatts, + "GW": gigawatts, + "MW": megawatts, + "kW": kilowatts, + "mW": milliwatts, + "uW": microwatts, + "µW": microwatts, + "nW": nanowatts, + "pW": picowatts, + "fW": femtowatts, + "aW": attowatts, + "C": degrees_celsius, + "EC": exacoulombs, + "PC": petacoulombs, + "TC": teracoulombs, + "GC": gigacoulombs, + "MC": megacoulombs, + "kC": kilocoulombs, + "mC": millicoulombs, + "uC": microcoulombs, + "µC": microcoulombs, + "nC": nanocoulombs, + "pC": picocoulombs, + "fC": femtocoulombs, + "aC": attocoulombs, + "V": volts, + "EV": exavolts, + "PV": petavolts, + "TV": teravolts, + "GV": gigavolts, + "MV": megavolts, + "kV": kilovolts, + "mV": millivolts, + "uV": microvolts, + "µV": microvolts, + "nV": nanovolts, + "pV": picovolts, + "fV": femtovolts, + "aV": attovolts, + "Ohm": ohms, + "Ω": ohms, + "EOhm": exaohms, + "EΩ": exaohms, + "POhm": petaohms, + "PΩ": petaohms, + "TOhm": teraohms, + "TΩ": teraohms, + "GOhm": gigaohms, + "GΩ": gigaohms, + "MOhm": megaohms, + "MΩ": megaohms, + "kOhm": kiloohms, + "kΩ": kiloohms, + "mOhm": milliohms, + "mΩ": milliohms, + "uOhm": microohms, + "µΩ": microohms, + "nOhm": nanoohms, + "nΩ": nanoohms, + "pOhm": picoohms, + "pΩ": picoohms, + "fOhm": femtoohms, + "fΩ": femtoohms, + "aOhm": attoohms, + "aΩ": attoohms, + "F": farads, + "EF": exafarads, + "PF": petafarads, + "TF": terafarads, + "GF": gigafarads, + "MF": megafarads, + "kF": kilofarads, + "mF": millifarads, + "uF": microfarads, + "µF": microfarads, + "nF": nanofarads, + "pF": picofarads, + "fF": femtofarads, + "aF": attofarads, + "S": siemens, + "ES": exasiemens, + "PS": petasiemens, + "TS": terasiemens, + "GS": gigasiemens, + "MS": megasiemens, + "kS": kilosiemens, + "mS": millisiemens, + "uS": microsiemens, + "µS": microsiemens, + "nS": nanosiemens, + "pS": picosiemens, + "fS": femtosiemens, + "aS": attosiemens, + "Wb": webers, + "EWb": exawebers, + "PWb": petawebers, + "TWb": terawebers, + "GWb": gigawebers, + "MWb": megawebers, + "kWb": kilowebers, + "mWb": milliwebers, + "uWb": microwebers, + "µWb": microwebers, + "nWb": nanowebers, + "pWb": picowebers, + "fWb": femtowebers, + "aWb": attowebers, + "T": tesla, + "ET": exatesla, + "PT": petatesla, + "TT": teratesla, + "GT": gigatesla, + "MT": megatesla, + "kT": kilotesla, + "mT": millitesla, + "uT": microtesla, + "µT": microtesla, + "nT": nanotesla, + "pT": picotesla, + "fT": femtotesla, + "aT": attotesla, + "H": henry, + "EH": exahenry, + "PH": petahenry, + "TH": terahenry, + "GH": gigahenry, + "MH": megahenry, + "kH": kilohenry, + "mH": millihenry, + "uH": microhenry, + "µH": microhenry, + "nH": nanohenry, + "pH": picohenry, + "fH": femtohenry, + "aH": attohenry, + "Å": angstroms, + "Ang": angstroms, + "min": minutes, + "hr": hours, + "d": days, + "day": days, + "y": years, + "yr": years, + "deg": degrees, + "rad": radians, + "sr": stradians, +} + + +# +# Units by type +# + + +length = UnitGroup( + name = 'length', + units = [ + meters, + exameters, + petameters, + terameters, + gigameters, + megameters, + kilometers, + millimeters, + micrometers, + nanometers, + picometers, + femtometers, + attometers, + angstroms, + angstroms, +]) + +area = UnitGroup( + name = 'area', + units = [ + square_meters, + square_exameters, + square_petameters, + square_terameters, + square_gigameters, + square_megameters, + square_kilometers, + square_millimeters, + square_micrometers, + square_nanometers, + square_picometers, + square_femtometers, + square_attometers, + square_angstroms, + square_angstroms, +]) + +volume = UnitGroup( + name = 'volume', + units = [ + cubic_meters, + cubic_exameters, + cubic_petameters, + cubic_terameters, + cubic_gigameters, + cubic_megameters, + cubic_kilometers, + cubic_millimeters, + cubic_micrometers, + cubic_nanometers, + cubic_picometers, + cubic_femtometers, + cubic_attometers, + cubic_angstroms, + cubic_angstroms, +]) + +inverse_length = UnitGroup( + name = 'inverse_length', + units = [ + per_meter, + per_exameter, + per_petameter, + per_terameter, + per_gigameter, + per_megameter, + per_kilometer, + per_millimeter, + per_micrometer, + per_nanometer, + per_picometer, + per_femtometer, + per_attometer, + per_angstrom, + per_angstrom, +]) + +inverse_area = UnitGroup( + name = 'inverse_area', + units = [ + per_square_meter, + per_square_exameter, + per_square_petameter, + per_square_terameter, + per_square_gigameter, + per_square_megameter, + per_square_kilometer, + per_square_millimeter, + per_square_micrometer, + per_square_nanometer, + per_square_picometer, + per_square_femtometer, + per_square_attometer, + per_square_angstrom, + per_square_angstrom, +]) + +inverse_volume = UnitGroup( + name = 'inverse_volume', + units = [ + per_cubic_meter, + per_cubic_exameter, + per_cubic_petameter, + per_cubic_terameter, + per_cubic_gigameter, + per_cubic_megameter, + per_cubic_kilometer, + per_cubic_millimeter, + per_cubic_micrometer, + per_cubic_nanometer, + per_cubic_picometer, + per_cubic_femtometer, + per_cubic_attometer, + per_cubic_angstrom, + per_cubic_angstrom, +]) + +time = UnitGroup( + name = 'time', + units = [ + seconds, + milliseconds, + microseconds, + nanoseconds, + picoseconds, + femtoseconds, + attoseconds, + minutes, + hours, + days, + days, + years, + years, +]) + +rate = UnitGroup( + name = 'rate', + units = [ + hertz, + exahertz, + petahertz, + terahertz, + gigahertz, + megahertz, + kilohertz, + millihertz, + microhertz, + nanohertz, + picohertz, + femtohertz, + attohertz, +]) + +speed = UnitGroup( + name = 'speed', + units = [ + meters_per_second, + meters_per_millisecond, + meters_per_microsecond, + meters_per_nanosecond, + meters_per_picosecond, + meters_per_femtosecond, + meters_per_attosecond, + meters_per_minute, + meters_per_hour, + meters_per_day, + meters_per_day, + meters_per_year, + meters_per_year, + exameters_per_second, + exameters_per_millisecond, + exameters_per_microsecond, + exameters_per_nanosecond, + exameters_per_picosecond, + exameters_per_femtosecond, + exameters_per_attosecond, + exameters_per_minute, + exameters_per_hour, + exameters_per_day, + exameters_per_day, + exameters_per_year, + exameters_per_year, + petameters_per_second, + petameters_per_millisecond, + petameters_per_microsecond, + petameters_per_nanosecond, + petameters_per_picosecond, + petameters_per_femtosecond, + petameters_per_attosecond, + petameters_per_minute, + petameters_per_hour, + petameters_per_day, + petameters_per_day, + petameters_per_year, + petameters_per_year, + terameters_per_second, + terameters_per_millisecond, + terameters_per_microsecond, + terameters_per_nanosecond, + terameters_per_picosecond, + terameters_per_femtosecond, + terameters_per_attosecond, + terameters_per_minute, + terameters_per_hour, + terameters_per_day, + terameters_per_day, + terameters_per_year, + terameters_per_year, + gigameters_per_second, + gigameters_per_millisecond, + gigameters_per_microsecond, + gigameters_per_nanosecond, + gigameters_per_picosecond, + gigameters_per_femtosecond, + gigameters_per_attosecond, + gigameters_per_minute, + gigameters_per_hour, + gigameters_per_day, + gigameters_per_day, + gigameters_per_year, + gigameters_per_year, + megameters_per_second, + megameters_per_millisecond, + megameters_per_microsecond, + megameters_per_nanosecond, + megameters_per_picosecond, + megameters_per_femtosecond, + megameters_per_attosecond, + megameters_per_minute, + megameters_per_hour, + megameters_per_day, + megameters_per_day, + megameters_per_year, + megameters_per_year, + kilometers_per_second, + kilometers_per_millisecond, + kilometers_per_microsecond, + kilometers_per_nanosecond, + kilometers_per_picosecond, + kilometers_per_femtosecond, + kilometers_per_attosecond, + kilometers_per_minute, + kilometers_per_hour, + kilometers_per_day, + kilometers_per_day, + kilometers_per_year, + kilometers_per_year, + millimeters_per_second, + millimeters_per_millisecond, + millimeters_per_microsecond, + millimeters_per_nanosecond, + millimeters_per_picosecond, + millimeters_per_femtosecond, + millimeters_per_attosecond, + millimeters_per_minute, + millimeters_per_hour, + millimeters_per_day, + millimeters_per_day, + millimeters_per_year, + millimeters_per_year, + micrometers_per_second, + micrometers_per_millisecond, + micrometers_per_microsecond, + micrometers_per_nanosecond, + micrometers_per_picosecond, + micrometers_per_femtosecond, + micrometers_per_attosecond, + micrometers_per_minute, + micrometers_per_hour, + micrometers_per_day, + micrometers_per_day, + micrometers_per_year, + micrometers_per_year, + nanometers_per_second, + nanometers_per_millisecond, + nanometers_per_microsecond, + nanometers_per_nanosecond, + nanometers_per_picosecond, + nanometers_per_femtosecond, + nanometers_per_attosecond, + nanometers_per_minute, + nanometers_per_hour, + nanometers_per_day, + nanometers_per_day, + nanometers_per_year, + nanometers_per_year, + picometers_per_second, + picometers_per_millisecond, + picometers_per_microsecond, + picometers_per_nanosecond, + picometers_per_picosecond, + picometers_per_femtosecond, + picometers_per_attosecond, + picometers_per_minute, + picometers_per_hour, + picometers_per_day, + picometers_per_day, + picometers_per_year, + picometers_per_year, + femtometers_per_second, + femtometers_per_millisecond, + femtometers_per_microsecond, + femtometers_per_nanosecond, + femtometers_per_picosecond, + femtometers_per_femtosecond, + femtometers_per_attosecond, + femtometers_per_minute, + femtometers_per_hour, + femtometers_per_day, + femtometers_per_day, + femtometers_per_year, + femtometers_per_year, + attometers_per_second, + attometers_per_millisecond, + attometers_per_microsecond, + attometers_per_nanosecond, + attometers_per_picosecond, + attometers_per_femtosecond, + attometers_per_attosecond, + attometers_per_minute, + attometers_per_hour, + attometers_per_day, + attometers_per_day, + attometers_per_year, + attometers_per_year, + angstroms_per_second, + angstroms_per_millisecond, + angstroms_per_microsecond, + angstroms_per_nanosecond, + angstroms_per_picosecond, + angstroms_per_femtosecond, + angstroms_per_attosecond, + angstroms_per_minute, + angstroms_per_hour, + angstroms_per_day, + angstroms_per_day, + angstroms_per_year, + angstroms_per_year, + angstroms_per_second, + angstroms_per_millisecond, + angstroms_per_microsecond, + angstroms_per_nanosecond, + angstroms_per_picosecond, + angstroms_per_femtosecond, + angstroms_per_attosecond, + angstroms_per_minute, + angstroms_per_hour, + angstroms_per_day, + angstroms_per_day, + angstroms_per_year, + angstroms_per_year, +]) + +acceleration = UnitGroup( + name = 'acceleration', + units = [ + meters_per_square_second, + meters_per_square_millisecond, + meters_per_square_microsecond, + meters_per_square_nanosecond, + meters_per_square_picosecond, + meters_per_square_femtosecond, + meters_per_square_attosecond, + meters_per_square_minute, + meters_per_square_hour, + meters_per_square_day, + meters_per_square_day, + meters_per_square_year, + meters_per_square_year, + exameters_per_square_second, + exameters_per_square_millisecond, + exameters_per_square_microsecond, + exameters_per_square_nanosecond, + exameters_per_square_picosecond, + exameters_per_square_femtosecond, + exameters_per_square_attosecond, + exameters_per_square_minute, + exameters_per_square_hour, + exameters_per_square_day, + exameters_per_square_day, + exameters_per_square_year, + exameters_per_square_year, + petameters_per_square_second, + petameters_per_square_millisecond, + petameters_per_square_microsecond, + petameters_per_square_nanosecond, + petameters_per_square_picosecond, + petameters_per_square_femtosecond, + petameters_per_square_attosecond, + petameters_per_square_minute, + petameters_per_square_hour, + petameters_per_square_day, + petameters_per_square_day, + petameters_per_square_year, + petameters_per_square_year, + terameters_per_square_second, + terameters_per_square_millisecond, + terameters_per_square_microsecond, + terameters_per_square_nanosecond, + terameters_per_square_picosecond, + terameters_per_square_femtosecond, + terameters_per_square_attosecond, + terameters_per_square_minute, + terameters_per_square_hour, + terameters_per_square_day, + terameters_per_square_day, + terameters_per_square_year, + terameters_per_square_year, + gigameters_per_square_second, + gigameters_per_square_millisecond, + gigameters_per_square_microsecond, + gigameters_per_square_nanosecond, + gigameters_per_square_picosecond, + gigameters_per_square_femtosecond, + gigameters_per_square_attosecond, + gigameters_per_square_minute, + gigameters_per_square_hour, + gigameters_per_square_day, + gigameters_per_square_day, + gigameters_per_square_year, + gigameters_per_square_year, + megameters_per_square_second, + megameters_per_square_millisecond, + megameters_per_square_microsecond, + megameters_per_square_nanosecond, + megameters_per_square_picosecond, + megameters_per_square_femtosecond, + megameters_per_square_attosecond, + megameters_per_square_minute, + megameters_per_square_hour, + megameters_per_square_day, + megameters_per_square_day, + megameters_per_square_year, + megameters_per_square_year, + kilometers_per_square_second, + kilometers_per_square_millisecond, + kilometers_per_square_microsecond, + kilometers_per_square_nanosecond, + kilometers_per_square_picosecond, + kilometers_per_square_femtosecond, + kilometers_per_square_attosecond, + kilometers_per_square_minute, + kilometers_per_square_hour, + kilometers_per_square_day, + kilometers_per_square_day, + kilometers_per_square_year, + kilometers_per_square_year, + millimeters_per_square_second, + millimeters_per_square_millisecond, + millimeters_per_square_microsecond, + millimeters_per_square_nanosecond, + millimeters_per_square_picosecond, + millimeters_per_square_femtosecond, + millimeters_per_square_attosecond, + millimeters_per_square_minute, + millimeters_per_square_hour, + millimeters_per_square_day, + millimeters_per_square_day, + millimeters_per_square_year, + millimeters_per_square_year, + micrometers_per_square_second, + micrometers_per_square_millisecond, + micrometers_per_square_microsecond, + micrometers_per_square_nanosecond, + micrometers_per_square_picosecond, + micrometers_per_square_femtosecond, + micrometers_per_square_attosecond, + micrometers_per_square_minute, + micrometers_per_square_hour, + micrometers_per_square_day, + micrometers_per_square_day, + micrometers_per_square_year, + micrometers_per_square_year, + nanometers_per_square_second, + nanometers_per_square_millisecond, + nanometers_per_square_microsecond, + nanometers_per_square_nanosecond, + nanometers_per_square_picosecond, + nanometers_per_square_femtosecond, + nanometers_per_square_attosecond, + nanometers_per_square_minute, + nanometers_per_square_hour, + nanometers_per_square_day, + nanometers_per_square_day, + nanometers_per_square_year, + nanometers_per_square_year, + picometers_per_square_second, + picometers_per_square_millisecond, + picometers_per_square_microsecond, + picometers_per_square_nanosecond, + picometers_per_square_picosecond, + picometers_per_square_femtosecond, + picometers_per_square_attosecond, + picometers_per_square_minute, + picometers_per_square_hour, + picometers_per_square_day, + picometers_per_square_day, + picometers_per_square_year, + picometers_per_square_year, + femtometers_per_square_second, + femtometers_per_square_millisecond, + femtometers_per_square_microsecond, + femtometers_per_square_nanosecond, + femtometers_per_square_picosecond, + femtometers_per_square_femtosecond, + femtometers_per_square_attosecond, + femtometers_per_square_minute, + femtometers_per_square_hour, + femtometers_per_square_day, + femtometers_per_square_day, + femtometers_per_square_year, + femtometers_per_square_year, + attometers_per_square_second, + attometers_per_square_millisecond, + attometers_per_square_microsecond, + attometers_per_square_nanosecond, + attometers_per_square_picosecond, + attometers_per_square_femtosecond, + attometers_per_square_attosecond, + attometers_per_square_minute, + attometers_per_square_hour, + attometers_per_square_day, + attometers_per_square_day, + attometers_per_square_year, + attometers_per_square_year, + angstroms_per_square_second, + angstroms_per_square_millisecond, + angstroms_per_square_microsecond, + angstroms_per_square_nanosecond, + angstroms_per_square_picosecond, + angstroms_per_square_femtosecond, + angstroms_per_square_attosecond, + angstroms_per_square_minute, + angstroms_per_square_hour, + angstroms_per_square_day, + angstroms_per_square_day, + angstroms_per_square_year, + angstroms_per_square_year, + angstroms_per_square_second, + angstroms_per_square_millisecond, + angstroms_per_square_microsecond, + angstroms_per_square_nanosecond, + angstroms_per_square_picosecond, + angstroms_per_square_femtosecond, + angstroms_per_square_attosecond, + angstroms_per_square_minute, + angstroms_per_square_hour, + angstroms_per_square_day, + angstroms_per_square_day, + angstroms_per_square_year, + angstroms_per_square_year, +]) + +force = UnitGroup( + name = 'force', + units = [ + newtons, + exanewtons, + petanewtons, + teranewtons, + giganewtons, + meganewtons, + kilonewtons, + millinewtons, + micronewtons, + nanonewtons, + piconewtons, + femtonewtons, + attonewtons, +]) + +pressure = UnitGroup( + name = 'pressure', + units = [ + pascals, + exapascals, + petapascals, + terapascals, + gigapascals, + megapascals, + kilopascals, + millipascals, + micropascals, + nanopascals, + picopascals, + femtopascals, + attopascals, +]) + +energy = UnitGroup( + name = 'energy', + units = [ + joules, + exajoules, + petajoules, + terajoules, + gigajoules, + megajoules, + kilojoules, + millijoules, + microjoules, + nanojoules, + picojoules, + femtojoules, + attojoules, +]) + +power = UnitGroup( + name = 'power', + units = [ + watts, + exawatts, + petawatts, + terawatts, + gigawatts, + megawatts, + kilowatts, + milliwatts, + microwatts, + nanowatts, + picowatts, + femtowatts, + attowatts, +]) + +charge = UnitGroup( + name = 'charge', + units = [ + coulombs, + exacoulombs, + petacoulombs, + teracoulombs, + gigacoulombs, + megacoulombs, + kilocoulombs, + millicoulombs, + microcoulombs, + nanocoulombs, + picocoulombs, + femtocoulombs, + attocoulombs, +]) + +potential = UnitGroup( + name = 'potential', + units = [ + volts, + exavolts, + petavolts, + teravolts, + gigavolts, + megavolts, + kilovolts, + millivolts, + microvolts, + nanovolts, + picovolts, + femtovolts, + attovolts, +]) + +resistance = UnitGroup( + name = 'resistance', + units = [ + ohms, + exaohms, + petaohms, + teraohms, + gigaohms, + megaohms, + kiloohms, + milliohms, + microohms, + nanoohms, + picoohms, + femtoohms, + attoohms, +]) + +capacitance = UnitGroup( + name = 'capacitance', + units = [ + farads, + exafarads, + petafarads, + terafarads, + gigafarads, + megafarads, + kilofarads, + millifarads, + microfarads, + nanofarads, + picofarads, + femtofarads, + attofarads, +]) + +conductance = UnitGroup( + name = 'conductance', + units = [ + siemens, + exasiemens, + petasiemens, + terasiemens, + gigasiemens, + megasiemens, + kilosiemens, + millisiemens, + microsiemens, + nanosiemens, + picosiemens, + femtosiemens, + attosiemens, +]) + +magnetic_flux = UnitGroup( + name = 'magnetic_flux', + units = [ + webers, + exawebers, + petawebers, + terawebers, + gigawebers, + megawebers, + kilowebers, + milliwebers, + microwebers, + nanowebers, + picowebers, + femtowebers, + attowebers, +]) + +magnetic_flux_density = UnitGroup( + name = 'magnetic_flux_density', + units = [ + tesla, + exatesla, + petatesla, + teratesla, + gigatesla, + megatesla, + kilotesla, + millitesla, + microtesla, + nanotesla, + picotesla, + femtotesla, + attotesla, +]) + +inductance = UnitGroup( + name = 'inductance', + units = [ + henry, + exahenry, + petahenry, + terahenry, + gigahenry, + megahenry, + kilohenry, + millihenry, + microhenry, + nanohenry, + picohenry, + femtohenry, + attohenry, +]) + +temperature = UnitGroup( + name = 'temperature', + units = [ + kelvin, + exakelvin, + petakelvin, + terakelvin, + gigakelvin, + megakelvin, + kilokelvin, + millikelvin, + microkelvin, + nanokelvin, + picokelvin, + femtokelvin, + attokelvin, + degrees_celsius, +]) diff --git a/sasdata/quantities/units_table.py b/sasdata/quantities/units_table.py deleted file mode 100644 index ac59e0d..0000000 --- a/sasdata/quantities/units_table.py +++ /dev/null @@ -1,155 +0,0 @@ -""" -Builds a data file containing details of units -""" - -import numpy as np -from collections import defaultdict - -bigger_magnitudes = [ - ("E", None, "exa", 1e18), - ("P", None, "peta", 1e15), - ("T", None, "tera", 1e12), - ("G", None, "giga", 1e9), - ("M", None, "mega", 1e6), - ("k", None, "kilo", 1e3) ] - -smaller_magnitudes = [ - ("m", None, "milli", 1e-3), - ("u", "µ", "micro", 1e-6), - ("n", None, "nano", 1e-9), - ("p", None, "pico", 1e-12), - ("f", None, "femto", 1e-15), - ("a", None, "atto", 1e-18)] - -all_magnitudes = bigger_magnitudes + smaller_magnitudes - -# Length, time, mass, current, temperature -base_si_units = [ - ("m", None, "meter", "meters", 1, 1, 0, 0, 0, 0, all_magnitudes), - ("s", None, "second", "seconds", 1, 0, 1, 0, 0, 0, smaller_magnitudes), - ("g", None, "gram", "grams", 1, 0, 0, 1, 0, 0, all_magnitudes), - ("A", None, "amp", "amps", 1, 0, 0, 0, 1, 0, all_magnitudes), - ("K", None, "kelvin", "kelvin", 1, 0, 0, 0, 0, 1, all_magnitudes) ] - -derived_si_units = [ - ("Hz", None, "hertz", "hertz", 1, 0, -1, 0, 0, 0, all_magnitudes), - ("N", None, "newton", "newtons", 1, 1, -2, 1, 0, 0, all_magnitudes), - ("Pa", None, "pascal", "pascals", 1, -1, -2, 1, 0, 0, all_magnitudes), - ("J", None, "joule", "joules", 1, 2, -2, 1, 0, 0, all_magnitudes), - ("W", None, "watt", "watts", 1, 2, -3, 1, 0, 0, all_magnitudes), - ("C", None, "coulomb", "coulombs", 1, 0, 1, 0, 1, 0, all_magnitudes), - ("V", None, "volts", "volts", 1, 2, -3, 1, -1, 0, all_magnitudes), - ("Ohm", "Ω", "ohm", "ohms", 1, 2, -3, 1, -2, 0, all_magnitudes), - ("F", None, "farad", "farads", 1, -2, 4, -1, 2, 0, all_magnitudes), - ("S", None, "siemens", "siemens", 1, -2, 3, -1, 2, 0, all_magnitudes), - ("Wb", None, "weber", "webers", 1, 2, -2, 1, -1, 0, all_magnitudes), - ("T", None, "tesla", "tesla", 1, 2, -2, 1, -1, 0, all_magnitudes), - ("H", None, "henry", "henry", 1, 2, -2, 1, -2, 0, all_magnitudes), - ("C", None, "degree Celsius", "degrees Celsius", 1, 0, 0, 0, 0, 1, []) -] - -non_si_units = [ - ("A", None, "angstrom", "angstroms", 1e-10, 1, 0, 0, 0, 0, []), - ("min", None, "minute", "minutes", 60, 0, 1, 0, 0, 0, []), - ("hr", None, "hour", "hours", 360, 0, 1, 0, 0, 0, []), - ("d", None, "day", "days", 360*24, 0, 1, 0, 0, 0, []), - ("day", None, "day", "days", 360*24, 0, 1, 0, 0, 0, []), - ("y", None, "year", "years", 360*24*365.2425, 0, 1, 0, 0, 0, []), - ("yr", None, "year", "years", 360*24*365.2425, 0, 1, 0, 0, 0, []), - ("deg", None, "degree", "degrees", 180/np.pi, 0, 0, 0, 0, 0, []), - ("rad", None, "radian", "radians", 1, 0, 0, 0, 0, 0, []), - ("sr", None, "stradian", "stradians", 1, 0, 0, 0, 0, 0, []) -] - -all_units = base_si_units + derived_si_units + non_si_units - -encoding = "utf-8" - -def write_unit_string(fid, symbol, special_symbol, singular, plural, scale, length, time, mass, current, temperature): - fid.write(f"'{symbol}', '{special_symbol}', '{singular}', '{plural}', ") - fid.write(f"{scale}, {length}, {time}, {mass}, {current}, {temperature}\n") - - -with open("unit_data.txt", mode='w', encoding=encoding) as fid: - for symbol, special_symbol, singular, plural, scale, length, time, mass, current, temperature, magnitudes in all_units: - - write_unit_string(fid, symbol, special_symbol, singular, plural, - scale, length, time, mass, current, temperature) - - for mag_symbol, mag_special_symbol, name, mag_scale in magnitudes: - - combined_symbol = (mag_symbol if mag_special_symbol is None else mag_special_symbol) + \ - (symbol if special_symbol is None else special_symbol) - - write_unit_string(fid,f"{mag_symbol}{symbol}", combined_symbol, f"{name}{singular}", - f"{name}{plural}", scale * mag_scale, length, time, mass, current, temperature) - - -def format_name(name: str): - return name.replace(" ", "_") - -header = """ - -Autogenerated file by units_table.py - - - - ******** DO NOT EDIT BY HAND ******** - - - -""" - -with open("units.py", 'w', encoding=encoding) as fid: - - # Write warning header - fid.write('"""'+header+'"""') - - # Write in class definitions - fid.write("\n\n" - "#\n" - "# Included from units_base.py\n" - "#\n\n") - - with open("units_base.py", 'r') as base: - for line in base: - fid.write(line) - - # Write in unit definitions - fid.write("\n\n" - "#\n" - "# Specific units \n" - "#\n\n") - - symbol_lookup = {} - unit_types = defaultdict(list) - - for symbol, special_symbol, singular, plural, scale, length, time, mass, current, temperature, magnitudes in all_units: - - formatted_plural = format_name(plural) - - fid.write(f"{formatted_plural} = Unit({scale}, Dimensions({length}, {time}, {mass}, {current}, {temperature}))\n") - - symbol_lookup[symbol] = formatted_plural - if special_symbol is not None: - symbol_lookup[special_symbol] = formatted_plural - - for mag_symbol, mag_special_symbol, name, mag_scale in magnitudes: - - combined_special_symbol = (mag_symbol if mag_special_symbol is None else mag_special_symbol) + \ - (symbol if special_symbol is None else special_symbol) - - combined_symbol = mag_symbol + symbol - - combined_name = f"{name}{formatted_plural}" - - fid.write(f"{combined_name} = Unit({scale * mag_scale}, Dimensions({length}, {time}, {mass}, {current}, {temperature}))\n") - - symbol_lookup[combined_symbol] = combined_name - symbol_lookup[combined_special_symbol] = combined_name - - fid.write("symbol_lookup = {\n") - for k in symbol_lookup: - fid.write(f' "{k}": {symbol_lookup[k]},\n') - fid.write("}\n\n") -