Spectral Convolution SavitzkyGolay1DKernel does not pass data ignore value (nodata) to output image

Issue #687 resolved
Matthias Wocher created an issue

Execution of the tool causes the images' data ignore value to be set to ‘nan’ which might be (is) a problem for subsequent processing algorithms. The original data ignore value by ENVI standard should be passed to the filters output image.
This might be a problem of other filter processing algorithms in the EnMap-Box too but I did not test it.

Comments (7)

  1. Andreas Janz
    1. I agree that nan is not a good no data value.
    2. Using the original no data value is not always a good idea. I would rather use the smallest float value as no data.

  2. Matthias Wocher reporter

    The smallest float might also be a problem since that would probably be ‘0.0’ and pixels without reflectance would convert to nodata pixels. Why is passing the original nodata value problem?

  3. Andreas Janz

    Smallest 32-bit float value would be -3.4028235e+38

    >>>np.finfo(np.float32)
    np.finfo(resolution=1e-06, min=-3.4028235e+38, max=3.4028235e+38, dtype=float32)
    

  4. Andreas Janz

    Why is passing the original nodata value problem?

    If you e.g. use SavGol for calculating the first derivative, the original no data value may be in the valid data range, which may not be a big problem, but I guess using the smallest float32 value is a better choice in general.

  5. Log in to comment