cloudnetpy 1.69.1__py3-none-any.whl → 1.69.2__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.
@@ -224,6 +224,23 @@ class VaisalaCeilo(Ceilometer):
224
224
  values = [[line[0], line[1], line[3:20], line[21:].strip()] for line in lines]
225
225
  return values_to_dict(fields, values)
226
226
 
227
+ def _sort_time(self) -> None:
228
+ """Sorts timestamps and removes duplicates."""
229
+ time = np.copy(self.data["time"][:])
230
+ ind_sorted = np.argsort(time)
231
+ ind_valid: list[int] = []
232
+ for ind in ind_sorted:
233
+ if time[ind] not in time[ind_valid]:
234
+ ind_valid.append(ind)
235
+ n_time = len(time)
236
+ for key, array in self.data.items():
237
+ if not hasattr(array, "shape"):
238
+ continue
239
+ if array.ndim == 1 and array.shape[0] == n_time:
240
+ self.data[key] = self.data[key][ind_valid]
241
+ if array.ndim == 2 and array.shape[0] == n_time:
242
+ self.data[key] = self.data[key][ind_valid, :]
243
+
227
244
 
228
245
  class ClCeilo(VaisalaCeilo):
229
246
  """Base class for Vaisala CL31/CL51 ceilometers."""
@@ -253,23 +270,6 @@ class ClCeilo(VaisalaCeilo):
253
270
  self._store_ceilometer_info()
254
271
  self._sort_time()
255
272
 
256
- def _sort_time(self) -> None:
257
- """Sorts timestamps and removes duplicates."""
258
- time = np.copy(self.data["time"][:])
259
- ind_sorted = np.argsort(time)
260
- ind_valid: list[int] = []
261
- for ind in ind_sorted:
262
- if time[ind] not in time[ind_valid]:
263
- ind_valid.append(ind)
264
- n_time = len(time)
265
- for key, array in self.data.items():
266
- if not hasattr(array, "shape"):
267
- continue
268
- if array.ndim == 1 and array.shape[0] == n_time:
269
- self.data[key] = self.data[key][ind_valid]
270
- if array.ndim == 2 and array.shape[0] == n_time:
271
- self.data[key] = self.data[key][ind_valid, :]
272
-
273
273
  def _store_ceilometer_info(self) -> None:
274
274
  n_gates = self.data["beta_raw"].shape[1]
275
275
  if n_gates < 1540:
@@ -335,6 +335,7 @@ class Ct25k(VaisalaCeilo):
335
335
  self.data["calibration_factor"] = calibration_factor or 1.0
336
336
  self.data["beta_raw"] *= self.data["calibration_factor"]
337
337
  self.data["zenith_angle"] = np.median(self.metadata["zenith_angle"])
338
+ self._sort_time()
338
339
 
339
340
  @staticmethod
340
341
  def _parse_hex_profiles(lines: list) -> list:
cloudnetpy/version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  MAJOR = 1
2
2
  MINOR = 69
3
- PATCH = 1
3
+ PATCH = 2
4
4
  __version__ = f"{MAJOR}.{MINOR}.{PATCH}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cloudnetpy
3
- Version: 1.69.1
3
+ Version: 1.69.2
4
4
  Summary: Python package for Cloudnet processing
5
5
  Author: Simo Tukiainen
6
6
  License: MIT License
@@ -9,7 +9,7 @@ cloudnetpy/metadata.py,sha256=gEHwqEMY9gfaqVxx2_CobLg3i5gFXAumXLwnnW4BqtU,5840
9
9
  cloudnetpy/output.py,sha256=lq4YSeMT_d-j4rlQkKm9KIZ8boupTBBBKV1eUawpmCI,15672
10
10
  cloudnetpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  cloudnetpy/utils.py,sha256=U0iMIKPiKLrLVAfs_u9pPuoWYW1RJHcM8dbLF9a4yIA,29796
12
- cloudnetpy/version.py,sha256=pFeW4Wzfw3a64XhtkMDkuR0DY_1U2RuZ8jQjlU8NQoY,72
12
+ cloudnetpy/version.py,sha256=kxk8PWJBfD_V00eDZ4TB8QpJ5of0aDtwt7yHrIjjZeU,72
13
13
  cloudnetpy/categorize/__init__.py,sha256=s-SJaysvVpVVo5kidiruWQO6p3gv2TXwY1wEHYO5D6I,44
14
14
  cloudnetpy/categorize/atmos_utils.py,sha256=RcmbKxm2COkE7WEya0mK3yX5rzUbrewRVh3ekm01RtM,10598
15
15
  cloudnetpy/categorize/attenuation.py,sha256=Y_-fzmQTltWTqIZTulJhovC7a6ifpMcaAazDJcnMIOc,990
@@ -54,7 +54,7 @@ cloudnetpy/instruments/rain_e_h3.py,sha256=IY-ytMjQUV94qMQgIXMJsPXe6oF3yk-d9LIbN
54
54
  cloudnetpy/instruments/rpg.py,sha256=vfs_eGahPOxFjOIBczNywRwtdutOsJpSNeXZm99SIOo,17438
55
55
  cloudnetpy/instruments/rpg_reader.py,sha256=ThztFuVrWxhmWVAfZTfQDeUiKK1XMTbtv08IBe8GK98,11364
56
56
  cloudnetpy/instruments/toa5.py,sha256=CfmmBMv5iMGaWHIGBK01Rw24cuXC1R1RMNTXkmsm340,1760
57
- cloudnetpy/instruments/vaisala.py,sha256=GGuA_v4S7kR9yApSr1-d0ETzNj4ehEZ7-pD1-AdPYRE,14662
57
+ cloudnetpy/instruments/vaisala.py,sha256=MA6hAlanFrxJlF4suDxLt5FyjcSSzJg-SWRnkLQpu3E,14688
58
58
  cloudnetpy/instruments/weather_station.py,sha256=jSu9sY2LYV1ssWcuLr6kiF8EEqGW29mywE9UUZccac0,18720
59
59
  cloudnetpy/instruments/disdrometer/__init__.py,sha256=lyjwttWvFvuwYxEkusoAvgRcbBmglmOp5HJOpXUqLWo,93
60
60
  cloudnetpy/instruments/disdrometer/common.py,sha256=g52iK2aNp3Z88kovUmGVpC54NZomPa9D871gzO0AmQ4,9267
@@ -116,9 +116,9 @@ cloudnetpy/products/mie_lu_tables.nc,sha256=It4fYpqJXlqOgL8jeZ-PxGzP08PMrELIDVe5
116
116
  cloudnetpy/products/mwr_tools.py,sha256=rd7UC67O4fsIE5SaHVZ4qWvUJTj41ZGwgQWPwZzOM14,5377
117
117
  cloudnetpy/products/product_tools.py,sha256=uu4l6reuGbPcW3TgttbaSrqIKbyYGhBVTdnC7opKvmg,11101
118
118
  docs/source/conf.py,sha256=IKiFWw6xhUd8NrCg0q7l596Ck1d61XWeVjIFHVSG9Og,1490
119
- cloudnetpy-1.69.1.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
120
- cloudnetpy-1.69.1.dist-info/METADATA,sha256=qZFPRPyi7praz82q6Fht36hury-NYSrjwEk1Im8jdZE,5793
121
- cloudnetpy-1.69.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
122
- cloudnetpy-1.69.1.dist-info/entry_points.txt,sha256=HhY7LwCFk4qFgDlXx_Fy983ZTd831WlhtdPIzV-Y3dY,51
123
- cloudnetpy-1.69.1.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
124
- cloudnetpy-1.69.1.dist-info/RECORD,,
119
+ cloudnetpy-1.69.2.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
120
+ cloudnetpy-1.69.2.dist-info/METADATA,sha256=CPzESCxmNHXYoaTXc39qwMDmK8n_edhp7Q7zDeTN1KQ,5793
121
+ cloudnetpy-1.69.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
122
+ cloudnetpy-1.69.2.dist-info/entry_points.txt,sha256=HhY7LwCFk4qFgDlXx_Fy983ZTd831WlhtdPIzV-Y3dY,51
123
+ cloudnetpy-1.69.2.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
124
+ cloudnetpy-1.69.2.dist-info/RECORD,,