Skip to content

Commit

Permalink
FIX: Remove useless _norm_diff function indices.py
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-braun committed Nov 18, 2024
1 parent 224a4cd commit 2193f6a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 0.21.8 (2024-mm-dd)

- ENH: Add a new type (`BandsType`) for list of BandType
- FIX: Remove useless `_norm_diff` function `indices.py`
- DOC: Update `conf.py` (remove useless hunks and set Sphinx 7 as base)

## 0.21.7 (2024-11-08)
Expand Down
16 changes: 0 additions & 16 deletions eoreader/bands/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,22 +175,6 @@ def _compute_params(_bands, **_kwargs):
return rasters.set_metadata(out_xda, first_xda, new_name=index)


def _norm_diff(band_1: xr.DataArray, band_2: xr.DataArray) -> xr.DataArray:
"""
Get normalized difference index between band 1 and band 2:
(band_1 - band_2)/(band_1 + band_2)
Args:
band_1 (xr.DataArray): Band 1
band_2 (xr.DataArray): Band 2
Returns:
xr.DataArray: Normalized Difference between band 1 and band 2
"""
norm = (band_1 - band_2) / (band_1 + band_2)
return norm


@_idx_fct
def TCBRI(bands: dict) -> xr.DataArray:
"""
Expand Down

0 comments on commit 2193f6a

Please sign in to comment.