nomogram 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,125 @@
1
+ Metadata-Version: 2.4
2
+ Name: nomogram
3
+ Version: 0.1.0
4
+ Summary: Repository of scientific formulas: notations, units, validity domains
5
+ Keywords: scientific computing,formulas,units,dimensional analysis,physics,thermodynamics,geoscience,atmospheric science,meteorology,hydrology,psychrometrics
6
+ Author: miki4ia
7
+ Author-email: miki4ia <miki4ia@gmail.com>
8
+ License-Expression: BSD-3-Clause AND CC-BY-4.0 AND CC0-1.0
9
+ License-File: LICENSE
10
+ License-File: src/nomogram/data/NOTICE.md
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Scientific/Engineering
19
+ Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
20
+ Classifier: Topic :: Scientific/Engineering :: Hydrology
21
+ Classifier: Topic :: Scientific/Engineering :: Physics
22
+ Classifier: Typing :: Typed
23
+ Requires-Dist: numpy>=2.0
24
+ Requires-Dist: pint>=0.24.4
25
+ Requires-Dist: sympy>=1.13
26
+ Requires-Dist: matplotlib>=3.10.7 ; extra == 'viz'
27
+ Requires-Python: >=3.12
28
+ Project-URL: Homepage, https://github.com/miki4iaml/nomogram
29
+ Project-URL: Repository, https://github.com/miki4iaml/nomogram
30
+ Project-URL: Issues, https://github.com/miki4iaml/nomogram/issues
31
+ Project-URL: Changelog, https://github.com/miki4iaml/nomogram/blob/main/CHANGELOG.md
32
+ Provides-Extra: viz
33
+ Description-Content-Type: text/markdown
34
+
35
+ # nomogram
36
+
37
+ **English** | [Français](README.fr.md)
38
+
39
+ [![CI](https://github.com/miki4iaml/nomogram/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/miki4iaml/nomogram/actions/workflows/ci.yml)
40
+ [![CodeQL](https://github.com/miki4iaml/nomogram/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/miki4iaml/nomogram/actions/workflows/github-code-scanning/codeql)
41
+ [![codecov](https://codecov.io/gh/miki4iaml/nomogram/graph/badge.svg?branch=develop)](https://codecov.io/gh/miki4iaml/nomogram)
42
+ [![Python](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fmiki4iaml%2Fnomogram%2Fdevelop%2Fpyproject.toml)](pyproject.toml)
43
+ [![License](https://img.shields.io/github/license/miki4iaml/nomogram)](LICENSE)
44
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
45
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
46
+ [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
47
+ [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-fe5196)](https://www.conventionalcommits.org/en/v1.0.0/)
48
+
49
+ A repository of scientific formulas: alternative notations across
50
+ authors and conventions, parameter units (including empirical ones),
51
+ validity domains, LaTeX rendering and symbolic computation.
52
+
53
+ Pure Python, built on SymPy, numpy and pint; it works on an offline
54
+ workstation (no online engine).
55
+
56
+ > Early stage project (alpha).
57
+
58
+ ## Installation
59
+
60
+ ```
61
+ pip install nomogram # core
62
+ pip install "nomogram[viz]" # with plots (matplotlib)
63
+ ```
64
+
65
+ ## Installation from source
66
+
67
+ ```
68
+ git clone https://github.com/miki4iaml/nomogram.git
69
+ cd nomogram
70
+ uv sync
71
+ ```
72
+
73
+ Python 3.12 or later. Plots need the `viz` extra (matplotlib):
74
+ `uv sync --extra viz`.
75
+
76
+ ## Example
77
+
78
+ Every saturation vapour pressure formulation of the catalog against the
79
+ IAPWS reference; curves stop where a formulation leaves its stated
80
+ validity domain ([script](docs/examples/saturation_vapour_pressure.py)):
81
+
82
+ ```python
83
+ import numpy as np
84
+ from nomogram.catalog import catalog
85
+ from nomogram.comparison import compare
86
+ from nomogram.plot import plot_deviations # extra viz
87
+ from nomogram.units import Q_
88
+
89
+ formulations = catalog().formulations_of("SaturationVapourPressureOverWater")
90
+ reference = catalog().formulations["iapws_sr1_86"]
91
+ temperatures = Q_(np.linspace(-60, 110, 341), "degC")
92
+
93
+ table = compare(formulations, reference, {"ThermodynamicTemperature": temperatures})
94
+ plot_deviations(table)
95
+ ```
96
+
97
+ ![Deviation of saturation vapour pressure formulations from IAPWS](https://raw.githubusercontent.com/miki4iaml/nomogram/v0.1.0/docs/images/saturation-vapour-pressure.png)
98
+
99
+ ## Usage
100
+
101
+ The table holds the values and the relative deviations, by formulation;
102
+ values outside a formulation's validity domain are NaN unless asked
103
+ otherwise (`outside="ignore"`). Formulations also chain, for instance
104
+ the absolute humidity from any saturation vapour pressure formulation:
105
+
106
+ ```python
107
+ from nomogram.comparison import compose
108
+
109
+ ha = compose(catalog().formulations["mass_concentration_ideal_gas"], {"e_s": reference})
110
+ ha.evaluate(RH=Q_(100, "percent"), T=Q_(20, "degC")).to("g/m^3") # 17.29
111
+ ```
112
+
113
+ Each formulation keeps its units, validity domain, temperature scale and
114
+ references. The vocabulary is mapped in [docs/rosetta.md](docs/rosetta.md).
115
+
116
+ ## Contributing
117
+
118
+ References to integrate, information or corrections about catalog
119
+ entries, new formulas and code are all welcome: see the
120
+ [ways to contribute](.github/CONTRIBUTING.md#ways-to-contribute) and
121
+ the [catalog guide](docs/catalog.md).
122
+
123
+ ## License
124
+
125
+ [BSD-3-Clause](LICENSE).
@@ -0,0 +1,17 @@
1
+ nomogram/__init__.py,sha256=dnh9kxpKjQp6Ud49RnzmRmG9Y3jd_gOEeTzvqEJtArI,531
2
+ nomogram/catalog.py,sha256=qKUZVlMy5gY6AUL8r0zMlkw3QSR7vc0pcuQYsiOlV6o,20070
3
+ nomogram/comparison.py,sha256=51H-l-ZeXLEFhrHef9taIoUO1s4xcyPEKjH_OkhJ8Y4,11093
4
+ nomogram/data/NOTICE.md,sha256=p_gPui-v_TZ8qizfx4K3eCTtUwb9Alj9YH14hrolf9I,1060
5
+ nomogram/data/catalog/humidity.toml,sha256=bDtaIWLXXeBEc80PgWx9g0T8Nn3E0Ej_-g9tcpdYmTw,23802
6
+ nomogram/data/semantics.json,sha256=2mnt9urXADhzmflW8bqQ9Pi0IQ3yNLVpFdA1fXl2W3w,12341
7
+ nomogram/expression.py,sha256=I8uY4xbuNQLaB7vidLTusXlemQwFF0t9cnTG6E1uqos,8481
8
+ nomogram/model.py,sha256=oYzJ9bPIKkh2OJWcFZi7qpdc_V9FOnXFFA8FqbA_XuM,19222
9
+ nomogram/plot.py,sha256=SNtlxzfoJ7Ao9jS5U2TeLgNjmkreYiUclodoTraJw04,5857
10
+ nomogram/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ nomogram/semantics.py,sha256=KFj9tNc70OxGeHwgehSrB1-1QTtF9u7pOVN1VGQe6Do,9919
12
+ nomogram/units.py,sha256=68KC9j_V4sLqGdOmBDWRszrrJr-0I3bzHjtDgFSybE0,4299
13
+ nomogram-0.1.0.dist-info/licenses/LICENSE,sha256=uYLcXa0PWs629lm_YY8FRHf-N1TJenb4k1JSq5kvjEk,1491
14
+ nomogram-0.1.0.dist-info/licenses/src/nomogram/data/NOTICE.md,sha256=p_gPui-v_TZ8qizfx4K3eCTtUwb9Alj9YH14hrolf9I,1060
15
+ nomogram-0.1.0.dist-info/WHEEL,sha256=7hzKWg-J8I3Buqyw5tBii5z_MmAVsDYXXijd_QAtNZ8,81
16
+ nomogram-0.1.0.dist-info/METADATA,sha256=cBrlcYMILMfUopymI6t83qR6gaucqvKnagwDyaYqB3w,5379
17
+ nomogram-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.12.18
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Miki
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,25 @@
1
+ # Third-party data bundled with nomogram
2
+
3
+ `semantics.json` is generated by `scripts/extract_semantics.py` from the
4
+ sources below. Never edit it by hand.
5
+
6
+ ## QUDT
7
+
8
+ Quantity kinds and unit definitions are extracted from
9
+ [QUDT](https://qudt.org/) release 3.5.2, © QUDT.org, licensed under the
10
+ [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/)
11
+ (CC BY 4.0).
12
+
13
+ Changes: a subset of quantity kinds and units was selected and
14
+ restructured as JSON; nomogram adds the scale type and point/difference
15
+ typing of each kind, the units QUDT does not declare for some kinds
16
+ (`added_units`), the pint expression of each unit, and the link from
17
+ each kind to CF standard names. Links from QUDT's `wikidataMatch` are
18
+ recorded as SKOS close matches, with the extraction date as their
19
+ verification date.
20
+
21
+ ## CF standard names
22
+
23
+ Standard names and canonical units are extracted from the
24
+ [CF standard name table](https://cfconventions.org/) version 95,
25
+ published under [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/).