Skip to content

Commit

Permalink
corrections for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
EliaCovi committed Dec 12, 2024
1 parent 29e7bf8 commit b089166
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mergeplg/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,9 @@ def adjust(self, da_rad, da_cml=None, da_gauge=None):
rad, obs, x0 = self.radar_at_ground_(da_rad, da_cml=da_cml, da_gauge=da_gauge)

Check warning on line 495 in src/mergeplg/merge.py

View check run for this annotation

Codecov / codecov/patch

src/mergeplg/merge.py#L495

Added line #L495 was not covered by tests

# Calculate radar-instrument difference if radar has observation
maskZero = rad > 0
mask_zero = rad > 0
diff = np.full_like(obs, np.nan, dtype=np.float64)
diff[maskZero] = obs[maskZero] / rad[maskZero]
diff[mask_zero] = obs[mask_zero] / rad[mask_zero]

Check warning on line 500 in src/mergeplg/merge.py

View check run for this annotation

Codecov / codecov/patch

src/mergeplg/merge.py#L498-L500

Added lines #L498 - L500 were not covered by tests

# filter out diff values and nans
keep = np.where((~np.isnan(diff)) & (diff < np.nanquantile(diff, 0.95)))[0]

Check warning on line 503 in src/mergeplg/merge.py

View check run for this annotation

Codecov / codecov/patch

src/mergeplg/merge.py#L503

Added line #L503 was not covered by tests
Expand Down

0 comments on commit b089166

Please sign in to comment.