Skip to content

Commit

Permalink
Change default of tpi inner radious to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
relativityhd committed Nov 21, 2024
1 parent f6bcda1 commit 8aaf812
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ arcticdem-dir = "data/download/arcticdem"
cache-dir = "data/download"

[darts.preprocess]
tpi-outer-radius = 30
tpi-inner-radius = 25
tpi-outer-radius = 32 # px. Original implementation was 100m (100 / 3.125 = 32)
tpi-inner-radius = 0

[darts.segmentation]
patch-size = 1024
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@


def calculate_topographic_position_index(
arcticdem_ds: xr.Dataset, outer_radius: int = 30, inner_radius: int = 25
arcticdem_ds: xr.Dataset, outer_radius: int = 30, inner_radius: int = 0
) -> xr.Dataset:
"""Calculate the Topographic Position Index (TPI) from an ArcticDEM Dataset.
Args:
arcticdem_ds (xr.Dataset): The ArcticDEM Dataset containing the 'dem' variable.
outer_radius (int, optional): The outer radius of the annulus kernel in number of cells. Defaults to 30.
inner_radius (int, optional): The inner radius of the annulus kernel in number of cells. Defaults to 25.
inner_radius (int, optional): The inner radius of the annulus kernel in number of cells. Defaults to 0.
Returns:
xr.Dataset: The input Dataset with the calculated TPI added as a new variable 'tpi'.
Expand Down

0 comments on commit 8aaf812

Please sign in to comment.