Open quinto-clara opened 2 weeks ago
OK! For the "Tests" section: we could also verify that apply()
running on a chunk with NaNs saved in fit()
indeed does not apply any transformation.
Another point: I am not sure that the current implementation of BlockwiseCoreg
runs for a coregistration method other than a translation (as its implementation precedes those). A rotation like ICP
or any BiasCorr
method might make it fail.
It would be nice to quickly double-check that (which is a simple as adding other methods to this list in the tests here: https://github.com/GlacioHack/xdem/blob/595acb9bf2ba150232cf161fc09f8747c84b5602/tests/test_coreg/test_base.py#L865
If it does not work, we could verify if the new structure or a slight change in structure would allow all types of methods to run (it's a slightly different topic, it may be independent if we only modify the statistics here, but could be slightly entangled too)... :thinking:
And, in any case, if these methods are not supported, we should temporarily add a NotImplementedError
during BlockwiseCoreg.__init__
for those methods. I might do that quick test + error raising in a separate PR if I find the time later this week.
Context
The purpose of this ticket is to implement a failure indication in the returns of the
blockwise
function regarding the statistics. However, data storage does not seem to be intuitive, which is why we will include a code exploration phase in this ticket.Study
Implementation
Code Modification:
We will modify the section of the code where the statistics are collected. For points that fail (i.e., those not present in
chunk_meta
), we will storeNaN
values for the relevant statistics.Here is the modified code:
Tests
Unit Tests:
chunk_meta
), the valuesinlier_count
,nmad
, andmedian
returnNaN
.chunk_meta
.Integration Tests:
blockwise
function as a whole to ensure that there are no regressions in other parts of the code.NaN
values without causing errors.Documentation
blockwise
function to mention the changes made to the return statistics, including the meaning ofNaN
values./ estimation 5d