oceanarray 0.6.2__py3-none-any.whl → 0.7.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.
- oceanarray/__init__.py +21 -21
- oceanarray/_deprecated.py +528 -30
- oceanarray/_version.py +1 -1
- oceanarray/analysis/__init__.py +2 -0
- oceanarray/analysis/clock/__init__.py +7 -0
- oceanarray/{pipeline → analysis}/clock/deployment.py +15 -3
- oceanarray/{pipeline → analysis}/clock/offsets.py +38 -19
- oceanarray/analysis/derived.py +23 -59
- oceanarray/analysis/hydrography.py +5 -1
- oceanarray/analysis/site.py +24 -13
- oceanarray/analysis/spectral.py +19 -7
- oceanarray/cli/__init__.py +87 -63
- oceanarray/cli/_common.py +232 -81
- oceanarray/cli/_deprecate.py +8 -6
- oceanarray/cli/animate.py +21 -11
- oceanarray/cli/concat.py +20 -17
- oceanarray/cli/export.py +19 -19
- oceanarray/cli/init.py +1 -1
- oceanarray/cli/list.py +2 -2
- oceanarray/cli/plot.py +6 -23
- oceanarray/cli/process.py +52 -90
- oceanarray/cli/report.py +186 -134
- oceanarray/cli/run.py +103 -21
- oceanarray/cli/stamp.py +3 -14
- oceanarray/cli/validate.py +38 -20
- oceanarray/config/__init__.py +1 -7
- oceanarray/config/labels.py +104 -0
- oceanarray/config/parameters.py +52 -125
- oceanarray/config/unit_tables.py +80 -51
- oceanarray/config/validation.py +9 -591
- oceanarray/exceptions.py +27 -9
- oceanarray/history.py +58 -0
- oceanarray/inspect.py +34 -37
- oceanarray/instruments.py +24 -131
- oceanarray/legacy/__init__.py +0 -6
- oceanarray/legacy/process_rodb.py +0 -9
- oceanarray/location.py +16 -166
- oceanarray/logger.py +102 -161
- oceanarray/mask_flags.py +327 -0
- oceanarray/mooring/__init__.py +42 -0
- oceanarray/mooring/blocks.py +206 -0
- oceanarray/{catalog.py → mooring/catalog.py} +78 -92
- oceanarray/mooring/check_yaml.py +778 -0
- oceanarray/mooring/instruments.py +395 -0
- oceanarray/mooring/load_yaml.py +149 -0
- oceanarray/mooring/location.py +252 -0
- oceanarray/mooring/settings.py +200 -0
- oceanarray/mooring/validation.py +641 -0
- oceanarray/mooring/write_yaml.py +273 -0
- oceanarray/mooring/yaml_keys.py +87 -0
- oceanarray/originator_flags.py +78 -0
- oceanarray/paths.py +555 -231
- oceanarray/physics.py +48 -28
- oceanarray/pipeline/__init__.py +179 -399
- oceanarray/pipeline/_attribution.py +780 -0
- oceanarray/pipeline/_run.py +126 -130
- oceanarray/pipeline/_stage.py +54 -135
- oceanarray/pipeline/attribution.py +48 -1082
- oceanarray/pipeline/calibration/__init__.py +17 -34
- oceanarray/pipeline/calibration/caldip.py +29 -56
- oceanarray/pipeline/calibration/dips.py +30 -46
- oceanarray/pipeline/calibration/stops.py +43 -94
- oceanarray/pipeline/clock/__init__.py +20 -5
- oceanarray/pipeline/concat.py +161 -219
- oceanarray/pipeline/coordinate.py +78 -172
- oceanarray/pipeline/dataset.py +39 -15
- oceanarray/pipeline/export.py +176 -93
- oceanarray/pipeline/grid.py +109 -228
- oceanarray/pipeline/gridders/__init__.py +2 -5
- oceanarray/pipeline/gridders/climatology.py +16 -29
- oceanarray/pipeline/gridders/filters.py +31 -21
- oceanarray/pipeline/gridders/rapid_interp.py +96 -232
- oceanarray/pipeline/masking.py +52 -295
- oceanarray/pipeline/oceansites.py +101 -113
- oceanarray/pipeline/pressure.py +80 -399
- oceanarray/pipeline/qc/__init__.py +114 -192
- oceanarray/pipeline/qc/adcp.py +175 -253
- oceanarray/pipeline/qc/originator.py +28 -128
- oceanarray/pipeline/raw_files.py +119 -119
- oceanarray/pipeline/read_mooring.py +137 -132
- oceanarray/pipeline/sensors.py +56 -147
- oceanarray/pipeline/stack.py +209 -324
- oceanarray/pipeline/stage1.py +295 -413
- oceanarray/pipeline/stage2.py +139 -366
- oceanarray/pipeline/stage3.py +55 -246
- oceanarray/pipeline/stamp.py +17 -15
- oceanarray/pipeline/summary.py +19 -27
- oceanarray/pipeline/units.py +24 -86
- oceanarray/pipeline/write_mooring.py +17 -19
- oceanarray/plotters/__init__.py +25 -63
- oceanarray/plotters/_cli_legacy.py +64 -24
- oceanarray/plotters/animation.py +28 -11
- oceanarray/plotters/colorbars.py +230 -0
- oceanarray/plotters/current.py +214 -300
- oceanarray/plotters/diagnostic.py +125 -328
- oceanarray/plotters/flags.py +19 -48
- oceanarray/plotters/helpers.py +96 -169
- oceanarray/plotters/hydrography.py +16 -16
- oceanarray/plotters/primitives.py +134 -339
- oceanarray/plotters/site.py +45 -152
- oceanarray/plotters/spectrum.py +45 -52
- oceanarray/plotters/ticks.py +72 -0
- oceanarray/plotters/timeseries.py +78 -169
- oceanarray/plotters/ts.py +678 -1078
- oceanarray/plotters/ts_panels.py +568 -0
- oceanarray/provenance.py +12 -55
- oceanarray/readers/__init__.py +62 -88
- oceanarray/readers/adcp_geometry.py +77 -0
- oceanarray/readers/netcdf.py +5 -6
- oceanarray/readers/nortek.py +91 -89
- oceanarray/readers/oceansites.py +56 -131
- oceanarray/readers/rodb.py +46 -65
- oceanarray/readers/sbe.py +32 -9
- oceanarray/reports/__init__.py +17 -2
- oceanarray/reports/_array.py +85 -77
- oceanarray/reports/_captions.py +62 -57
- oceanarray/reports/_concat.py +65 -37
- oceanarray/reports/_env.py +17 -19
- oceanarray/reports/_figdebug.py +10 -26
- oceanarray/reports/_grid.py +44 -36
- oceanarray/reports/_gridcat.py +27 -24
- oceanarray/reports/_html_helpers.py +73 -35
- oceanarray/reports/_instrument.py +45 -34
- oceanarray/reports/_instrument_text.py +21 -44
- oceanarray/reports/_masthead.py +34 -64
- oceanarray/reports/_mooring.py +181 -135
- oceanarray/reports/_pdf.py +21 -11
- oceanarray/reports/_plots.py +55 -60
- oceanarray/reports/_qcflags.py +8 -19
- oceanarray/reports/_read.py +77 -27
- oceanarray/reports/_recovery_table.py +49 -61
- oceanarray/reports/_slots.py +7 -15
- oceanarray/reports/_stack.py +39 -22
- oceanarray/reports/_summary.py +23 -13
- oceanarray/reports/_vendored/MANIFEST.txt +1 -1
- oceanarray/reports/_vendored/report.mplstyle +5 -0
- oceanarray/reports/_verb.py +332 -176
- oceanarray/reports/design.py +4 -20
- oceanarray/reports/templates/_macros.html +1 -1
- oceanarray/reports/templates/_mooring_clock_table.html +10 -6
- oceanarray/reports/templates/mooring.html +1 -1
- oceanarray/writers/__init__.py +1 -4
- oceanarray/writers/dtypes.py +40 -24
- oceanarray/writers/netcdf.py +34 -48
- {oceanarray-0.6.2.dist-info → oceanarray-0.7.0.dist-info}/METADATA +15 -5
- oceanarray-0.7.0.dist-info/RECORD +224 -0
- oceanarray/mooring.py +0 -1340
- oceanarray-0.6.2.dist-info/RECORD +0 -205
- {oceanarray-0.6.2.dist-info → oceanarray-0.7.0.dist-info}/WHEEL +0 -0
- {oceanarray-0.6.2.dist-info → oceanarray-0.7.0.dist-info}/entry_points.txt +0 -0
- {oceanarray-0.6.2.dist-info → oceanarray-0.7.0.dist-info}/licenses/LICENSE +0 -0
- {oceanarray-0.6.2.dist-info → oceanarray-0.7.0.dist-info}/top_level.txt +0 -0
oceanarray/__init__.py
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
"""oceanarray: processing oceanographic mooring data, from raw instrument files to gridded products.
|
|
2
2
|
|
|
3
|
-
The public API is :data:`__all__`;
|
|
4
|
-
``import oceanarray``. Names load on first use, so importing the package stays
|
|
5
|
-
cheap.
|
|
6
|
-
|
|
7
|
-
Examples
|
|
8
|
-
--------
|
|
9
|
-
>>> import oceanarray as oa
|
|
10
|
-
>>> oa.run("proc/dune2_1_2026/dune2_1_2026.mooring.yaml", raw_dir="raw/", report=True)
|
|
3
|
+
The public API is :data:`__all__`; names load on first use, so importing stays cheap.
|
|
11
4
|
"""
|
|
12
5
|
|
|
13
6
|
from __future__ import annotations
|
|
@@ -29,9 +22,14 @@ except ImportError: # pragma: no cover - source tree with no build artefact
|
|
|
29
22
|
|
|
30
23
|
if TYPE_CHECKING:
|
|
31
24
|
from oceanarray import mooring
|
|
32
|
-
from oceanarray.exceptions import
|
|
25
|
+
from oceanarray.exceptions import (
|
|
26
|
+
MooringError,
|
|
27
|
+
OceanarrayError,
|
|
28
|
+
ReaderError,
|
|
29
|
+
StageError,
|
|
30
|
+
)
|
|
31
|
+
from oceanarray.paths import Paths
|
|
33
32
|
from oceanarray.pipeline import process, run
|
|
34
|
-
from oceanarray.pipeline._stage import StageError
|
|
35
33
|
from oceanarray.pipeline.concat import concat
|
|
36
34
|
from oceanarray.pipeline.export import export
|
|
37
35
|
from oceanarray.pipeline.grid import grid
|
|
@@ -42,11 +40,14 @@ if TYPE_CHECKING:
|
|
|
42
40
|
from oceanarray.pipeline.stage3 import stage3
|
|
43
41
|
from oceanarray.pipeline.write_mooring import write_mooring
|
|
44
42
|
from oceanarray.readers import read
|
|
45
|
-
from oceanarray.reports import report
|
|
43
|
+
from oceanarray.reports import recovery_table, report, report_array
|
|
46
44
|
from oceanarray.writers import write
|
|
47
45
|
|
|
48
46
|
__all__ = [
|
|
49
47
|
"MooringError",
|
|
48
|
+
"OceanarrayError",
|
|
49
|
+
"Paths",
|
|
50
|
+
"ReaderError",
|
|
50
51
|
"StageError",
|
|
51
52
|
"__version__",
|
|
52
53
|
"concat",
|
|
@@ -56,7 +57,9 @@ __all__ = [
|
|
|
56
57
|
"process",
|
|
57
58
|
"read",
|
|
58
59
|
"read_mooring",
|
|
60
|
+
"recovery_table",
|
|
59
61
|
"report",
|
|
62
|
+
"report_array",
|
|
60
63
|
"run",
|
|
61
64
|
"stack",
|
|
62
65
|
"stage1",
|
|
@@ -69,7 +72,10 @@ __all__ = [
|
|
|
69
72
|
#: Public name -> (module, attribute); attribute None means the module itself.
|
|
70
73
|
_EXPORTS: dict[str, tuple[str, str | None]] = {
|
|
71
74
|
"MooringError": ("oceanarray.exceptions", "MooringError"),
|
|
72
|
-
"StageError": ("oceanarray.
|
|
75
|
+
"StageError": ("oceanarray.exceptions", "StageError"),
|
|
76
|
+
"ReaderError": ("oceanarray.exceptions", "ReaderError"),
|
|
77
|
+
"OceanarrayError": ("oceanarray.exceptions", "OceanarrayError"),
|
|
78
|
+
"Paths": ("oceanarray.paths", "Paths"),
|
|
73
79
|
"concat": ("oceanarray.pipeline.concat", "concat"),
|
|
74
80
|
"export": ("oceanarray.pipeline.export", "export"),
|
|
75
81
|
"grid": ("oceanarray.pipeline.grid", "grid"),
|
|
@@ -77,7 +83,9 @@ _EXPORTS: dict[str, tuple[str, str | None]] = {
|
|
|
77
83
|
"process": ("oceanarray.pipeline", "process"),
|
|
78
84
|
"read": ("oceanarray.readers", "read"),
|
|
79
85
|
"read_mooring": ("oceanarray.pipeline.read_mooring", "read_mooring"),
|
|
86
|
+
"recovery_table": ("oceanarray.reports", "recovery_table"),
|
|
80
87
|
"report": ("oceanarray.reports", "report"),
|
|
88
|
+
"report_array": ("oceanarray.reports", "report_array"),
|
|
81
89
|
"run": ("oceanarray.pipeline", "run"),
|
|
82
90
|
"stack": ("oceanarray.pipeline.stack", "stack"),
|
|
83
91
|
"stage1": ("oceanarray.pipeline.stage1", "stage1"),
|
|
@@ -87,23 +95,15 @@ _EXPORTS: dict[str, tuple[str, str | None]] = {
|
|
|
87
95
|
"write_mooring": ("oceanarray.pipeline.write_mooring", "write_mooring"),
|
|
88
96
|
}
|
|
89
97
|
|
|
90
|
-
#: Old top-level names kept for one release: name -> the module now holding it.
|
|
91
|
-
_DEPRECATED: dict[str, str] = {"parameters": "oceanarray.config.parameters"}
|
|
92
|
-
|
|
93
98
|
|
|
94
99
|
def __getattr__(name: str) -> object:
|
|
95
|
-
"""Resolve a public name
|
|
100
|
+
"""Resolve a public name or a subpackage on first access."""
|
|
96
101
|
if name in _EXPORTS:
|
|
97
102
|
module, attr = _EXPORTS[name]
|
|
98
103
|
mod = importlib.import_module(module)
|
|
99
104
|
obj = mod if attr is None else getattr(mod, attr)
|
|
100
105
|
globals()[name] = obj # later accesses are a plain attribute hit
|
|
101
106
|
return obj
|
|
102
|
-
if name in _DEPRECATED:
|
|
103
|
-
from oceanarray import _deprecated
|
|
104
|
-
|
|
105
|
-
_deprecated.warn(f"{__name__}.{name}")
|
|
106
|
-
return importlib.import_module(_DEPRECATED[name])
|
|
107
107
|
if not name.startswith("_"):
|
|
108
108
|
try:
|
|
109
109
|
return importlib.import_module(f"{__name__}.{name}")
|