Skip to content

Commit

Permalink
fill value
Browse files Browse the repository at this point in the history
  • Loading branch information
ramarty committed Dec 20, 2023
1 parent 344f9c1 commit 938a3fc
Show file tree
Hide file tree
Showing 2 changed files with 1,417 additions and 543 deletions.
1,950 changes: 1,411 additions & 539 deletions examples/quality-assessment.ipynb

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions src/blackmarble/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,13 @@ def h5_to_geotiff(
data = dataset[:]

data = np.where(data == fill_value, np.nan, data)
data = scale_factor * dataset[:] + offset
qf = qf[:]
data = scale_factor * data + offset

for val in quality_flag_rm:
data = np.where(qf == val, np.nan, data)
if len(quality_flag_rm) > 0:
qf = qf[:]

for val in quality_flag_rm:
data = np.where(qf == val, np.nan, data)

# Get geospatial metadata (coordinates and attributes)
height, width = data.shape
Expand Down

0 comments on commit 938a3fc

Please sign in to comment.