Skip to content

Commit

Permalink
remove un-needed variables
Browse files Browse the repository at this point in the history
  • Loading branch information
forrestfwilliams committed Jan 25, 2024
1 parent 516fe03 commit c11d8db
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/asf_tools/opera_rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

gdal.UseExceptions()

BROWSE_IMAGE_MIN_PERCENTILE = 3
BROWSE_IMAGE_MAX_PERCENTILE = 97


def normalize_browse_image_band(band_image: np.ndarray) -> np.ndarray:
"""Normalize a single band of a browse image to remove outliers.
Expand All @@ -23,8 +20,8 @@ def normalize_browse_image_band(band_image: np.ndarray) -> np.ndarray:
Returns:
A normalized numpy array.
"""
vmin = np.nanpercentile(band_image, BROWSE_IMAGE_MIN_PERCENTILE)
vmax = np.nanpercentile(band_image, BROWSE_IMAGE_MAX_PERCENTILE)
vmin = np.nanpercentile(band_image, 3)
vmax = np.nanpercentile(band_image, 97)

# gamma correction: 0.5
is_not_negative = band_image - vmin >= 0
Expand Down

0 comments on commit c11d8db

Please sign in to comment.