Skip to content

Commit

Permalink
better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jhkennedy committed Oct 24, 2023
1 parent 30fdee7 commit b04276d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/asf_tools/hydrosar/flood_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ def estimate_flood_depth(label: int, hand: np.ndarray, flood_labels: np.ndarray,
warnings.filterwarnings('ignore', r'Mean of empty slice')

if estimator.lower() == "iterative":
log.info(f'Skipping waterbodies less than {iterative_min_size} pixels.')
if (flood_labels == label).sum() < iterative_min_size:
return np.nan

Expand Down Expand Up @@ -224,6 +223,8 @@ def make_flood_map(out_raster: Union[str, Path], vv_raster: Union[str, Path],
labeled_flood_mask, num_labels = ndimage.label(flood_mask)
object_slices = ndimage.find_objects(labeled_flood_mask)
log.info(f'Detected {num_labels} waterbodies...')
if estimator.lower() == 'iterative':
log.info(f'Skipping waterbodies less than {iterative_min_size} pixels.')

flood_depth = np.zeros(flood_mask.shape)

Expand Down

0 comments on commit b04276d

Please sign in to comment.