Skip to content

Commit

Permalink
Add quiet, load before tmpdir erases, note the invalid mask extension
Browse files Browse the repository at this point in the history
  • Loading branch information
scottstanie committed Jan 2, 2025
1 parent ada4d0d commit e3bbb00
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/dolphin/filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,23 @@ def filter_long_wavelength(
max_distance=max_distance_pixels,
smoothing_iterations=0,
interpolation="nearest",
quiet=True,
)

filled_data = io.load_gdal(temp_dst, masked=True)
filled_data = io.load_gdal(temp_dst, masked=True)

padded = filled_data

# We need to find the new pixels which are valid after filling
# These are going to be out of bounds in the original image,
# but we don't want to ignore them during the low pass filter.
# The boundary pixels are the ones which will allow the edge values
# to be smoothed out without.
new_valid = np.isnan(displacement) & ~np.isnan(filled_data)

bad_pixel_mask_ext = bad_pixel_mask.copy()
bad_pixel_mask_ext[new_valid] = False

# # Remove the plane, setting to 0 where we had no data for the plane fit:
# unw_ifg_interp = np.where(total_valid_mask, displacement, 0)

Expand Down

0 comments on commit e3bbb00

Please sign in to comment.