doppy 0.2.2__cp310-abi3-macosx_10_12_x86_64.whl → 0.2.3__cp310-abi3-macosx_10_12_x86_64.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/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.abi3.so CHANGED
Binary file
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.3
2
+ Name: doppy
3
+ Version: 0.2.3
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
+ [![CI](https://github.com/actris-cloudnet/doppy/actions/workflows/ci.yml/badge.svg)](https://github.com/actris-cloudnet/doppy/actions/workflows/ci.yml)
43
+ [![PyPI version](https://badge.fury.io/py/doppy.svg)](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_atribute("serial_number", stare.system_id)
133
+ .add_atribute("doppy_version", doppy.__version__)
134
+ ).close()
135
+
136
+ ```
137
+
@@ -1,8 +1,8 @@
1
- doppy-0.2.2.dist-info/METADATA,sha256=D5HIkmOh9XCD5O0B1Vf8A4dSuSqLp5wEuEV9FKJNM70,1789
2
- doppy-0.2.2.dist-info/WHEEL,sha256=HYZ_jUi0IGqtX7pjBFQby7ex6mkgDnUsBYfR-onY1Fw,105
3
- doppy-0.2.2.dist-info/entry_points.txt,sha256=9b_Ca7vJoh6AwL3W8qAPh_UmJ_1Pa6hi-TDfCTDjvSk,43
4
- doppy-0.2.2.dist-info/license_files/LICENSE,sha256=V-0iroMNMI8ctnLgUau1kdFvwhkYhr9vi-5kWKxw2wc,1089
5
- doppy-0.2.2.dist-info/license_files/LICENSE,sha256=V-0iroMNMI8ctnLgUau1kdFvwhkYhr9vi-5kWKxw2wc,1089
1
+ doppy-0.2.3.dist-info/METADATA,sha256=oQQ7h-pTzAIlKSN7C0vAqEw70QLwmzVjeuNwmvxMYGY,4142
2
+ doppy-0.2.3.dist-info/WHEEL,sha256=yeRC21W_lRgy51Xt7_Plp8suG9tGryQjlozuN-L_Ook,105
3
+ doppy-0.2.3.dist-info/entry_points.txt,sha256=9b_Ca7vJoh6AwL3W8qAPh_UmJ_1Pa6hi-TDfCTDjvSk,43
4
+ doppy-0.2.3.dist-info/license_files/LICENSE,sha256=V-0iroMNMI8ctnLgUau1kdFvwhkYhr9vi-5kWKxw2wc,1089
5
+ doppy-0.2.3.dist-info/license_files/LICENSE,sha256=V-0iroMNMI8ctnLgUau1kdFvwhkYhr9vi-5kWKxw2wc,1089
6
6
  doppy/options.py,sha256=73BDODO4OYHn2qOshhwz6u6G3J1kNd3uj6P0a3V4HBE,205
7
7
  doppy/__init__.py,sha256=Z9aEUlbPRWRUAoB8_-djkgrJuS4-6pjem4-mVSB6Z9I,191
8
8
  doppy/product/wind.py,sha256=mL8Ru7Hefq8YBYFIklBkySO3OEoRQ32ZPgB3deIhO7c,13042
@@ -20,10 +20,10 @@ doppy/data/api.py,sha256=QaVKj304OPcu8OF5xgtduQzDis8Srn-I6UgR9qb2u9E,1863
20
20
  doppy/data/exceptions.py,sha256=6CS6OHIWq8CqlxiceEvC1j0EfWUYoIfM7dW88apQVn4,89
21
21
  doppy/raw/halo_sys_params.py,sha256=IXH40xBHyXCGX0ZE79KnSeXRj1wbqoqL0RYUQyBJqdE,3937
22
22
  doppy/raw/__init__.py,sha256=AMHyONuH0aUJUQz20EhlANaq9UjWJtSZf7kWUVx3ZjA,228
23
- doppy/raw/wls70.py,sha256=paFT8PddRemtiDAXxkZVcMljCq_CFw1DHmxLHXY0ZhE,7008
23
+ doppy/raw/wls70.py,sha256=PMyr_JYTiKuYv1JpWHgVX6OA5zU83DOnr8vBCxFyFAw,7420
24
24
  doppy/raw/halo_bg.py,sha256=kO03yGlKS-DpMMGHYuy_BuidyeUL38TxT5vMn8H_8lE,4809
25
25
  doppy/raw/halo_hpl.py,sha256=VkWemJfGFu-tF-fkhjYwF6dCZPrNQanqL0NBFJVS-TQ,18485
26
26
  doppy/raw/windcube.py,sha256=ZaOswQJbVDPBYj5oU1pTYmsX8F-mKIbjJRZmLYEMXP0,9906
27
27
  doppy/__main__.py,sha256=zrKQJVj0k0ypBQCGK65Czt9G9FZ_qx3ussw6Q9VJ14g,346
28
- doppy/rs.abi3.so,sha256=a4gnkvN0EEc4EHB6pPJjDgQM3e5MgCtMspxgCsFdExM,2845104
29
- doppy-0.2.2.dist-info/RECORD,,
28
+ doppy/rs.abi3.so,sha256=uS-gr5NekphI-rQ6plXqpuEDCiEJXGUZfyvl5atqSKE,2844096
29
+ doppy-0.2.3.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.5.1)
2
+ Generator: maturin (1.6.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp310-abi3-macosx_10_12_x86_64
@@ -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
- [![CI](https://github.com/actris-cloudnet/doppy/actions/workflows/ci.yml/badge.svg)](https://github.com/actris-cloudnet/doppy/actions/workflows/ci.yml)
43
- [![PyPI version](https://badge.fury.io/py/doppy.svg)](https://badge.fury.io/py/doppy)
44
-