# {py:mod}`physpyx.quantity` ```{py:module} physpyx.quantity ``` ```{autodoc2-docstring} physpyx.quantity :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`AltDict ` - * - {py:obj}`SiunitxQuantity ` - ```{autodoc2-docstring} physpyx.quantity.SiunitxQuantity :summary: ``` * - {py:obj}`SiunitxUnitRegistry ` - * - {py:obj}`Constants ` - ```{autodoc2-docstring} physpyx.quantity.Constants :summary: ``` ```` ### Data ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`logger ` - ```{autodoc2-docstring} physpyx.quantity.logger :summary: ``` ```` ### API ````{py:data} logger :canonical: physpyx.quantity.logger :value: > 'getLogger(...)' ```{autodoc2-docstring} physpyx.quantity.logger ``` ```` `````{py:class} AltDict() :canonical: physpyx.quantity.AltDict Bases: {py:obj}`typing.TypedDict` ````{py:attribute} fmt :canonical: physpyx.quantity.AltDict.fmt :type: str :value: > None ```{autodoc2-docstring} physpyx.quantity.AltDict.fmt ``` ```` ````{py:attribute} base :canonical: physpyx.quantity.AltDict.base :type: bool :value: > None ```{autodoc2-docstring} physpyx.quantity.AltDict.base ``` ```` ````{py:attribute} preferred :canonical: physpyx.quantity.AltDict.preferred :type: bool :value: > None ```{autodoc2-docstring} physpyx.quantity.AltDict.preferred ``` ```` ````{py:attribute} compact :canonical: physpyx.quantity.AltDict.compact :type: bool :value: > None ```{autodoc2-docstring} physpyx.quantity.AltDict.compact ``` ```` ````{py:attribute} to :canonical: physpyx.quantity.AltDict.to :type: str :value: > None ```{autodoc2-docstring} physpyx.quantity.AltDict.to ``` ```` ````{py:attribute} alt :canonical: physpyx.quantity.AltDict.alt :type: physpyx.quantity.AltDict :value: > None ```{autodoc2-docstring} physpyx.quantity.AltDict.alt ``` ```` ````` `````{py:class} SiunitxQuantity :canonical: physpyx.quantity.SiunitxQuantity Bases: {py:obj}`pint.registry.Quantity` ```{autodoc2-docstring} physpyx.quantity.SiunitxQuantity ``` ````{py:method} __new__(value: pint._typing.Magnitude, units: pint._typing.UnitLike | None = None, fmt: str = 'g', base: bool = False, compact: bool = False, preferred: bool = True, alt: physpyx.quantity.AltDict | bool = False) -> physpyx.quantity.SiunitxQuantity :canonical: physpyx.quantity.SiunitxQuantity.__new__ ```{autodoc2-docstring} physpyx.quantity.SiunitxQuantity.__new__ ``` ```` ````{py:method} __str__() -> str :canonical: physpyx.quantity.SiunitxQuantity.__str__ ```` ````{py:method} __neg__() -> physpyx.quantity.SiunitxQuantity :canonical: physpyx.quantity.SiunitxQuantity.__neg__ ```{autodoc2-docstring} physpyx.quantity.SiunitxQuantity.__neg__ ``` ```` ````{py:method} export(name: str) -> typing.Generator[tuple[str, str], None, None] :canonical: physpyx.quantity.SiunitxQuantity.export ```{autodoc2-docstring} physpyx.quantity.SiunitxQuantity.export ``` ```` ````{py:method} fmtex(*, to: str | None = None, fmt: str | None = None, base: bool | None = None, compact: bool | None = None, preferred: bool | None = None, alt: physpyx.quantity.AltDict | bool = False) -> physpyx.quantity.SiunitxQuantity :canonical: physpyx.quantity.SiunitxQuantity.fmtex ```{autodoc2-docstring} physpyx.quantity.SiunitxQuantity.fmtex ``` ```` ````{py:method} norm() -> physpyx.quantity.SiunitxQuantity :canonical: physpyx.quantity.SiunitxQuantity.norm ```{autodoc2-docstring} physpyx.quantity.SiunitxQuantity.norm ``` ```` ````{py:method} unit_vector() -> physpyx.quantity.SiunitxQuantity :canonical: physpyx.quantity.SiunitxQuantity.unit_vector ```{autodoc2-docstring} physpyx.quantity.SiunitxQuantity.unit_vector ``` ```` ````{py:method} cross(other: object) -> physpyx.quantity.SiunitxQuantity :canonical: physpyx.quantity.SiunitxQuantity.cross ```{autodoc2-docstring} physpyx.quantity.SiunitxQuantity.cross ``` ```` ````` `````{py:class} SiunitxUnitRegistry(system: str | None = None, **kwargs) :canonical: physpyx.quantity.SiunitxUnitRegistry Bases: {py:obj}`pint.registry.GenericUnitRegistry` ````{py:attribute} Quantity :canonical: physpyx.quantity.SiunitxUnitRegistry.Quantity :type: type :value: > None ```{autodoc2-docstring} physpyx.quantity.SiunitxUnitRegistry.Quantity ``` ```` ````{py:attribute} Unit :canonical: physpyx.quantity.SiunitxUnitRegistry.Unit :type: type :value: > None ```{autodoc2-docstring} physpyx.quantity.SiunitxUnitRegistry.Unit ``` ```` ````` `````{py:class} Constants(fname: pathlib.Path | None) :canonical: physpyx.quantity.Constants ```{autodoc2-docstring} physpyx.quantity.Constants ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} physpyx.quantity.Constants.__init__ ``` ````{py:method} __call__(name: str, fmt: str) -> tuple[float, str, str] :canonical: physpyx.quantity.Constants.__call__ ```{autodoc2-docstring} physpyx.quantity.Constants.__call__ ``` ```` `````