You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have 25 issues open on co-registration 馃檧, and a lot of notes and plans for the way forward dispersed everywhere. I initially tried to organize this in a project: https://github.com/orgs/GlacioHack/projects/3/views/2, but I think that the level of detail of the issues is too inconsistent for this, so I'm writing this summary instead!
Architecture:
We already did a lot in #158 and #329 to re-organize the coding structure to be more consistent and robust, but some points are left:
A detailed list in Re-organization of coreg.py聽#327 especially about cleaning + having consistent subfunctions of class methods + side-features (see next point),
Most of them are not too far since we introduced a consistent structure for optimizers or binning in #158. It makes weights almost directly supported (but we'll need to raise proper warnings for methods that currently ignore, such as ICP), and will make plotting more easy by consistently treating the type of methods (binning, fit, or both) and the dimensionality of the variables (1D, 2D, ND), which can be re-used for Tilt or NuthKaab fits in the affine functions.
Tests:
Some tests are still a bit old or slow, several related issues could be solved all at once:
For Coreg.fit, as a regression requires all samples at once, it cannot be combined from solutions of different chunks (except in a blockwise way using BlockwiseCoreg). So it's all about the subsample which is fairly easy to deal with (read subsample per chunk + return concatenated vector). There's also the computation of derivatives needed, which are also straightforward (slope using overlapping chunks, bias_vars using normal chunks), see the thoughts in Argument subsample does not work for a CoregPipeline聽#428 (comment). Most other methods residuals, plot can be based on the same logic as they use subsample.
It leaves the logic for Coreg.apply, which might not be trivial. For bias corrections, the solution from the optimized function is applicable independently to every pixel given their bias_vars (coordinates, angle, etc), so very easy to apply to chunk. However, for affine methods, applying a 3D affine matrix in 4x4 format lazily to independent chunks won't work directly... it would also require a definition of the rotation center of the matrix, and maybe other things... Any thoughts on how to address this @erikmannerfelt? Or maybe @friedrichknuth has some insights?
Bugs:
Here there's a lot, but they might solve themselves (or become irrelevant) after changing architecture + tests: #423, #422, #404, #326, #232, #193
Add basic architectural Tests to ensure 2. is working as intended with what we already have, and add new data for consistent (and quick!) tests (this specific point might require its own thread of discussion).
Add support for all new Features: should be made easier by the consistent architecture!
Add new Tests in parallel of each feature in 4.
See if the Bugs are still relevant, and fix them if they are! 馃槃
Celebrate, for we would have reached quite a way! 馃嵕
We currently have 25 issues open on co-registration 馃檧, and a lot of notes and plans for the way forward dispersed everywhere. I initially tried to organize this in a project: https://github.com/orgs/GlacioHack/projects/3/views/2, but I think that the level of detail of the issues is too inconsistent for this, so I'm writing this summary instead!
Architecture:
We already did a lot in #158 and #329 to re-organize the coding structure to be more consistent and robust, but some points are left:
coreg.py聽#327 especially about cleaning + having consistent subfunctions of class methods + side-features (see next point),fitandapply, and call methods depending on Point-Point, Point-Raster or Raster-Raster support, which would also completely solve Allow point clouds forCoreg聽#134.Features:
We've been needing for a while to have consistent:
coreg.py聽#327),coreg.py聽#327),random_stateargument toCoregclass forsubsamplecases聽#243, Allow custom subsampling for eachCoregPipelinestep separately.聽#137 and mainly the long discussion in Argumentsubsampledoes not work for aCoregPipeline聽#428.Most of them are not too far since we introduced a consistent structure for optimizers or binning in #158. It makes weights almost directly supported (but we'll need to raise proper warnings for methods that currently ignore, such as ICP), and will make plotting more easy by consistently treating the type of methods (binning, fit, or both) and the dimensionality of the variables (1D, 2D, ND), which can be re-used for
TiltorNuthKaabfits in the affine functions.Tests:
Some tests are still a bit old or slow, several related issues could be solved all at once:
pytest.fixtureto provide consistent test data across all test modules?聽#427,numbaduring CI tests to get adequate coverage stats聽#358 (comment).Performance:
鈿狅笍 We really need to think ahead for a structure that will allow memory-efficient computations using Dask:
rioxarray, and Add Xarray accessorgu聽geoutils#383 and Add Xarray accessordem聽#392, so not too much to think about!Coreg.fit, as a regression requires all samples at once, it cannot be combined from solutions of different chunks (except in a blockwise way usingBlockwiseCoreg). So it's all about thesubsamplewhich is fairly easy to deal with (read subsample per chunk + return concatenated vector). There's also the computation of derivatives needed, which are also straightforward (slope using overlapping chunks, bias_vars using normal chunks), see the thoughts in Argumentsubsampledoes not work for aCoregPipeline聽#428 (comment). Most other methodsresiduals,plotcan be based on the same logic as they usesubsample.Coreg.apply, which might not be trivial. For bias corrections, the solution from the optimized function is applicable independently to every pixel given theirbias_vars(coordinates, angle, etc), so very easy to apply to chunk. However, for affine methods, applying a 3D affine matrix in 4x4 format lazily to independent chunks won't work directly... it would also require a definition of the rotation center of the matrix, and maybe other things... Any thoughts on how to address this @erikmannerfelt? Or maybe @friedrichknuth has some insights?CoregPipeline.apply()and.fit()performance by merging matrices聽#79,Coregpre-processing for performance聽#437.Bugs:
Here there's a lot, but they might solve themselves (or become irrelevant) after changing architecture + tests:
#423, #422, #404, #326, #232, #193
Idea of plan moving forward:
subsampledoes not work for aCoregPipeline聽#428 (comment). I think we can use the structure proposed there which should work eventually 馃! Forapply, this should be adaptable down the line...BiasCorrclasses and rename previouscoreg.BiasCorrincoreg.VerticalShift聽#158 and Re-organize coreg.py聽#329.Any thoughts @adehecq @erikmannerfelt? 馃槃