obsarray 1.0.1__tar.gz → 1.0.2__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.
- {obsarray-1.0.1/obsarray.egg-info → obsarray-1.0.2}/PKG-INFO +8 -13
- obsarray-1.0.2/docs/conf.py +181 -0
- obsarray-1.0.2/notebook/test_register_err_corr_form.py +45 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/_version.py +4 -4
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/templater/dataset_util.py +3 -3
- {obsarray-1.0.1 → obsarray-1.0.2/obsarray.egg-info}/PKG-INFO +8 -13
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray.egg-info/SOURCES.txt +3 -1
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray.egg-info/requires.txt +1 -1
- obsarray-1.0.2/obsarray.egg-info/top_level.txt +5 -0
- obsarray-1.0.2/pyproject.toml +47 -0
- obsarray-1.0.2/setup.cfg +4 -0
- obsarray-1.0.2/setup.py +7 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/versioneer.py +873 -481
- obsarray-1.0.1/obsarray.egg-info/top_level.txt +0 -1
- obsarray-1.0.1/setup.cfg +0 -30
- obsarray-1.0.1/setup.py +0 -48
- {obsarray-1.0.1 → obsarray-1.0.2}/LICENSE +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/MANIFEST.in +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/README.md +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/__init__.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/err_corr.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/flag_accessor.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/templater/__init__.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/templater/dstemplater.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/templater/dswriter.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/templater/template_util.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/templater/tests/__init__.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/templater/tests/test_dataset_util.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/templater/tests/test_dswriter.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/templater/tests/test_template_util.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/test/__init__.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/test/test_err_corr_forms.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/test/test_flag_accessor.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/test/test_unc_accessor.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/unc_accessor.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray/utils.py +0 -0
- {obsarray-1.0.1 → obsarray-1.0.2}/obsarray.egg-info/dependency_links.txt +0 -0
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: obsarray
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Measurement data handling in Python
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Classifier: Development Status :: 2 - Pre-Alpha
|
|
10
|
-
Classifier: Programming Language :: Python
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
5
|
+
Author-email: CoMet Toolkit Team <team@comet-toolkit.org>
|
|
6
|
+
Project-URL: Homepage, https://github.com/comet-toolkit/obsarray
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
15
9
|
License-File: LICENSE
|
|
16
10
|
Requires-Dist: comet_maths
|
|
17
|
-
Requires-Dist: netcdf4
|
|
11
|
+
Requires-Dist: netcdf4
|
|
18
12
|
Requires-Dist: xarray
|
|
19
13
|
Provides-Extra: dev
|
|
20
14
|
Requires-Dist: pre-commit; extra == "dev"
|
|
@@ -24,6 +18,7 @@ Requires-Dist: sphinx_design; extra == "dev"
|
|
|
24
18
|
Requires-Dist: sphinx_book_theme; extra == "dev"
|
|
25
19
|
Requires-Dist: ipython; extra == "dev"
|
|
26
20
|
Requires-Dist: sphinx_autosummary_accessors; extra == "dev"
|
|
21
|
+
Dynamic: license-file
|
|
27
22
|
|
|
28
23
|
# obsarray: Measurement uncertainty handling in Python
|
|
29
24
|
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
#
|
|
3
|
+
# obsarray documentation build configuration file, created by
|
|
4
|
+
# cookiecutter
|
|
5
|
+
#
|
|
6
|
+
# This file is execfile()d with the current directory set to its
|
|
7
|
+
# containing dir.
|
|
8
|
+
#
|
|
9
|
+
# Note that not all possible configuration values are present in this
|
|
10
|
+
# autogenerated file.
|
|
11
|
+
#
|
|
12
|
+
# All configuration values have a default; values that are commented out
|
|
13
|
+
# serve to show the default.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# If extensions (or modules to document with autodoc) are in another
|
|
17
|
+
# directory, add these directories to sys.path here. If the directory is
|
|
18
|
+
# relative to the documentation root, use os.path.abspath to make it
|
|
19
|
+
# absolute, like shown here.
|
|
20
|
+
|
|
21
|
+
import sphinx_autosummary_accessors
|
|
22
|
+
import obsarray
|
|
23
|
+
|
|
24
|
+
project_title = "obsarray".replace("_", " ").title()
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# -- General configuration ---------------------------------------------
|
|
28
|
+
|
|
29
|
+
# If your documentation needs a minimal Sphinx version, state it here.
|
|
30
|
+
#
|
|
31
|
+
# needs_sphinx = '1.0'
|
|
32
|
+
|
|
33
|
+
# Attempt to make links automatially
|
|
34
|
+
default_role = "code"
|
|
35
|
+
|
|
36
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
37
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
|
38
|
+
# CFAB added napolean to support google-style docstrings
|
|
39
|
+
extensions = [
|
|
40
|
+
"sphinx.ext.autodoc",
|
|
41
|
+
"sphinx.ext.autosummary",
|
|
42
|
+
"sphinx.ext.intersphinx",
|
|
43
|
+
"sphinx.ext.viewcode",
|
|
44
|
+
"sphinx.ext.napoleon",
|
|
45
|
+
"IPython.sphinxext.ipython_directive",
|
|
46
|
+
"IPython.sphinxext.ipython_console_highlighting",
|
|
47
|
+
"sphinx_design",
|
|
48
|
+
"sphinx_autosummary_accessors",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
52
|
+
templates_path = ["_templates", sphinx_autosummary_accessors.templates_path]
|
|
53
|
+
|
|
54
|
+
# The suffix(es) of source filenames.
|
|
55
|
+
# You can specify multiple suffix as a list of string:
|
|
56
|
+
#
|
|
57
|
+
# source_suffix = ['.rst', '.md']
|
|
58
|
+
source_suffix = ".rst"
|
|
59
|
+
|
|
60
|
+
# The master toctree document.
|
|
61
|
+
master_doc = "index"
|
|
62
|
+
|
|
63
|
+
# General information about the project.
|
|
64
|
+
project = project_title
|
|
65
|
+
copyright = "CoMet Toolkit Team"
|
|
66
|
+
author = "CoMet Toolkit Team"
|
|
67
|
+
|
|
68
|
+
# The version info for the project you're documenting, acts as replacement
|
|
69
|
+
# for |version| and |release|, also used in various other places throughout
|
|
70
|
+
# the built documents.
|
|
71
|
+
#
|
|
72
|
+
# The short X.Y version.
|
|
73
|
+
version = obsarray.__version__
|
|
74
|
+
# The full version, including alpha/beta/rc tags.
|
|
75
|
+
release = obsarray.__version__
|
|
76
|
+
|
|
77
|
+
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
78
|
+
# for a list of supported languages.
|
|
79
|
+
#
|
|
80
|
+
# This is also used if you do content translation via gettext catalogs.
|
|
81
|
+
# Usually you set "language" from the command line for these cases.
|
|
82
|
+
language = None
|
|
83
|
+
|
|
84
|
+
# List of patterns, relative to source directory, that match files and
|
|
85
|
+
# directories to ignore when looking for source files.
|
|
86
|
+
# This patterns also effect to html_static_path and html_extra_path
|
|
87
|
+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
88
|
+
|
|
89
|
+
# The name of the Pygments (syntax highlighting) style to use.
|
|
90
|
+
pygments_style = "sphinx"
|
|
91
|
+
|
|
92
|
+
rst_prolog = """
|
|
93
|
+
.. role:: python(code)
|
|
94
|
+
:language: python
|
|
95
|
+
:class: highlight
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
|
99
|
+
todo_include_todos = False
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# -- Options for HTML output -------------------------------------------
|
|
103
|
+
|
|
104
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
105
|
+
# a list of builtin themes.
|
|
106
|
+
#
|
|
107
|
+
html_theme = "sphinx_book_theme"
|
|
108
|
+
|
|
109
|
+
# Theme options are theme-specific and customize the look and feel of a
|
|
110
|
+
# theme further. For a list of options available for each theme, see the
|
|
111
|
+
# documentation.
|
|
112
|
+
#
|
|
113
|
+
# html_theme_options = {}
|
|
114
|
+
|
|
115
|
+
html_logo = "figs/obsarray.png"
|
|
116
|
+
|
|
117
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
118
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
119
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
120
|
+
html_static_path = ["_static"]
|
|
121
|
+
|
|
122
|
+
# -- Options for HTMLHelp output ---------------------------------------
|
|
123
|
+
|
|
124
|
+
# Output file base name for HTML help builder.
|
|
125
|
+
htmlhelp_basename = "obsarraydoc"
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
# -- Options for LaTeX output ------------------------------------------
|
|
129
|
+
|
|
130
|
+
latex_elements = {
|
|
131
|
+
# The paper size ('letterpaper' or 'a4paper').
|
|
132
|
+
#
|
|
133
|
+
# 'papersize': 'letterpaper',
|
|
134
|
+
# The font size ('10pt', '11pt' or '12pt').
|
|
135
|
+
#
|
|
136
|
+
# 'pointsize': '10pt',
|
|
137
|
+
# Additional stuff for the LaTeX preamble.
|
|
138
|
+
#
|
|
139
|
+
# 'preamble': '',
|
|
140
|
+
# Latex figure (float) alignment
|
|
141
|
+
#
|
|
142
|
+
# 'figure_align': 'htbp',
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
# Grouping the document tree into LaTeX files. List of tuples
|
|
146
|
+
# (source start file, target name, title, author, documentclass
|
|
147
|
+
# [howto, manual, or own class]).
|
|
148
|
+
latex_documents = [
|
|
149
|
+
(
|
|
150
|
+
master_doc,
|
|
151
|
+
"user_manual.tex",
|
|
152
|
+
"{} Documentation".format(project_title),
|
|
153
|
+
"CoMet Toolkit Team",
|
|
154
|
+
"manual",
|
|
155
|
+
),
|
|
156
|
+
]
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
# -- Options for manual page output ------------------------------------
|
|
160
|
+
|
|
161
|
+
# One entry per manual page. List of tuples
|
|
162
|
+
# (source start file, name, description, authors, manual section).
|
|
163
|
+
man_pages = [(master_doc, "obsarray", "obsarray Documentation", [author], 1)]
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
# -- Options for Texinfo output ----------------------------------------
|
|
167
|
+
|
|
168
|
+
# Grouping the document tree into Texinfo files. List of tuples
|
|
169
|
+
# (source start file, target name, title, author,
|
|
170
|
+
# dir menu entry, description, category)
|
|
171
|
+
texinfo_documents = [
|
|
172
|
+
(
|
|
173
|
+
master_doc,
|
|
174
|
+
"obsarray",
|
|
175
|
+
"obsarray Documentation",
|
|
176
|
+
author,
|
|
177
|
+
"obsarray",
|
|
178
|
+
"Extension to xarray for handling uncertainty quantified observation data",
|
|
179
|
+
"Miscellaneous",
|
|
180
|
+
),
|
|
181
|
+
]
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from obsarray.err_corr import register_err_corr_form, BaseErrCorrForm
|
|
2
|
+
import xarray as xr
|
|
3
|
+
import numpy as np
|
|
4
|
+
import obsarray
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@register_err_corr_form("new")
|
|
8
|
+
class NewForm(BaseErrCorrForm):
|
|
9
|
+
|
|
10
|
+
form = "new"
|
|
11
|
+
is_systematic = True
|
|
12
|
+
|
|
13
|
+
def build_matrix(self, idx: np.ndarray) -> np.ndarray:
|
|
14
|
+
return "abc"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# ds = xr.open_dataset("obs_example.nc")
|
|
18
|
+
#
|
|
19
|
+
# ds.unc["temperature"]["u_sys_temperature"] = (
|
|
20
|
+
# ["x", "y", "time"],
|
|
21
|
+
# ds.temperature * 0.03,
|
|
22
|
+
# {
|
|
23
|
+
# "err_corr": [
|
|
24
|
+
# {
|
|
25
|
+
# "dim": "x",
|
|
26
|
+
# "form": "new",
|
|
27
|
+
# "params": [],
|
|
28
|
+
# },
|
|
29
|
+
# {
|
|
30
|
+
# "dim": "y",
|
|
31
|
+
# "form": "systematic",
|
|
32
|
+
# "params": [],
|
|
33
|
+
# },
|
|
34
|
+
# {
|
|
35
|
+
# "dim": "time",
|
|
36
|
+
# "form": "systematic",
|
|
37
|
+
# "params": [],
|
|
38
|
+
# },
|
|
39
|
+
# ]
|
|
40
|
+
# },
|
|
41
|
+
# )
|
|
42
|
+
#
|
|
43
|
+
# p = ds.unc["temperature"]["u_sys_temperature"]
|
|
44
|
+
#
|
|
45
|
+
# pass
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
# This file was generated by 'versioneer.py' (0.
|
|
2
|
+
# This file was generated by 'versioneer.py' (0.29) from
|
|
3
3
|
# revision-control system data, or from the parent directory name of an
|
|
4
4
|
# unpacked source archive. Distribution tarballs contain a pre-generated copy
|
|
5
5
|
# of this file.
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "
|
|
11
|
+
"date": "2025-04-25T14:06:04+0100",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "
|
|
14
|
+
"full-revisionid": "b26b43a5d2e41ccb9a5e73c00e6d16a28a8515a9",
|
|
15
|
+
"version": "1.0.2"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -454,15 +454,15 @@ class DatasetUtil:
|
|
|
454
454
|
if dtype == numpy.int8:
|
|
455
455
|
return numpy.int8(-127)
|
|
456
456
|
if dtype == numpy.uint8:
|
|
457
|
-
return numpy.uint8
|
|
457
|
+
return numpy.iinfo(numpy.uint8).max
|
|
458
458
|
elif dtype == numpy.int16:
|
|
459
459
|
return numpy.int16(-32767)
|
|
460
460
|
elif dtype == numpy.uint16:
|
|
461
|
-
return numpy.uint16
|
|
461
|
+
return numpy.iinfo(numpy.uint16).max
|
|
462
462
|
elif dtype == numpy.int32:
|
|
463
463
|
return numpy.int32(-2147483647)
|
|
464
464
|
elif dtype == numpy.uint32:
|
|
465
|
-
return numpy.uint32
|
|
465
|
+
return numpy.iinfo(numpy.uint32).max
|
|
466
466
|
elif dtype == numpy.int64:
|
|
467
467
|
return numpy.int64(-9223372036854775806)
|
|
468
468
|
elif dtype == numpy.float32:
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: obsarray
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Measurement data handling in Python
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Classifier: Development Status :: 2 - Pre-Alpha
|
|
10
|
-
Classifier: Programming Language :: Python
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
5
|
+
Author-email: CoMet Toolkit Team <team@comet-toolkit.org>
|
|
6
|
+
Project-URL: Homepage, https://github.com/comet-toolkit/obsarray
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
15
9
|
License-File: LICENSE
|
|
16
10
|
Requires-Dist: comet_maths
|
|
17
|
-
Requires-Dist: netcdf4
|
|
11
|
+
Requires-Dist: netcdf4
|
|
18
12
|
Requires-Dist: xarray
|
|
19
13
|
Provides-Extra: dev
|
|
20
14
|
Requires-Dist: pre-commit; extra == "dev"
|
|
@@ -24,6 +18,7 @@ Requires-Dist: sphinx_design; extra == "dev"
|
|
|
24
18
|
Requires-Dist: sphinx_book_theme; extra == "dev"
|
|
25
19
|
Requires-Dist: ipython; extra == "dev"
|
|
26
20
|
Requires-Dist: sphinx_autosummary_accessors; extra == "dev"
|
|
21
|
+
Dynamic: license-file
|
|
27
22
|
|
|
28
23
|
# obsarray: Measurement uncertainty handling in Python
|
|
29
24
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "obsarray"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Measurement data handling in Python"
|
|
9
|
+
authors = [
|
|
10
|
+
{ name="CoMet Toolkit Team", email="team@comet-toolkit.org" }
|
|
11
|
+
]
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
license-files = ["LICENSE"]
|
|
14
|
+
requires-python = ">=3.8"
|
|
15
|
+
dependencies = [
|
|
16
|
+
"comet_maths",
|
|
17
|
+
"netcdf4",
|
|
18
|
+
"xarray"
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.optional-dependencies]
|
|
22
|
+
dev = [
|
|
23
|
+
"pre-commit",
|
|
24
|
+
"tox",
|
|
25
|
+
"sphinx",
|
|
26
|
+
"sphinx_design",
|
|
27
|
+
"sphinx_book_theme",
|
|
28
|
+
"ipython",
|
|
29
|
+
"sphinx_autosummary_accessors"
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
"Homepage" = "https://github.com/comet-toolkit/obsarray"
|
|
34
|
+
|
|
35
|
+
[tool.setuptools]
|
|
36
|
+
include-package-data = true
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.packages.find]
|
|
39
|
+
exclude = ["tests"]
|
|
40
|
+
|
|
41
|
+
[tool.versioneer]
|
|
42
|
+
VCS = "git"
|
|
43
|
+
style = "pep440"
|
|
44
|
+
versionfile_source = "obsarray/_version.py"
|
|
45
|
+
versionfile_build = "obsarray/_version.py"
|
|
46
|
+
tag_prefix = "v"
|
|
47
|
+
parentdir_prefix = ""
|
obsarray-1.0.2/setup.cfg
ADDED