-
Notifications
You must be signed in to change notification settings - Fork 41
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
bias_vars causing errors #413
Comments
Hi @Elizabethcase, Thanks for reporting this issue! This is likely because we've moved There will also be a restructuration of |
Hi @Elizabethcase, Great that we get to know this so we can fix it! In the meantime, you can run both approaches separately; the pipeline object is just a convenience tool to reduce the amount of code that's needed: deramp = xdem.coreg.Deramp(poly_order=2)
deramp.fit(ref, tba)
deramped_tba = deramp.apply(tba)
nuthkaab = xdem.coreg.NuthKaab()
nuthkaab.fit(ref, deramped_tba)
final_tba = nuth_kaab.apply(deramped_tba) This is more or less what the pipeline object does under the hood. |
Hi @Elizabethcase, @rhugonnet I had a quick look to see if I could fix it, but this seem rather complex. All biascorr classes have an additional However, I also noticed that BiasCorr() behaves differently and does not have a _meta["bias_vars"] item. Therefore, calling |
I also noticed that the attribute |
Yes it's a bit complex, probably easiest if I dive into this (familiarity with Busy until Friday, should be able to have a look then. |
Looks like the fix is fairly straightforward! 😄 Adding a Still, this also raises the issue of how to make a pipeline with |
Hmm, I see two solutions:
>>> coreg = xdem.coreg.NuthKaab() + xdem.coreg.Deramp(bias_vars=...)
>>> coreg.fit(...)
I see advantages and disadvantages of both. In 1), different values can be entered for chained coregs/filters. The disadvantage is that In 2), |
Yes, it's not trivial... 😅 I don't like 1) so much because I think we don't wanna store anything else than metadata during a pipeline = xdem.coreg.NuthKaab() + xdem.coreg.Bias1D(bias_var_names=["slope"]) + xdem.coreg.Bias2D(bias_var_names=["ncc", "slope"]) which would then be recognized in the dictionary Alternatively, 2) could work implicitly in many cases: the length of the
but, as shown above, it could involve duplicating some variables like slope... And I'm thinking to use the best of both 1) and 2)? |
Hi,
Excited to see the coregistration methods being continuously updated. I'm running into some errors right now with inconsistencies in how bias_vars is used/called. Just a note that it would also help to have a list of examples for what variables to use for bias_vars.
When I run
xdem.coreg.Deramp(poly_order=2)
on its own, it works fine When calling in a pipeline, e.g.,coreg_pipeline2_bcnk = xdem.coreg.Deramp(poly_order=2) + xdem.coreg.NuthKaab()
, I get an error:This is in v0.0.13
Thanks,
Elizabeth
The text was updated successfully, but these errors were encountered: