Conversation
…issing radar samples
fill_value Parameter to GeocodeCov CPU modulefill_value parameter to GeocodeCov CPU module
|
We just met to review this PR, and it was decided that we should add a warning message to alert the user when casting the data or fill value to the output raster type changes the data or fill value. In addition, the docstring for |
fill_value parameter to GeocodeCov CPU modulefill_value parameter to GeocodeCov CPU module
@hfattahi , @bhawkins , and @nemo794 . I implemented all the suggestions from our PR review meeting. I can’t pinpoint specific commits because the changes are spread across several commits. The changes are:
Would you mind taking another look at this PR? |
Co-authored-by: Brian Hawkins <1729052+bhawkins@users.noreply.github.com>
hfattahi
left a comment
There was a problem hiding this comment.
looks good to me overall. Good functionality added. I have one minor question below
| << "which is not natively supported by the GeocodeCov " | ||
| << "module. The data values and fill value will therefore " | ||
| << "be cast to an integer type by isce3::io::Raster. " | ||
| << "NaN values will be cast to 0." |
There was a problem hiding this comment.
Can you clarify what do you mean exactly here? Do you intend to provide a warning that the geocoding is done by casting integer to float and then the final geocoded value will be cast to integer by isce3::io::Raster, during writing the output?
This PR adds the
fill_valueparameter to theGeocodeCovCPU module. It is inspired by #337 and sets the fill value of the layover/shadow mask layer in the Static Layers (STATIC) product to255, instead of the default value of0. Details about the issue and the discussion can be found in that PR.The C++ and Python interfaces have been updated with the new parameter. The two CPU geocoding algorithms, interpolation and area projection, have also been updated to account for the new parameter. For the interpolation algorithm, the array is first filled with
fill_valuebefore interpolation occurs. In contrast, for the area projection algorithm,fill_valueis applied after multilooking. This is necessary because the area projection algorithm accumulates averaged values (multilooked backscatter), and applyingfill_valuebefore data accumulation could cause it to be interpreted as a valid value.