-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Nan padding in blockwise coregistration stats #663
Conversation
18c0d76
to
f297c05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two requests :
- The index used for the loop that build statistics needs to be changed
- The center_x, center_y and center_z values needs to be kept when a chunk fails
4c03b3b
to
936e20b
Compare
936e20b
to
2e0da0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BlockwiseCoreg
method handles now missing data, improving robustness of the stats
method.
The changes regarding the the two previous requests are approved :
-
The index used for the loop that build statistics is now correct. All the chunks, even failed ones are taken into account.
-
The center_x and center_y values are now kept when a chunk fails. Thus we can show where the NaN values are :
Example with 64 subdivisions and an altered DEM :
Example with 65 subdivisions (no altered DEM). We can visualize which chunk failed :
Great! Tagging @erikmannerfelt (who largely coded |
Thanks @rhugonnet, Yes, it’s temporary, just until we find a solution to avoid putting the CNES copyright on code it didn’t develop. |
Resolves #604
Description
This PR introduces several bug fixes to the
BlockwiseCoreg
functionnality, focusing on handling missing data and improving robustness in thestats
method.Key changes
In the section of the code where the statistics are collected, for chunks that fail (i.e., where points are not present in
chunk._meta
), the center coordinates are retrieved, andNaN
values are now stored for the relevant statistics, replacing the absence of values.Example of the
BlockwiseCoreg.stats()
method output with failing chunks 0 and 1:Tests
NaN
padding is applied if a chunk fails.BlockwiseCoreg.stats
when all chunks are processed successfully.test_blockwise_coreg_large_gaps
test to ensure that the len ofstats
is the same than the number of subdivision (i.e. each chunk has stats, even if the chunk fails ->NaN
stats).Documentation
Updated the docstring for
BlockwiseCoreg.stats
to reflect theNaN
padding when a chunck fails.