axsdb 0.0.2__tar.gz → 0.0.3__tar.gz
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.
- {axsdb-0.0.2 → axsdb-0.0.3}/.github/workflows/ci.yml +7 -7
- {axsdb-0.0.2 → axsdb-0.0.3}/.github/workflows/release.yml +5 -5
- {axsdb-0.0.2 → axsdb-0.0.3}/.gitignore +3 -0
- axsdb-0.0.3/.python-version +1 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/PKG-INFO +7 -5
- {axsdb-0.0.2 → axsdb-0.0.3}/README.md +3 -3
- axsdb-0.0.3/TODO.md +7 -0
- axsdb-0.0.3/benchmarks/benchmark_interp_dataarray.py +118 -0
- axsdb-0.0.3/benchmarks/benchmark_query.py +86 -0
- axsdb-0.0.3/benchmarks/pytest.ini +7 -0
- axsdb-0.0.3/docs/_static/logo_axsdb.svg +312 -0
- axsdb-0.0.3/docs/api/axsdb.interpolation.rst +8 -0
- axsdb-0.0.2/docs/api.rst → axsdb-0.0.3/docs/api/axsdb.math.rst +3 -5
- axsdb-0.0.3/docs/api/axsdb.rst +24 -0
- axsdb-0.0.3/docs/api/axsdb.units.rst +8 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/docs/conf.py +3 -1
- axsdb-0.0.3/docs/dev/benchmarking.rst +19 -0
- axsdb-0.0.3/docs/dev/interpolation.rst +262 -0
- axsdb-0.0.3/docs/dev/typing.rst +54 -0
- axsdb-0.0.3/docs/formats.rst +180 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/docs/index.rst +20 -3
- {axsdb-0.0.2 → axsdb-0.0.3}/docs/requirements.txt +19 -11
- {axsdb-0.0.2 → axsdb-0.0.3}/pyproject.toml +20 -3
- {axsdb-0.0.2 → axsdb-0.0.3}/src/axsdb/core.py +40 -31
- {axsdb-0.0.2 → axsdb-0.0.3}/src/axsdb/factory.py +3 -2
- axsdb-0.0.3/src/axsdb/interpolation.py +803 -0
- axsdb-0.0.3/src/axsdb/math.py +503 -0
- axsdb-0.0.3/src/axsdb/testing/fixtures.py +77 -0
- axsdb-0.0.3/tests/pytest.ini +2 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/tests/test_core.py +1 -76
- axsdb-0.0.3/tests/test_error.py +0 -0
- axsdb-0.0.3/tests/test_interpolation.py +875 -0
- axsdb-0.0.3/tests/test_math.py +714 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/uv.lock +306 -138
- axsdb-0.0.2/.python-version +0 -1
- {axsdb-0.0.2 → axsdb-0.0.3}/.github/dependabot.yml +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/.pre-commit-config.yaml +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/.readthedocs.yml +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/.taplo.toml +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/afgl_1986-us_standard.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/index.csv +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/metadata.json +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/nanockd_v1-295_305.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/nanockd_v1-305_315.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/nanockd_v1-315_325.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/nanockd_v1-325_335.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/nanockd_v1-335_345.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/nanockd_v1-345_355.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/nanockd_v1-355_365.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/nanockd_v1-365_375.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/nanockd_v1-375_385.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/nanockd_v1-385_395.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/nanockd_v1-395_405.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanockd_v1/spectral.csv +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanomono_v1/index.csv +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanomono_v1/metadata.json +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanomono_v1/nanomono_v1.nc +0 -0
- {axsdb-0.0.2/tests → axsdb-0.0.3/benchmarks}/data/nanomono_v1/spectral.csv +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/docs/Makefile +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/docs/getting_started.rst +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/docs/make.bat +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/src/axsdb/__init__.py +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/src/axsdb/_version.py +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/src/axsdb/cli.py +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/src/axsdb/error.py +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/src/axsdb/py.typed +0 -0
- /axsdb-0.0.2/tests/test_error.py → /axsdb-0.0.3/src/axsdb/testing/__init__.py +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/src/axsdb/typing.py +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/src/axsdb/units.py +0 -0
- {axsdb-0.0.2 → axsdb-0.0.3}/tests/test_factory.py +0 -0
|
@@ -34,10 +34,10 @@ jobs:
|
|
|
34
34
|
|
|
35
35
|
steps:
|
|
36
36
|
- name: Checkout
|
|
37
|
-
uses: actions/checkout@
|
|
37
|
+
uses: actions/checkout@v6
|
|
38
38
|
|
|
39
39
|
- name: Setup uv
|
|
40
|
-
uses: astral-sh/setup-uv@
|
|
40
|
+
uses: astral-sh/setup-uv@v7
|
|
41
41
|
|
|
42
42
|
- name: Pin active Python
|
|
43
43
|
run: uv python pin ${{ matrix.python-version }}
|
|
@@ -49,7 +49,7 @@ jobs:
|
|
|
49
49
|
run: uv run coverage run -m pytest
|
|
50
50
|
|
|
51
51
|
- name: Upload coverage data
|
|
52
|
-
uses: actions/upload-artifact@
|
|
52
|
+
uses: actions/upload-artifact@v6
|
|
53
53
|
with:
|
|
54
54
|
name: coverage-data-${{ matrix.python-version }}
|
|
55
55
|
path: .coverage.*
|
|
@@ -62,8 +62,8 @@ jobs:
|
|
|
62
62
|
runs-on: ubuntu-latest
|
|
63
63
|
needs: tests
|
|
64
64
|
steps:
|
|
65
|
-
- uses: actions/checkout@
|
|
66
|
-
- uses: actions/setup-python@
|
|
65
|
+
- uses: actions/checkout@v6
|
|
66
|
+
- uses: actions/setup-python@v6
|
|
67
67
|
with:
|
|
68
68
|
# Use latest, so it understands all syntax.
|
|
69
69
|
python-version: "3.13"
|
|
@@ -71,7 +71,7 @@ jobs:
|
|
|
71
71
|
- run: python -m pip install --upgrade coverage[toml]
|
|
72
72
|
|
|
73
73
|
- name: Download coverage data
|
|
74
|
-
uses: actions/download-artifact@
|
|
74
|
+
uses: actions/download-artifact@v7
|
|
75
75
|
with:
|
|
76
76
|
pattern: coverage-data-*
|
|
77
77
|
merge-multiple: true
|
|
@@ -92,7 +92,7 @@ jobs:
|
|
|
92
92
|
echo '```' >> $GITHUB_STEP_SUMMARY
|
|
93
93
|
|
|
94
94
|
- name: Upload HTML report
|
|
95
|
-
uses: actions/upload-artifact@
|
|
95
|
+
uses: actions/upload-artifact@v6
|
|
96
96
|
with:
|
|
97
97
|
name: html-report
|
|
98
98
|
path: reports/coverage/html
|
|
@@ -11,7 +11,7 @@ jobs:
|
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
|
|
13
13
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
14
|
+
- uses: actions/checkout@v6
|
|
15
15
|
|
|
16
16
|
- name: Get current git tag
|
|
17
17
|
id: tag
|
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
fi
|
|
36
36
|
|
|
37
37
|
- name: Setup uv
|
|
38
|
-
uses: astral-sh/setup-uv@
|
|
38
|
+
uses: astral-sh/setup-uv@v7
|
|
39
39
|
|
|
40
40
|
- name: Build wheels
|
|
41
41
|
run: |
|
|
@@ -49,7 +49,7 @@ jobs:
|
|
|
49
49
|
fresh_env/bin/python -c "import axsdb; print(axsdb.__version__)"
|
|
50
50
|
|
|
51
51
|
- name: Store distribution packages
|
|
52
|
-
uses: actions/upload-artifact@
|
|
52
|
+
uses: actions/upload-artifact@v6
|
|
53
53
|
with:
|
|
54
54
|
name: python-package-distributions
|
|
55
55
|
path: dist/
|
|
@@ -69,7 +69,7 @@ jobs:
|
|
|
69
69
|
#
|
|
70
70
|
# steps:
|
|
71
71
|
# - name: Download all the dists
|
|
72
|
-
# uses: actions/download-artifact@
|
|
72
|
+
# uses: actions/download-artifact@v7
|
|
73
73
|
# with:
|
|
74
74
|
# name: python-package-distributions
|
|
75
75
|
# path: dist/
|
|
@@ -94,7 +94,7 @@ jobs:
|
|
|
94
94
|
|
|
95
95
|
steps:
|
|
96
96
|
- name: Download all the dists
|
|
97
|
-
uses: actions/download-artifact@
|
|
97
|
+
uses: actions/download-artifact@v7
|
|
98
98
|
with:
|
|
99
99
|
name: python-package-distributions
|
|
100
100
|
path: dist/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: axsdb
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: An absorption database reader for the Eradiate radiative transfer model.
|
|
5
5
|
Author-email: Vincent Leroy <vincent.leroy@rayference.eu>
|
|
6
6
|
Requires-Python: >=3.9
|
|
7
7
|
Requires-Dist: attrs
|
|
8
8
|
Requires-Dist: cachetools
|
|
9
9
|
Requires-Dist: netcdf4
|
|
10
|
+
Requires-Dist: numba<0.63,>=0.58; sys_platform == 'darwin' and platform_machine == 'x86_64'
|
|
11
|
+
Requires-Dist: numba>=0.58; sys_platform != 'darwin' or platform_machine != 'x86_64'
|
|
10
12
|
Requires-Dist: pint
|
|
11
13
|
Requires-Dist: scipy
|
|
12
14
|
Requires-Dist: typer
|
|
13
|
-
Requires-Dist: xarray
|
|
15
|
+
Requires-Dist: xarray>=2024.7.0
|
|
14
16
|
Description-Content-Type: text/markdown
|
|
15
17
|
|
|
16
18
|
# AxsDB — The Eradiate Absorption Cross-section Database Interface
|
|
@@ -21,10 +23,10 @@ Description-Content-Type: text/markdown
|
|
|
21
23
|
[](https://github.com/astral-sh/uv)
|
|
22
24
|
[](https://github.com/astral-sh/ruff)
|
|
23
25
|
|
|
24
|
-
This library provides an interface to read and
|
|
25
|
-
|
|
26
|
+
This library provides an interface to read and query the absorption databases
|
|
27
|
+
of the [Eradiate radiative transfer model](https://eradiate.eu).
|
|
26
28
|
|
|
27
29
|
## License
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
AxsDB is distributed under the terms of the
|
|
30
32
|
[GNU Lesser General Public License v3.0](https://choosealicense.com/licenses/lgpl-3.0/).
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
[](https://github.com/astral-sh/uv)
|
|
7
7
|
[](https://github.com/astral-sh/ruff)
|
|
8
8
|
|
|
9
|
-
This library provides an interface to read and
|
|
10
|
-
|
|
9
|
+
This library provides an interface to read and query the absorption databases
|
|
10
|
+
of the [Eradiate radiative transfer model](https://eradiate.eu).
|
|
11
11
|
|
|
12
12
|
## License
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
AxsDB is distributed under the terms of the
|
|
15
15
|
[GNU Lesser General Public License v3.0](https://choosealicense.com/licenses/lgpl-3.0/).
|
axsdb-0.0.3/TODO.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# AxsDB TODO list
|
|
2
|
+
|
|
3
|
+
- Interpolation
|
|
4
|
+
- [ ] Consider parallel execution for independent dimension groups
|
|
5
|
+
- [ ] Investigate numba parallel option for gufuncs
|
|
6
|
+
- [ ] Cache compiled numba functions more aggressively
|
|
7
|
+
- [ ] Consider supporting additional interpolation methods (nearest, cubic)
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Realistic thermophysical profile interpolation.
|
|
3
|
+
|
|
4
|
+
This benchmark mimics the actual AxsDB use case: interpolating absorption
|
|
5
|
+
coefficients from a (x_CO2, x_H2O, x_O3, p, t, g) grid to a vertical profile of
|
|
6
|
+
z altitude levels.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import numpy as np
|
|
10
|
+
import xarray as xr
|
|
11
|
+
import pytest
|
|
12
|
+
from axsdb.interpolation import interp_dataarray
|
|
13
|
+
from scipy.special import roots_sh_legendre
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
Z_LEVELS = [121, 1201, 12001]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@pytest.fixture(scope="module", params=Z_LEVELS)
|
|
20
|
+
def setup(request):
|
|
21
|
+
rng = np.random.default_rng(seed=42)
|
|
22
|
+
z_levels = request.param
|
|
23
|
+
|
|
24
|
+
# Create synthetic thermoprops dataset
|
|
25
|
+
thermoprops = xr.Dataset(
|
|
26
|
+
{
|
|
27
|
+
"t": ("z", np.linspace(210, 330, z_levels)),
|
|
28
|
+
"p": ("z", np.logspace(np.log10(200), np.log10(50000), z_levels)),
|
|
29
|
+
"x_H2O": (
|
|
30
|
+
"z",
|
|
31
|
+
np.logspace(np.log10(1.0e-6), np.log10(9.0e-5), z_levels),
|
|
32
|
+
),
|
|
33
|
+
"x_O3": (
|
|
34
|
+
"z",
|
|
35
|
+
np.logspace(np.log10(5.0e-10), np.log10(7.84e-6), z_levels),
|
|
36
|
+
),
|
|
37
|
+
"x_CO2": ("z", np.linspace(3.5e-5, 3.3e-4, z_levels)),
|
|
38
|
+
},
|
|
39
|
+
coords={"z": np.linspace(0, 120, z_levels)},
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
# Create synthetic sigma_a DataArray
|
|
43
|
+
da = xr.DataArray(
|
|
44
|
+
rng.uniform(0, 1, (2, 4, 2, 16, 8, 32)),
|
|
45
|
+
dims=["x_CO2", "x_H2O", "x_O3", "p", "t", "g"],
|
|
46
|
+
coords={
|
|
47
|
+
"x_CO2": [0.0, 5.0e-4],
|
|
48
|
+
"x_H2O": [0.0, 1.0e-6, 1.0e-5, 1.0e-4],
|
|
49
|
+
"x_O3": [0.0, 1.0e-5],
|
|
50
|
+
"p": np.logspace(2, 5, 16),
|
|
51
|
+
"t": np.linspace(200, 340, 8),
|
|
52
|
+
"g": np.linspace(0, 1, 32),
|
|
53
|
+
},
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
# Build interpolation coordinate list
|
|
57
|
+
dims_coords = [
|
|
58
|
+
("g", roots_sh_legendre(16)[0]),
|
|
59
|
+
("t", thermoprops["t"]),
|
|
60
|
+
("p", thermoprops["p"]),
|
|
61
|
+
("x_H2O", thermoprops["x_H2O"]),
|
|
62
|
+
("x_O3", thermoprops["x_O3"]),
|
|
63
|
+
("x_CO2", thermoprops["x_CO2"]),
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
interp_kwargs = {
|
|
67
|
+
"method": "linear",
|
|
68
|
+
"assume_sorted": True,
|
|
69
|
+
"kwargs": {"bounds_error": False, "fill_value": None},
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
yield {
|
|
73
|
+
"thermoprops": thermoprops,
|
|
74
|
+
"da": da,
|
|
75
|
+
"dims_coords": dims_coords,
|
|
76
|
+
"interp_kwargs": interp_kwargs,
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class BenchmarkInterpDataArrayThermophysical:
|
|
81
|
+
def time_custom(self, da, dims_coords):
|
|
82
|
+
coords_dict = {}
|
|
83
|
+
for dim, coords in dims_coords:
|
|
84
|
+
if dim in da.dims:
|
|
85
|
+
if isinstance(coords, xr.DataArray):
|
|
86
|
+
coords_dict[dim] = coords
|
|
87
|
+
else:
|
|
88
|
+
coords_dict[dim] = np.asarray(coords)
|
|
89
|
+
|
|
90
|
+
interp_dataarray(da, coords_dict, bounds="clamp")
|
|
91
|
+
|
|
92
|
+
def benchmark_time_custom(self, setup, benchmark):
|
|
93
|
+
benchmark(self.time_custom, setup["da"], setup["dims_coords"])
|
|
94
|
+
|
|
95
|
+
def time_xarray_sequential(self, da, dims_coords, interp_kwargs):
|
|
96
|
+
result = da
|
|
97
|
+
for dim, coords in dims_coords:
|
|
98
|
+
if dim in result.dims:
|
|
99
|
+
result = result.interp({dim: coords}, **interp_kwargs)
|
|
100
|
+
|
|
101
|
+
def benchmark_time_xarray_sequential(self, setup, benchmark):
|
|
102
|
+
benchmark(
|
|
103
|
+
self.time_xarray_sequential,
|
|
104
|
+
setup["da"],
|
|
105
|
+
setup["dims_coords"],
|
|
106
|
+
setup["interp_kwargs"],
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
def time_xarray_multi(self, da, dims_coords, interp_kwargs):
|
|
110
|
+
da.interp(dict(dims_coords), **interp_kwargs)
|
|
111
|
+
|
|
112
|
+
def benchmark_time_xarray_multi(self, setup, benchmark):
|
|
113
|
+
benchmark(
|
|
114
|
+
self.time_xarray_multi,
|
|
115
|
+
setup["da"],
|
|
116
|
+
setup["dims_coords"],
|
|
117
|
+
setup["interp_kwargs"],
|
|
118
|
+
)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Practical usage benchmark.
|
|
3
|
+
|
|
4
|
+
This benchmark simulates usage of AxsDB in actual conditions and performs
|
|
5
|
+
evaluations for an atmospheric profile with various resolutions.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from itertools import product
|
|
9
|
+
|
|
10
|
+
import numpy as np
|
|
11
|
+
import pytest
|
|
12
|
+
|
|
13
|
+
from axsdb import ErrorHandlingConfiguration
|
|
14
|
+
from axsdb.testing.fixtures import * # noqa: F403
|
|
15
|
+
from axsdb.units import ureg
|
|
16
|
+
|
|
17
|
+
WGS = {
|
|
18
|
+
"scalar_g": ([350.0] * ureg.nm, 0.5),
|
|
19
|
+
# "vector_g": (
|
|
20
|
+
# [350.0] * ureg.nm,
|
|
21
|
+
# [
|
|
22
|
+
# 0.00529953,
|
|
23
|
+
# 0.02771249,
|
|
24
|
+
# 0.0671844,
|
|
25
|
+
# 0.1222978,
|
|
26
|
+
# 0.19106188,
|
|
27
|
+
# 0.27099161,
|
|
28
|
+
# 0.35919822,
|
|
29
|
+
# 0.45249375,
|
|
30
|
+
# 0.54750625,
|
|
31
|
+
# 0.64080178,
|
|
32
|
+
# 0.72900839,
|
|
33
|
+
# 0.80893812,
|
|
34
|
+
# 0.8777022,
|
|
35
|
+
# 0.9328156,
|
|
36
|
+
# 0.97228751,
|
|
37
|
+
# 0.99470047,
|
|
38
|
+
# ],
|
|
39
|
+
# ),
|
|
40
|
+
}
|
|
41
|
+
Z_LEVELS = [121, 1201, 12001]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@pytest.fixture(
|
|
45
|
+
params=list(product(WGS.values(), Z_LEVELS)),
|
|
46
|
+
ids=[f"{wg}-{z_levels}" for wg, z_levels in product(WGS.keys(), Z_LEVELS)],
|
|
47
|
+
)
|
|
48
|
+
def setup_ckd(
|
|
49
|
+
request,
|
|
50
|
+
thermoprops_us_standard,
|
|
51
|
+
absdb_ckd,
|
|
52
|
+
absorption_database_error_handler_config,
|
|
53
|
+
):
|
|
54
|
+
wg, z_levels = request.param
|
|
55
|
+
|
|
56
|
+
# Resample thermoprops to requested number of z-levels
|
|
57
|
+
z_new = np.linspace(
|
|
58
|
+
thermoprops_us_standard["z"].values.min(),
|
|
59
|
+
thermoprops_us_standard["z"].values.max(),
|
|
60
|
+
z_levels,
|
|
61
|
+
)
|
|
62
|
+
thermoprops = thermoprops_us_standard.interp(z=z_new)
|
|
63
|
+
|
|
64
|
+
yield {
|
|
65
|
+
"wg": wg,
|
|
66
|
+
"thermoprops": thermoprops,
|
|
67
|
+
"absdb": absdb_ckd,
|
|
68
|
+
"error_handler_config": ErrorHandlingConfiguration.convert(
|
|
69
|
+
absorption_database_error_handler_config
|
|
70
|
+
),
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class BenchmarkEval:
|
|
75
|
+
def eval_ckd(self, wg, absdb, thermoprops, error_handler_config):
|
|
76
|
+
return absdb.eval_sigma_a_ckd(
|
|
77
|
+
*wg, thermoprops=thermoprops, error_handling_config=error_handler_config
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
def benchmark_eval(self, setup_ckd, benchmark):
|
|
81
|
+
wg = setup_ckd["wg"]
|
|
82
|
+
absdb = setup_ckd["absdb"]
|
|
83
|
+
thermoprops = setup_ckd["thermoprops"]
|
|
84
|
+
error_handler_config = setup_ckd["error_handler_config"]
|
|
85
|
+
|
|
86
|
+
benchmark(self.eval_ckd, wg, absdb, thermoprops, error_handler_config)
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
viewBox="0 0 355.0646 80"
|
|
4
|
+
version="1.1"
|
|
5
|
+
id="svg28"
|
|
6
|
+
width="355.06461"
|
|
7
|
+
height="80"
|
|
8
|
+
sodipodi:docname="logo_axsdb.svg"
|
|
9
|
+
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
|
|
10
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
11
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
12
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
15
|
+
<sodipodi:namedview
|
|
16
|
+
id="namedview1"
|
|
17
|
+
pagecolor="#ffffff"
|
|
18
|
+
bordercolor="#666666"
|
|
19
|
+
borderopacity="1.0"
|
|
20
|
+
inkscape:showpageshadow="2"
|
|
21
|
+
inkscape:pageopacity="0.0"
|
|
22
|
+
inkscape:pagecheckerboard="0"
|
|
23
|
+
inkscape:deskcolor="#d1d1d1"
|
|
24
|
+
inkscape:zoom="3.3750265"
|
|
25
|
+
inkscape:cx="176.29491"
|
|
26
|
+
inkscape:cy="58.9625"
|
|
27
|
+
inkscape:window-width="2560"
|
|
28
|
+
inkscape:window-height="1376"
|
|
29
|
+
inkscape:window-x="0"
|
|
30
|
+
inkscape:window-y="27"
|
|
31
|
+
inkscape:window-maximized="1"
|
|
32
|
+
inkscape:current-layer="svg28" />
|
|
33
|
+
<defs
|
|
34
|
+
id="defs11">
|
|
35
|
+
<linearGradient
|
|
36
|
+
id="iconGradient"
|
|
37
|
+
x1="-7.2000003"
|
|
38
|
+
y1="-7.2000003"
|
|
39
|
+
x2="87.199997"
|
|
40
|
+
y2="87.199997"
|
|
41
|
+
gradientUnits="userSpaceOnUse">
|
|
42
|
+
<stop
|
|
43
|
+
offset="0%"
|
|
44
|
+
style="stop-color:#ff6b35;stop-opacity:1"
|
|
45
|
+
id="stop1" />
|
|
46
|
+
<stop
|
|
47
|
+
offset="50%"
|
|
48
|
+
style="stop-color:#f7931e;stop-opacity:1"
|
|
49
|
+
id="stop2" />
|
|
50
|
+
<stop
|
|
51
|
+
offset="100%"
|
|
52
|
+
style="stop-color:#00d2ff;stop-opacity:1"
|
|
53
|
+
id="stop3" />
|
|
54
|
+
</linearGradient>
|
|
55
|
+
<linearGradient
|
|
56
|
+
id="textGradient"
|
|
57
|
+
x1="53.611717"
|
|
58
|
+
y1="73.12709"
|
|
59
|
+
x2="125.26408"
|
|
60
|
+
y2="73.12709"
|
|
61
|
+
gradientTransform="matrix(3.5409401,0,0,0.84110969,-94.294313,-51.641638)"
|
|
62
|
+
gradientUnits="userSpaceOnUse">
|
|
63
|
+
<stop
|
|
64
|
+
offset="0%"
|
|
65
|
+
style="stop-color:#ff6b35;stop-opacity:1"
|
|
66
|
+
id="stop4" />
|
|
67
|
+
<stop
|
|
68
|
+
offset="25%"
|
|
69
|
+
style="stop-color:#f7931e;stop-opacity:1"
|
|
70
|
+
id="stop5" />
|
|
71
|
+
<stop
|
|
72
|
+
offset="75%"
|
|
73
|
+
style="stop-color:#00d2ff;stop-opacity:1"
|
|
74
|
+
id="stop6" />
|
|
75
|
+
<stop
|
|
76
|
+
offset="100%"
|
|
77
|
+
style="stop-color:#00d2ff;stop-opacity:1"
|
|
78
|
+
id="stop7" />
|
|
79
|
+
</linearGradient>
|
|
80
|
+
<linearGradient
|
|
81
|
+
id="rayGradient"
|
|
82
|
+
x1="0"
|
|
83
|
+
y1="0"
|
|
84
|
+
x2="0"
|
|
85
|
+
y2="1">
|
|
86
|
+
<stop
|
|
87
|
+
offset="0%"
|
|
88
|
+
style="stop-color:#ffff64;stop-opacity:0"
|
|
89
|
+
id="stop8" />
|
|
90
|
+
<stop
|
|
91
|
+
offset="50%"
|
|
92
|
+
style="stop-color:#ffff64;stop-opacity:0.8"
|
|
93
|
+
id="stop9" />
|
|
94
|
+
<stop
|
|
95
|
+
offset="100%"
|
|
96
|
+
style="stop-color:#ffff64;stop-opacity:0"
|
|
97
|
+
id="stop10" />
|
|
98
|
+
</linearGradient>
|
|
99
|
+
<linearGradient
|
|
100
|
+
xlink:href="#rayGradient"
|
|
101
|
+
id="linearGradient28"
|
|
102
|
+
x1="90.509666"
|
|
103
|
+
y1="0"
|
|
104
|
+
x2="90.509666"
|
|
105
|
+
y2="11.313708"
|
|
106
|
+
gradientTransform="scale(0.1767767,5.6568542)"
|
|
107
|
+
gradientUnits="userSpaceOnUse" />
|
|
108
|
+
<linearGradient
|
|
109
|
+
xlink:href="#rayGradient"
|
|
110
|
+
id="linearGradient29"
|
|
111
|
+
x1="181.01933"
|
|
112
|
+
y1="0"
|
|
113
|
+
x2="181.01933"
|
|
114
|
+
y2="11.313708"
|
|
115
|
+
gradientTransform="scale(0.1767767,5.6568542)"
|
|
116
|
+
gradientUnits="userSpaceOnUse" />
|
|
117
|
+
<linearGradient
|
|
118
|
+
xlink:href="#rayGradient"
|
|
119
|
+
id="linearGradient30"
|
|
120
|
+
x1="271.52899"
|
|
121
|
+
y1="0"
|
|
122
|
+
x2="271.52899"
|
|
123
|
+
y2="11.313708"
|
|
124
|
+
gradientTransform="scale(0.1767767,5.6568542)"
|
|
125
|
+
gradientUnits="userSpaceOnUse" />
|
|
126
|
+
<linearGradient
|
|
127
|
+
xlink:href="#rayGradient"
|
|
128
|
+
id="linearGradient31"
|
|
129
|
+
x1="362.03867"
|
|
130
|
+
y1="0"
|
|
131
|
+
x2="362.03867"
|
|
132
|
+
y2="11.313708"
|
|
133
|
+
gradientTransform="scale(0.1767767,5.6568542)"
|
|
134
|
+
gradientUnits="userSpaceOnUse" />
|
|
135
|
+
</defs>
|
|
136
|
+
<g
|
|
137
|
+
id="g28">
|
|
138
|
+
<rect
|
|
139
|
+
x="0"
|
|
140
|
+
y="0"
|
|
141
|
+
width="80"
|
|
142
|
+
height="80"
|
|
143
|
+
rx="12"
|
|
144
|
+
ry="12"
|
|
145
|
+
fill="url(#iconGradient)"
|
|
146
|
+
id="rect11"
|
|
147
|
+
style="fill:url(#iconGradient)" />
|
|
148
|
+
<g
|
|
149
|
+
transform="translate(12,12.935672)"
|
|
150
|
+
id="g21">
|
|
151
|
+
<rect
|
|
152
|
+
x="0"
|
|
153
|
+
y="0"
|
|
154
|
+
width="56"
|
|
155
|
+
height="8"
|
|
156
|
+
rx="4"
|
|
157
|
+
ry="4"
|
|
158
|
+
fill="rgba(255,255,255,0.9)"
|
|
159
|
+
id="rect12" />
|
|
160
|
+
<rect
|
|
161
|
+
x="42"
|
|
162
|
+
y="0"
|
|
163
|
+
width="14"
|
|
164
|
+
height="8"
|
|
165
|
+
rx="4"
|
|
166
|
+
ry="4"
|
|
167
|
+
fill="rgba(255,255,255,0.6)"
|
|
168
|
+
id="rect13" />
|
|
169
|
+
<rect
|
|
170
|
+
x="0"
|
|
171
|
+
y="12"
|
|
172
|
+
width="56"
|
|
173
|
+
height="8"
|
|
174
|
+
rx="4"
|
|
175
|
+
ry="4"
|
|
176
|
+
fill="rgba(255,255,255,0.9)"
|
|
177
|
+
id="rect14" />
|
|
178
|
+
<rect
|
|
179
|
+
x="42"
|
|
180
|
+
y="12"
|
|
181
|
+
width="14"
|
|
182
|
+
height="8"
|
|
183
|
+
rx="4"
|
|
184
|
+
ry="4"
|
|
185
|
+
fill="rgba(255,255,255,0.6)"
|
|
186
|
+
id="rect15" />
|
|
187
|
+
<rect
|
|
188
|
+
x="0"
|
|
189
|
+
y="24"
|
|
190
|
+
width="56"
|
|
191
|
+
height="8"
|
|
192
|
+
rx="4"
|
|
193
|
+
ry="4"
|
|
194
|
+
fill="rgba(255,255,255,0.9)"
|
|
195
|
+
id="rect16" />
|
|
196
|
+
<rect
|
|
197
|
+
x="42"
|
|
198
|
+
y="24"
|
|
199
|
+
width="14"
|
|
200
|
+
height="8"
|
|
201
|
+
rx="4"
|
|
202
|
+
ry="4"
|
|
203
|
+
fill="rgba(255,255,255,0.6)"
|
|
204
|
+
id="rect17" />
|
|
205
|
+
<rect
|
|
206
|
+
x="0"
|
|
207
|
+
y="36"
|
|
208
|
+
width="56"
|
|
209
|
+
height="8"
|
|
210
|
+
rx="4"
|
|
211
|
+
ry="4"
|
|
212
|
+
fill="rgba(255,255,255,0.9)"
|
|
213
|
+
id="rect18" />
|
|
214
|
+
<rect
|
|
215
|
+
x="42"
|
|
216
|
+
y="36"
|
|
217
|
+
width="14"
|
|
218
|
+
height="8"
|
|
219
|
+
rx="4"
|
|
220
|
+
ry="4"
|
|
221
|
+
fill="rgba(255,255,255,0.6)"
|
|
222
|
+
id="rect19" />
|
|
223
|
+
<rect
|
|
224
|
+
x="0"
|
|
225
|
+
y="48"
|
|
226
|
+
width="56"
|
|
227
|
+
height="8"
|
|
228
|
+
rx="4"
|
|
229
|
+
ry="4"
|
|
230
|
+
fill="rgba(255,255,255,0.9)"
|
|
231
|
+
id="rect20" />
|
|
232
|
+
<rect
|
|
233
|
+
x="42"
|
|
234
|
+
y="48"
|
|
235
|
+
width="14"
|
|
236
|
+
height="8"
|
|
237
|
+
rx="4"
|
|
238
|
+
ry="4"
|
|
239
|
+
fill="rgba(255,255,255,0.6)"
|
|
240
|
+
id="rect21" />
|
|
241
|
+
</g>
|
|
242
|
+
<g
|
|
243
|
+
opacity="0.4"
|
|
244
|
+
id="g25">
|
|
245
|
+
<rect
|
|
246
|
+
x="16"
|
|
247
|
+
y="0"
|
|
248
|
+
width="2"
|
|
249
|
+
height="64"
|
|
250
|
+
fill="url(#linearGradient28)"
|
|
251
|
+
transform="rotate(-15,17,32)"
|
|
252
|
+
id="rect22"
|
|
253
|
+
style="fill:url(#linearGradient28)" />
|
|
254
|
+
<rect
|
|
255
|
+
x="32"
|
|
256
|
+
y="0"
|
|
257
|
+
width="2"
|
|
258
|
+
height="64"
|
|
259
|
+
fill="url(#linearGradient29)"
|
|
260
|
+
id="rect23"
|
|
261
|
+
style="fill:url(#linearGradient29)" />
|
|
262
|
+
<rect
|
|
263
|
+
x="48"
|
|
264
|
+
y="0"
|
|
265
|
+
width="2"
|
|
266
|
+
height="64"
|
|
267
|
+
fill="url(#linearGradient30)"
|
|
268
|
+
transform="rotate(15,49,32)"
|
|
269
|
+
id="rect24"
|
|
270
|
+
style="fill:url(#linearGradient30)" />
|
|
271
|
+
<rect
|
|
272
|
+
x="64"
|
|
273
|
+
y="0"
|
|
274
|
+
width="2"
|
|
275
|
+
height="64"
|
|
276
|
+
fill="url(#linearGradient31)"
|
|
277
|
+
transform="rotate(-10,65,32)"
|
|
278
|
+
id="rect25"
|
|
279
|
+
style="fill:url(#linearGradient31)" />
|
|
280
|
+
</g>
|
|
281
|
+
<!-- Absorption particles -->
|
|
282
|
+
<circle
|
|
283
|
+
cx="24"
|
|
284
|
+
cy="20"
|
|
285
|
+
r="2"
|
|
286
|
+
fill="rgba(255,100,100,0.6)"
|
|
287
|
+
id="circle25" />
|
|
288
|
+
<circle
|
|
289
|
+
cx="48"
|
|
290
|
+
cy="36"
|
|
291
|
+
r="2"
|
|
292
|
+
fill="rgba(255,100,100,0.6)"
|
|
293
|
+
id="circle26" />
|
|
294
|
+
<circle
|
|
295
|
+
cx="20"
|
|
296
|
+
cy="52"
|
|
297
|
+
r="2"
|
|
298
|
+
fill="rgba(255,100,100,0.6)"
|
|
299
|
+
id="circle27" />
|
|
300
|
+
<circle
|
|
301
|
+
cx="60"
|
|
302
|
+
cy="28"
|
|
303
|
+
r="2"
|
|
304
|
+
fill="rgba(255,100,100,0.6)"
|
|
305
|
+
id="circle28" />
|
|
306
|
+
</g>
|
|
307
|
+
<path
|
|
308
|
+
d="M 155.04055,69.163007 H 142.0163 l -5.17735,-13.469184 h -23.70252 l -4.89421,13.469184 H 95.54155 l 23.0958,-59.2967673 h 12.66023 z m -22.04416,-23.45984 -8.17049,-22.003711 -8.00871,22.003711 z m 20.85312,23.45984 15.49159,-22.125056 -14.84442,-20.830719 h 13.87366 l 7.60423,11.810816 8.0087,-11.810816 h 13.34784 l -14.56128,20.345343 15.89607,22.610432 h -13.95456 l -8.73677,-13.307392 -8.81767,13.307392 z m 45.5264,-12.255744 11.40634,-1.739264 q 0.72806,3.316736 2.9527,5.056 2.22464,1.698816 6.22899,1.698816 4.40883,0 6.63347,-1.61792 1.49658,-1.132544 1.49658,-3.0336 0,-1.294336 -0.80896,-2.143744 -0.84941,-0.80896 -3.80211,-1.496576 -13.75232,-3.0336 -17.43309,-5.541376 -5.09645,-3.478528 -5.09645,-9.667071 0,-5.581824 4.40883,-9.383936 4.40884,-3.802112 13.67143,-3.802112 8.81766,0 13.10515,2.871808 4.28749,2.871808 5.90541,8.49408 l -10.71872,1.981952 q -0.68762,-2.507776 -2.62912,-3.84256 -1.90106,-1.334784 -5.46048,-1.334784 -4.48973,0 -6.43123,1.253888 -1.29434,0.889856 -1.29434,2.305536 0,1.21344 1.13254,2.062847 1.53703,1.132544 10.59738,3.195392 9.1008,2.062848 12.70067,5.056 3.55943,3.0336 3.55943,8.453632 0,5.905408 -4.93466,10.152448 -4.93466,4.24704 -14.60173,4.24704 -8.77721,0 -13.91411,-3.559424 -5.09645,-3.559424 -6.67392,-9.667072 z M 247.49099,9.8662397 h 21.88236 q 7.40199,0 11.28499,1.1325443 5.2178,1.537024 8.93901,5.46048 3.72122,3.923456 5.66272,9.626624 1.94151,5.66272 1.94151,13.995007 0,7.321088 -1.82016,12.619776 -2.22464,6.47168 -6.35034,10.476032 -3.1145,3.0336 -8.41318,4.732416 -3.96391,1.253888 -10.59738,1.253888 h -22.52953 z m 11.9726,10.0311043 v 39.275007 h 8.93901 q 5.01555,0 7.24019,-0.566272 2.91226,-0.728064 4.81331,-2.467328 1.94151,-1.739264 3.15495,-5.703168 1.21344,-4.004352 1.21344,-10.880512 0,-6.876159 -1.21344,-10.556927 -1.21344,-3.680768 -3.39763,-5.743616 -2.1842,-2.062848 -5.54138,-2.790912 -2.50778,-0.566272 -9.82886,-0.566272 z M 305.39447,9.8662397 h 23.70252 q 7.03796,0 10.47604,0.6067203 3.47852,0.566272 6.18854,2.42688 2.75046,1.860608 4.57062,4.975104 1.82016,3.074048 1.82016,6.916608 0,4.166144 -2.26508,7.644672 -2.22464,3.478528 -6.0672,5.217792 5.42003,1.577471 8.33228,5.379583 2.91226,3.802112 2.91226,8.939008 0,4.0448 -1.90106,7.88736 -1.8606,3.802112 -5.13689,6.107648 -3.23584,2.265088 -8.00871,2.790912 -2.99315,0.323584 -14.43993,0.40448 h -20.18355 z m 11.9726,9.8693123 v 13.711872 h 7.84692 q 6.9975,0 8.69632,-0.20224 3.07404,-0.364032 4.81331,-2.103296 1.77971,-1.779712 1.77971,-4.65152 0,-2.750464 -1.53702,-4.44928 -1.49658,-1.739264 -4.48973,-2.103296 -1.77971,-0.20224 -10.23335,-0.20224 z m 0,23.581183 v 15.855616 h 11.08276 q 6.47168,0 8.21094,-0.364032 2.66957,-0.485376 4.32794,-2.345984 1.69881,-1.901056 1.69881,-5.056 0,-2.669568 -1.29433,-4.530176 -1.29434,-1.860608 -3.76167,-2.710016 -2.42688,-0.849408 -10.59737,-0.849408 z"
|
|
309
|
+
id="text28"
|
|
310
|
+
style="font-weight:bold;font-size:82.8375px;font-family:Arial, sans-serif;letter-spacing:-2px;fill:url(#textGradient)"
|
|
311
|
+
aria-label="AxsDB" />
|
|
312
|
+
</svg>
|