Summary
The noise range lookup-table returned only 0s that were replaced by np.nans in get_noise_range_vectors, which led to an error in InterpolatedUnivariateSpline.
Setup
Machine: Kubuntu 22.04, 8 x 11th Gen Intel Core i5, 15.4 GiB of RAM.
Program: Python 3.8.15
Tested remove_thermal_noise and remove_texture_noise
Error
An error was raised in remove_texture_noise and remove_thermal_noise.
The investigation implies:
The error was caused by the InterpolatedUnivariateSpline method called in get_shifted_noise_vectors.
InterpolatedUnivariateSpline failed because empty vectors were passed to it.
The vectors were empty because the noise vector at this azimuth and range had only np.nans.
The noise vector had only np.nans because the noiseRangeVector had zeros that had been replaced by np.nans in get_noise_range_vectors. The corresponding line is 153 in sentinel1image: n[n == 0] = np.nan.
Among 16673 pixels, 176 were np.nan in the noise vector filled in get_noise_range_vectors.
Side note
Processing HH of this product did not cause any error
Processing HV and HH of a different product on the same date and in the same geographic region did not cause any error S1A_EW_GRDM_1SDH_20160912T033838_20160912T033942_013014_0149C3_BCC8.SAFE (descending)
Suggestions
A. Quick fix: Introduce an error handling that catches the exception raised by InterpolatedUnivariateSpline.
B. Root cause: Find out why noiseRangeVector['noiseRangeLut'] has 0s and either address it and/or do A.
Thanks for the great work and the neat package.
Summary The noise range lookup-table returned only 0s that were replaced by
np.nan
s inget_noise_range_vectors
, which led to an error inInterpolatedUnivariateSpline
.Setup Machine: Kubuntu 22.04, 8 x 11th Gen Intel Core i5, 15.4 GiB of RAM. Program: Python 3.8.15
Processing
remove_thermal_noise
andremove_texture_noise
Error An error was raised in
remove_texture_noise
andremove_thermal_noise
. The investigation implies:InterpolatedUnivariateSpline
method called inget_shifted_noise_vectors
.InterpolatedUnivariateSpline
failed because empty vectors were passed to it.np.nan
s.np.nan
s because thenoiseRangeVector
had zeros that had been replaced bynp.nan
s inget_noise_range_vectors
. The corresponding line is 153 insentinel1image
:n[n == 0] = np.nan
.np.nan
in thenoise
vector filled inget_noise_range_vectors
.Side note
Processing HV and HH of a different product on the same date and in the same geographic region did not cause any error S1A_EW_GRDM_1SDH_20160912T033838_20160912T033942_013014_0149C3_BCC8.SAFE (descending)
Suggestions A. Quick fix: Introduce an error handling that catches the exception raised by
InterpolatedUnivariateSpline
. B. Root cause: Find out why noiseRangeVector['noiseRangeLut'] has 0s and either address it and/or do A.