-
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
Add Option to Disable Vertical Shift in Nuth and Kääb Coregistration #687
Conversation
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.
Could you please add some unit tests ?
Hello @rhugonnet , Does this ticket suit you as it is? (with unit tests added) |
@adebardo I added a test to ensure that the vertical shift is 0 if |
@adebardo You mean it's not disabled because we still remove the vertical median here? Line 476 in a147a5f
Hmm... by having the modification within the If the objective is simply not to apply a vertical shift, should we update this line instead directly in the Line 1397 in a147a5f
with The behaviour should be the same, and we wouldn't have to modify anything but this line. |
Or, I'm just realizing now, were you worried about the fact that the logging info would show a vertical shift at each iteration if the vertical shift is not modified within the function? |
Ah and finally we should add the parameter The steps are simply:
(For the record, there's a wiki on coregistration with all steps described here: https://github.com/GlacioHack/xdem/wiki/Things-to-know-on-coregistration-class-structure#steps-to-add-a-new-coreg-subclass) |
@rhugonnet Thank you for the instructions ! I added the parameter |
I don't know how to use github very well, sorry
Resolves #686.
Summary
This PR introduces a new feature to the Nuth and Kääb (2011) coregistration method, allowing users to optionally disable the vertical shift during the coregistration process. A new boolean parameter
apply_vertical_shift
has been added to control whether the vertical translation (shift in the z-axis) should be applied.Key Changes
apply_vertical_shift
to the constructor of the NuthKaab class, defaulting to True to maintain the current behavior (vertical shift enabled by default)._nuth_kaab_iteration_step
to conditionally apply the vertical shift based on the value ofapply_vertical_shift
.If the parameter is not provided, the default behavior (applying the vertical shift) remains unchanged, ensuring no impact on existing usage.
Usage example
in

coreg_method.info()
: