Skip to content

Commit 5769c05

Browse files
authored
Merge pull request #107 from GeoscienceAustralia/dem_update2
dem_h to dem_s transition: updated `starts_da` variable in connectivity function to use 0 m elevations instead of nodata pixels
2 parents ff6ab8c + 576589d commit 5769c05

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

intertidal/extents.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ def load_connectivity_mask(
224224
print("Adding GMW mangroves to starting points")
225225
try:
226226
gmw_da = load_gmw_mask(dem_da)
227-
starts_da = (dem_da == dem_da.nodata) | gmw_da
227+
starts_da = (dem_da == 0) | gmw_da
228228
except Exception as e:
229229
print(f"No valid GMW mangroves found: {e}")
230-
starts_da = dem_da == dem_da.nodata
230+
starts_da = dem_da == 0
231231
else:
232-
starts_da = dem_da == dem_da.nodata
232+
starts_da = dem_da == 0
233233

234234
# Raise error if no valid starting points
235235
if not starts_da.any():

tests/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Integration tests
1010
1111
This directory contains tests that are run to verify that DEA Intertidal code runs correctly. The ``test_intertidal.py`` file runs a small-scale full workflow analysis over an intertidal flat in the Gulf of Carpentaria using the DEA Intertidal [Command Line Interface (CLI) tools](../notebooks/Intertidal_CLI.ipynb), and compares these results against a LiDAR validation DEM to produce some simple accuracy metrics.
1212

13-
The latest integration test completed at **2025-02-26 12:17**. Compared to the previous run, it had an:
13+
The latest integration test completed at **2025-03-17 15:59**. Compared to the previous run, it had an:
1414
- RMSE accuracy of **0.14 m ( :heavy_minus_sign: no change)**
1515
- MAE accuracy of **0.12 m ( :heavy_minus_sign: no change)**
1616
- Bias of **0.12 m ( :heavy_minus_sign: no change)**

tests/validation.csv

+1
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@ time,Correlation,RMSE,MAE,R-squared,Bias,Regression slope
7575
2025-02-14 02:17:10.429447+00:00,0.975,0.145,0.123,0.95,0.117,1.119
7676
2025-02-17 03:17:15.481317+00:00,0.975,0.145,0.123,0.95,0.117,1.119
7777
2025-02-26 01:17:17.566788+00:00,0.975,0.145,0.123,0.95,0.117,1.119
78+
2025-03-17 04:59:10.880279+00:00,0.975,0.145,0.123,0.95,0.117,1.119

tests/validation.jpg

-244 Bytes
Loading

0 commit comments

Comments
 (0)