cloudnetpy-qc 1.28.2__py3-none-any.whl → 1.30.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.
cloudnetpy_qc/coverage.py CHANGED
@@ -16,6 +16,7 @@ RESOLUTIONS = {
16
16
  Product.WEATHER_STATION: datetime.timedelta(minutes=10),
17
17
  Product.RAIN_GAUGE: datetime.timedelta(minutes=1),
18
18
  Product.DOPPLER_LIDAR_WIND: datetime.timedelta(hours=1.5),
19
+ Product.CPR_VALIDATION: datetime.timedelta(hours=1.5),
19
20
  }
20
21
  DEFAULT_RESOLUTION = datetime.timedelta(seconds=30)
21
22
 
@@ -42,7 +43,7 @@ def data_coverage(
42
43
  bins = max(1, duration // expected_res)
43
44
  hist, _ = np.histogram(time, bins=bins, range=(0, duration / time_unit))
44
45
  coverage = np.count_nonzero(hist > 0) / len(hist)
45
- actual_res = np.median(np.diff(time)) * time_unit
46
+ actual_res = float(np.median(np.diff(time))) * time_unit
46
47
  return coverage, expected_res, actual_res
47
48
 
48
49