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
Hi,
I was about to co register some IceSat2 data with a reference raster using the NuthKaab Method. When I used the apply method of the co-registration object it seems to shift the points in the opposite direction.
Syntax I used looks like this:
I don't see a reason why the shift for points is stored in pixels. From what I see, the if condition here is unnecessary and deleting it will let the test I created run smoothly. Also it is a little confusing with the signs. They actually should be there so it makes sense. But, since the signs are opposite in the _apply_pts function they don't need to be taken care off in _fit_rst_pts.
It was a bit hard to get my head around this and it would be probably better to have the apply method consistent for points and rasters as well as for height and lateral shift.
This could also concern other co registration methods, where the exact same lines are found.
I hope I didn't get anything wrong with the syntax and the behavior was intended as I assumed.
The text was updated successfully, but these errors were encountered:
I did have some doubts about the points methods for the affine classes, given how poor the tests were when this was added a year ago 😅, which I why I opened this: #485 and tried to not document it in the documentation before solving it.
I have been tackling it here in the past weeks: #530, where I've deleted all _apply_ functions for Affine classes, which means the code will always use consistently the same apply_matrix function that is tested quite thoroughly :).
I still need to finalize a couple other aspects, and add the same robust test suite as for point-raster methods in BiasCorr, and then it should all be good.
Good catch for the offset error! This might have been a mistake from me in the recent re-work of the Coreg metadata (#526), which would have come up if the point tests for Affine classes were better 😅
I'm leaving for long holidays at the end of the week, so I might not have the time and only pick that up again in August. If so, I'll try to take an hour or two to at least fix this issue specifically 😉
Hi,
I was about to co register some IceSat2 data with a reference raster using the NuthKaab Method. When I used the apply method of the co-registration object it seems to shift the points in the opposite direction.
Syntax I used looks like this:
Unfortunately, test_coreg_example_shift in test_affine .py does not capture this error, so edited it a little to make the bug reproducible:
I traced the cause of this behavior to coreg/affine.py in the method : NuthKaab._fit_rst_pts.
In line 1014 to 1015 there is the following code:
I don't see a reason why the shift for points is stored in pixels. From what I see, the if condition here is unnecessary and deleting it will let the test I created run smoothly. Also it is a little confusing with the signs. They actually should be there so it makes sense. But, since the signs are opposite in the _apply_pts function they don't need to be taken care off in _fit_rst_pts.
It was a bit hard to get my head around this and it would be probably better to have the apply method consistent for points and rasters as well as for height and lateral shift.
This could also concern other co registration methods, where the exact same lines are found.
I hope I didn't get anything wrong with the syntax and the behavior was intended as I assumed.
The text was updated successfully, but these errors were encountered: