From 9251992519da8b1ee138b461d3eed8d811387fce Mon Sep 17 00:00:00 2001 From: Chris Holden Date: Fri, 6 Dec 2024 15:59:27 -0500 Subject: [PATCH] lint --- hls_vi/generate_indices.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hls_vi/generate_indices.py b/hls_vi/generate_indices.py index 26abbc2..d6590e5 100644 --- a/hls_vi/generate_indices.py +++ b/hls_vi/generate_indices.py @@ -361,7 +361,12 @@ class Index(Enum): SAVI = ("Soil-Adjusted Vegetation Index",) TVI = ("Triangular Vegetation Index", 0.01) - def __init__(self, long_name: str, scale_factor: SupportsFloat = 0.0001, fill_value: int = -19_999) -> None: + def __init__( + self, + long_name: str, + scale_factor: SupportsFloat = 0.0001, + fill_value: int = -19_999, + ) -> None: function_name = self.name.lower() index_function: Optional[IndexFunction] = globals().get(function_name) @@ -381,9 +386,7 @@ def __call__(self, data: BandData) -> np.ma.masked_array: # the min/max bounds of an int16 to prevent values wrapping around int16_info = np.iinfo("int16") scaled_index = np.ma.clip( - scaled_index, - a_min=int16_info.min, - a_max=int16_info.max + scaled_index, a_min=int16_info.min, a_max=int16_info.max ) # We need to round to whole numbers (i.e., 0 decimal places, which is