doppy 0.2.2__cp310-abi3-win_amd64.whl → 0.2.4__cp310-abi3-win_amd64.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.
Potentially problematic release.
This version of doppy might be problematic. Click here for more details.
- doppy/netcdf.py +6 -1
- doppy/product/stare.py +2 -2
- doppy/product/wind.py +1 -1
- doppy/raw/halo_hpl.py +1 -1
- doppy/raw/halo_sys_params.py +1 -1
- doppy/raw/wls70.py +11 -1
- doppy/rs.pyd +0 -0
- doppy-0.2.4.dist-info/METADATA +137 -0
- {doppy-0.2.2.dist-info → doppy-0.2.4.dist-info}/RECORD +12 -13
- {doppy-0.2.2.dist-info → doppy-0.2.4.dist-info}/WHEEL +1 -1
- doppy-0.2.2.dist-info/METADATA +0 -44
- {doppy-0.2.2.dist-info → doppy-0.2.4.dist-info}/entry_points.txt +0 -0
- {doppy-0.2.2.dist-info → doppy-0.2.4.dist-info}/license_files/LICENSE +0 -0
doppy/netcdf.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import warnings
|
|
3
4
|
from typing import Literal, TypeAlias
|
|
4
5
|
|
|
5
6
|
import netCDF4
|
|
@@ -17,10 +18,14 @@ class Dataset:
|
|
|
17
18
|
self.nc.createDimension(dim, None)
|
|
18
19
|
return self
|
|
19
20
|
|
|
20
|
-
def
|
|
21
|
+
def add_attribute(self, key: str, val: str) -> Dataset:
|
|
21
22
|
setattr(self.nc, key, val)
|
|
22
23
|
return self
|
|
23
24
|
|
|
25
|
+
def add_atribute(self, key: str, val: str) -> Dataset:
|
|
26
|
+
warnings.warn("Use add_attribute", DeprecationWarning)
|
|
27
|
+
return self.add_attribute(key, val)
|
|
28
|
+
|
|
24
29
|
def add_time(
|
|
25
30
|
self,
|
|
26
31
|
name: str,
|
doppy/product/stare.py
CHANGED
|
@@ -142,7 +142,7 @@ def _compute_beta(
|
|
|
142
142
|
c
|
|
143
143
|
speed of light
|
|
144
144
|
B
|
|
145
|
-
|
|
145
|
+
receiver bandwidth
|
|
146
146
|
|
|
147
147
|
References
|
|
148
148
|
----------
|
|
@@ -560,7 +560,7 @@ def _select_raws_for_stare(
|
|
|
560
560
|
|
|
561
561
|
|
|
562
562
|
def _selection_key(raw: doppy.raw.HaloHpl) -> SelectionGroupKeyType:
|
|
563
|
-
return (raw.header.
|
|
563
|
+
return (raw.header.mergeable_hash(),)
|
|
564
564
|
|
|
565
565
|
|
|
566
566
|
def _time2bg_time(
|
doppy/product/wind.py
CHANGED
|
@@ -406,7 +406,7 @@ def _selection_key(raw: doppy.raw.HaloHpl) -> SelectionGroupKeyType:
|
|
|
406
406
|
if len(raw.elevation_angles) != 1:
|
|
407
407
|
raise ValueError("Expected only one elevation angle")
|
|
408
408
|
return (
|
|
409
|
-
raw.header.
|
|
409
|
+
raw.header.mergeable_hash(),
|
|
410
410
|
next(iter(raw.elevation_angles)),
|
|
411
411
|
tuple(sorted(raw.azimuth_angles)),
|
|
412
412
|
)
|
doppy/raw/halo_hpl.py
CHANGED
doppy/raw/halo_sys_params.py
CHANGED
|
@@ -81,7 +81,7 @@ def _from_src(data: BufferedIOBase) -> HaloSysParams:
|
|
|
81
81
|
b = [r.split(b"\t") for r in a]
|
|
82
82
|
arr = np.array(b)
|
|
83
83
|
if arr.shape[1] != 7:
|
|
84
|
-
raise ValueError("Unexpected data
|
|
84
|
+
raise ValueError("Unexpected data format")
|
|
85
85
|
|
|
86
86
|
def timestr2datetime64_12H(datetime_bytes: bytes) -> np.datetime64:
|
|
87
87
|
return datetime64(
|
doppy/raw/wls70.py
CHANGED
|
@@ -33,6 +33,7 @@ class Wls70:
|
|
|
33
33
|
] # v := meridional wind?, dim: (time, altitude)
|
|
34
34
|
vertical_wind: npt.NDArray[np.float64] # w := vertical wind?, dim: (time, altitude)
|
|
35
35
|
system_id: str
|
|
36
|
+
cnr_threshold: float
|
|
36
37
|
|
|
37
38
|
@classmethod
|
|
38
39
|
def from_srcs(
|
|
@@ -111,6 +112,7 @@ class Wls70:
|
|
|
111
112
|
meridional_wind=self.meridional_wind[index],
|
|
112
113
|
vertical_wind=self.vertical_wind[index],
|
|
113
114
|
system_id=self.system_id,
|
|
115
|
+
cnr_threshold=self.cnr_threshold,
|
|
114
116
|
)
|
|
115
117
|
raise TypeError
|
|
116
118
|
|
|
@@ -137,6 +139,9 @@ class Wls70:
|
|
|
137
139
|
meridional_wind=np.concatenate(tuple(r.meridional_wind for r in raws)),
|
|
138
140
|
vertical_wind=np.concatenate(tuple(r.vertical_wind for r in raws)),
|
|
139
141
|
system_id=merge_all_equal("system_id", [r.system_id for r in raws]),
|
|
142
|
+
cnr_threshold=merge_all_equal(
|
|
143
|
+
"cnr_threshold", [r.cnr_threshold for r in raws]
|
|
144
|
+
),
|
|
140
145
|
)
|
|
141
146
|
|
|
142
147
|
def non_strictly_increasing_timesteps_removed(self) -> Wls70:
|
|
@@ -158,6 +163,7 @@ def _raw_rs_to_wls70(
|
|
|
158
163
|
info, cols, data = raw_rs
|
|
159
164
|
altitude = info["altitude"]
|
|
160
165
|
system_id = info["system_id"]
|
|
166
|
+
cnr_threshold = float(info["cnr_threshold"])
|
|
161
167
|
data = data.reshape(-1, len(cols))
|
|
162
168
|
time_ts = data[:, 0]
|
|
163
169
|
time = np.array([datetime64(datetime.utcfromtimestamp(ts)) for ts in time_ts])
|
|
@@ -173,7 +179,10 @@ def _raw_rs_to_wls70(
|
|
|
173
179
|
u = data[:, 9::8]
|
|
174
180
|
v = data[:, 10::8]
|
|
175
181
|
w = data[:, 11::8]
|
|
176
|
-
|
|
182
|
+
mask = (np.abs(u) > 90) | (np.abs(v) > 90) | (np.abs(w) > 90)
|
|
183
|
+
u[mask] = np.nan
|
|
184
|
+
v[mask] = np.nan
|
|
185
|
+
w[mask] = np.nan
|
|
177
186
|
return Wls70(
|
|
178
187
|
time=time,
|
|
179
188
|
altitude=altitude,
|
|
@@ -189,4 +198,5 @@ def _raw_rs_to_wls70(
|
|
|
189
198
|
meridional_wind=v,
|
|
190
199
|
vertical_wind=w,
|
|
191
200
|
system_id=system_id,
|
|
201
|
+
cnr_threshold=cnr_threshold,
|
|
192
202
|
)
|
doppy/rs.pyd
CHANGED
|
Binary file
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: doppy
|
|
3
|
+
Version: 0.2.4
|
|
4
|
+
Classifier: Development Status :: 4 - Beta
|
|
5
|
+
Classifier: Programming Language :: Python :: 3
|
|
6
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Dist: requests
|
|
13
|
+
Requires-Dist: urllib3
|
|
14
|
+
Requires-Dist: numpy
|
|
15
|
+
Requires-Dist: netcdf4
|
|
16
|
+
Requires-Dist: typer
|
|
17
|
+
Requires-Dist: matplotlib
|
|
18
|
+
Requires-Dist: scikit-learn
|
|
19
|
+
Requires-Dist: scipy
|
|
20
|
+
Requires-Dist: mypy ; extra == 'dev'
|
|
21
|
+
Requires-Dist: ruff ; extra == 'dev'
|
|
22
|
+
Requires-Dist: pytest ; extra == 'dev'
|
|
23
|
+
Requires-Dist: types-requests ; extra == 'dev'
|
|
24
|
+
Requires-Dist: py-spy ; extra == 'dev'
|
|
25
|
+
Requires-Dist: maturin ==1.4 ; extra == 'dev'
|
|
26
|
+
Requires-Dist: release-version ; extra == 'dev'
|
|
27
|
+
Requires-Dist: pre-commit ; extra == 'dev'
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Author: Niko Leskinen <niko.leskinen@fmi.fi>
|
|
32
|
+
Author-email: Niko Leskinen <niko.leskinen@fmi.fi>
|
|
33
|
+
Requires-Python: >=3.10
|
|
34
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
35
|
+
Project-URL: Homepage, https://github.com/actris-cloudnet/doppy
|
|
36
|
+
Project-URL: Repository, https://github.com/actris-cloudnet/doppy
|
|
37
|
+
Project-URL: Changelog, https://github.com/actris-cloudnet/doppy/blob/main/CHANGELOG.md
|
|
38
|
+
Project-URL: Bug Tracker, https://github.com/actris-cloudnet/doppy/issues
|
|
39
|
+
|
|
40
|
+
# Doppy – Doppler wind lidar processing
|
|
41
|
+
|
|
42
|
+
[](https://github.com/actris-cloudnet/doppy/actions/workflows/ci.yml)
|
|
43
|
+
[](https://badge.fury.io/py/doppy)
|
|
44
|
+
|
|
45
|
+
## Products
|
|
46
|
+
|
|
47
|
+
- [Stare](https://github.com/actris-cloudnet/doppy/blob/main/src/doppy/product/stare.py): [Examples](https://cloudnet.fmi.fi/search/visualizations?experimental=true&product=doppler-lidar&dateFrom=2024-06-05&dateTo=2024-06-05)
|
|
48
|
+
- [Wind](https://github.com/actris-cloudnet/doppy/blob/main/src/doppy/product/wind.py): [Examples](https://cloudnet.fmi.fi/search/visualizations?experimental=true&product=doppler-lidar-wind&dateFrom=2024-06-05&dateTo=2024-06-05)
|
|
49
|
+
|
|
50
|
+
## Instruments
|
|
51
|
+
|
|
52
|
+
- HALO Photonics Streamline lidars (stare, wind)
|
|
53
|
+
- Leosphere WindCube WLS200S (wind)
|
|
54
|
+
- Leosphere WindCube WLS70 (wind)
|
|
55
|
+
|
|
56
|
+
## Install
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
pip install doppy
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Usage
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
import doppy
|
|
66
|
+
|
|
67
|
+
stare = doppy.product.Stare.from_halo_data(
|
|
68
|
+
data=LIST_OF_STARE_FILE_PATHS,
|
|
69
|
+
data_bg=LIST_OF_BACKGROUND_FILE_PATHS,
|
|
70
|
+
bg_correction_method=doppy.options.BgCorrectionMethod.FIT,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
(
|
|
75
|
+
doppy.netcdf.Dataset(FILENAME)
|
|
76
|
+
.add_dimension("time")
|
|
77
|
+
.add_dimension("range")
|
|
78
|
+
.add_time(
|
|
79
|
+
name="time",
|
|
80
|
+
dimensions=("time",),
|
|
81
|
+
standard_name="time",
|
|
82
|
+
long_name="Time UTC",
|
|
83
|
+
data=stare.time,
|
|
84
|
+
dtype="f8",
|
|
85
|
+
)
|
|
86
|
+
.add_variable(
|
|
87
|
+
name="range",
|
|
88
|
+
dimensions=("range",),
|
|
89
|
+
units="m",
|
|
90
|
+
data=stare.radial_distance,
|
|
91
|
+
dtype="f4",
|
|
92
|
+
)
|
|
93
|
+
.add_variable(
|
|
94
|
+
name="elevation",
|
|
95
|
+
dimensions=("time",),
|
|
96
|
+
units="degrees",
|
|
97
|
+
data=stare.elevation,
|
|
98
|
+
dtype="f4",
|
|
99
|
+
long_name="elevation from horizontal",
|
|
100
|
+
)
|
|
101
|
+
.add_variable(
|
|
102
|
+
name="beta_raw",
|
|
103
|
+
dimensions=("time", "range"),
|
|
104
|
+
units="sr-1 m-1",
|
|
105
|
+
data=stare.beta,
|
|
106
|
+
dtype="f4",
|
|
107
|
+
)
|
|
108
|
+
.add_variable(
|
|
109
|
+
name="beta",
|
|
110
|
+
dimensions=("time", "range"),
|
|
111
|
+
units="sr-1 m-1",
|
|
112
|
+
data=stare.beta,
|
|
113
|
+
dtype="f4",
|
|
114
|
+
mask=stare.mask,
|
|
115
|
+
)
|
|
116
|
+
.add_variable(
|
|
117
|
+
name="v",
|
|
118
|
+
dimensions=("time", "range"),
|
|
119
|
+
units="m s-1",
|
|
120
|
+
long_name="Doppler velocity",
|
|
121
|
+
data=stare.radial_velocity,
|
|
122
|
+
dtype="f4",
|
|
123
|
+
mask=stare.mask,
|
|
124
|
+
)
|
|
125
|
+
.add_scalar_variable(
|
|
126
|
+
name="wavelength",
|
|
127
|
+
units="m",
|
|
128
|
+
standard_name="radiation_wavelength",
|
|
129
|
+
data=stare.wavelength,
|
|
130
|
+
dtype="f4",
|
|
131
|
+
)
|
|
132
|
+
.add_attribute("serial_number", stare.system_id)
|
|
133
|
+
.add_attribute("doppy_version", doppy.__version__)
|
|
134
|
+
).close()
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
doppy-0.2.
|
|
2
|
-
doppy-0.2.
|
|
3
|
-
doppy-0.2.
|
|
4
|
-
doppy-0.2.
|
|
5
|
-
doppy-0.2.2.dist-info/license_files/LICENSE,sha256=RIAxFjJLTw0wQ3_SM73JoTeppoD99DJJ72cjvVuRrW4,1110
|
|
1
|
+
doppy-0.2.4.dist-info/METADATA,sha256=ZkylqwgahVuTks7ZPyEqmkuvmoFPHIlzHGZIw3uBkNU,4243
|
|
2
|
+
doppy-0.2.4.dist-info/WHEEL,sha256=ooo3OLxJB34JFfOmPzfiM9QlB2wmB_Cl3_kcSm8NkLg,95
|
|
3
|
+
doppy-0.2.4.dist-info/entry_points.txt,sha256=9b_Ca7vJoh6AwL3W8qAPh_UmJ_1Pa6hi-TDfCTDjvSk,43
|
|
4
|
+
doppy-0.2.4.dist-info/license_files/LICENSE,sha256=RIAxFjJLTw0wQ3_SM73JoTeppoD99DJJ72cjvVuRrW4,1110
|
|
6
5
|
doppy/bench.py,sha256=fLN2iS5mmoYH4qZjD80Vl1h9lp3C-KDfhj9fteWRPtM,260
|
|
7
6
|
doppy/data/api.py,sha256=c3zbZI3IV7HnzhyFzJpUPOFT20eYFuQlJ5K_1ZEe1Pg,1921
|
|
8
7
|
doppy/data/cache.py,sha256=VNPB3XsWGwY2bNXBs1r_sEWF4qBq_U7sJSlSmt1Rxm8,1033
|
|
@@ -10,20 +9,20 @@ doppy/data/exceptions.py,sha256=JOyekvUO-Ew4ZVezf3_IxZOrPN0IksfUILd8R2YcSts,95
|
|
|
10
9
|
doppy/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
10
|
doppy/defaults.py,sha256=nhxcZcFd2jyDVbq0azwtekEJEjiz8k21MZmXFlSXAjo,40
|
|
12
11
|
doppy/exceptions.py,sha256=YNEyz4r0ObzZHZ9re83K3wZlR2CRI1GyhH0vvFGasgQ,148
|
|
13
|
-
doppy/netcdf.py,sha256=
|
|
12
|
+
doppy/netcdf.py,sha256=NnTkZEb5gBInvrvn7uD91V2t4e_WlCOrLzhPm00azOE,3716
|
|
14
13
|
doppy/options.py,sha256=uyIKM_G2GtbmV6Gve8o13eIShQqUwsnYZ41mhX2ypGE,218
|
|
15
|
-
doppy/product/stare.py,sha256=
|
|
16
|
-
doppy/product/wind.py,sha256=
|
|
14
|
+
doppy/product/stare.py,sha256=sh2HuKEWa-gaWZCbjbozYFA0oRUZa4U3nG9FpgqtoKM,20522
|
|
15
|
+
doppy/product/wind.py,sha256=f52owv_pzfUDiMzLXv6IqHFWHWdLXmGUIgBCXjOhPnk,13455
|
|
17
16
|
doppy/product/__init__.py,sha256=kHVF77la8tzWKKpiM9eNWT-eAkAUd4uwb0wJFp62QLk,177
|
|
18
17
|
doppy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
18
|
doppy/raw/halo_bg.py,sha256=9K7E9smahGOqDIYnA-9m-Di3QsDY0PR2FH4Yd_oYiEY,4951
|
|
20
|
-
doppy/raw/halo_hpl.py,sha256=
|
|
21
|
-
doppy/raw/halo_sys_params.py,sha256=
|
|
19
|
+
doppy/raw/halo_hpl.py,sha256=VF8JQ_5N8adLsGNJOlhvKwz0LtNd4oCU76hETe5Vuhk,19007
|
|
20
|
+
doppy/raw/halo_sys_params.py,sha256=nT9r4F-H0Rf5njee5rYzzLTCm7vm3N_pdJqrW6RtyK4,4041
|
|
22
21
|
doppy/raw/windcube.py,sha256=h_kqlQf2Pz59xg5EVSROiUlcA2RQp2jkGIxohmN1QOE,10166
|
|
23
|
-
doppy/raw/wls70.py,sha256=
|
|
22
|
+
doppy/raw/wls70.py,sha256=2OhjmQ1SoAmjN4npOKFH0eFLyo9RssO7sr-gOtxjAho,7622
|
|
24
23
|
doppy/raw/__init__.py,sha256=J06q7iykSAWIif4XAxI1jOszkARvLFBR1eU-B9yUXMw,235
|
|
25
24
|
doppy/utils.py,sha256=lENDTzMVjCOA15Va9WZ6cou-foL5bGbNt4-NbDcnXpc,223
|
|
26
25
|
doppy/__init__.py,sha256=Af7_8p3oN1nTqS9fo0mVKVuiKf5CAEK69uQa32CSFBA,197
|
|
27
26
|
doppy/__main__.py,sha256=38hIWWfanILuBBGorQiAaleSC4qYJoIxuzVBkxf7Dng,371
|
|
28
|
-
doppy/rs.pyd,sha256=
|
|
29
|
-
doppy-0.2.
|
|
27
|
+
doppy/rs.pyd,sha256=dYpxLPIMM6YD1kr2MDlb2gypV4QhJ2LsQgxBRUCT3dE,2103808
|
|
28
|
+
doppy-0.2.4.dist-info/RECORD,,
|
doppy-0.2.2.dist-info/METADATA
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: doppy
|
|
3
|
-
Version: 0.2.2
|
|
4
|
-
Classifier: Development Status :: 4 - Beta
|
|
5
|
-
Classifier: Programming Language :: Python :: 3
|
|
6
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
7
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
8
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Intended Audience :: Science/Research
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
|
-
Requires-Dist: requests
|
|
13
|
-
Requires-Dist: urllib3
|
|
14
|
-
Requires-Dist: numpy
|
|
15
|
-
Requires-Dist: netcdf4
|
|
16
|
-
Requires-Dist: typer
|
|
17
|
-
Requires-Dist: matplotlib
|
|
18
|
-
Requires-Dist: scikit-learn
|
|
19
|
-
Requires-Dist: scipy
|
|
20
|
-
Requires-Dist: mypy ; extra == 'dev'
|
|
21
|
-
Requires-Dist: ruff ; extra == 'dev'
|
|
22
|
-
Requires-Dist: pytest ; extra == 'dev'
|
|
23
|
-
Requires-Dist: types-requests ; extra == 'dev'
|
|
24
|
-
Requires-Dist: py-spy ; extra == 'dev'
|
|
25
|
-
Requires-Dist: maturin ==1.4 ; extra == 'dev'
|
|
26
|
-
Requires-Dist: release-version ; extra == 'dev'
|
|
27
|
-
Requires-Dist: pre-commit ; extra == 'dev'
|
|
28
|
-
Provides-Extra: dev
|
|
29
|
-
License-File: LICENSE
|
|
30
|
-
License-File: LICENSE
|
|
31
|
-
Author: Niko Leskinen <niko.leskinen@fmi.fi>
|
|
32
|
-
Author-email: Niko Leskinen <niko.leskinen@fmi.fi>
|
|
33
|
-
Requires-Python: >=3.10
|
|
34
|
-
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
35
|
-
Project-URL: Homepage, https://github.com/actris-cloudnet/doppy
|
|
36
|
-
Project-URL: Repository, https://github.com/actris-cloudnet/doppy
|
|
37
|
-
Project-URL: Changelog, https://github.com/actris-cloudnet/doppy/blob/main/CHANGELOG.md
|
|
38
|
-
Project-URL: Bug Tracker, https://github.com/actris-cloudnet/doppy/issues
|
|
39
|
-
|
|
40
|
-
# Doppy - Wind doppler lidar processing
|
|
41
|
-
|
|
42
|
-
[](https://github.com/actris-cloudnet/doppy/actions/workflows/ci.yml)
|
|
43
|
-
[](https://badge.fury.io/py/doppy)
|
|
44
|
-
|
|
File without changes
|
|
File without changes
|