-
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
Coreg.fit_pts(..., mask_high_curv=True)
does not seem to work.
#404
Comments
Yes the tests are still poor for these new point functions (I intended to work a bit on that in the next PR on coregistration, but I'm not there yet). We didn't insist too much on tests in #346 as we knew we were about to rework some of the module. I agree, actually I think both directions should be done:
To keep new features cleanly tested in the future (and ensure they are added to API, we update the package history, etc...), we could add an automated "PR" checklist in |
I added I remember now: the reason that line of code might have worked before is because the |
Awesome @rhugonnet, thanks for the input! Yeah a checklist would be great. Even though there's no check that the listed parts are actually implemented, I think it could work in our favour in the long term. Also, thanks a lot for fixing the problem on the GU side!! |
Oh, and perhaps internally we could have a routine for PRs like #346. I was the one who pushed it despite it not being absolutely finished, so I'm mostly to blame. But I suspect there may be times when this could happen again, such as when @adehecq needed to quickly implement some functionality for his workshop a year ago (?). It would be good to have an "express train" routine to make sure that the essentials are merged, and cleanup happens soon thereafter! |
I'm getting an error when enabling the
mask_high_curv=True
flag (after adhering to the warning: "Warning: There is no curvature in dataframe. Set mask_high_curv=True for more robust results").The code in question is here:
xdem/xdem/coreg/base.py
Lines 905 to 910 in 02902c0
I don't know if this piece of code was ever tested, or if something new has broken it! Either way, it doesn't seem to work right now, as
np.abs(Raster)
doesn't work it seems. @adehecq or @rhugonnet, do you know if this has ever worked? I see three potential solutions:np.abs(Raster)
work in GeoUtils.np.max(np.abs(get_terrain_attribute(tba_dem, attribute=[...]).data), axis=0)
(note the.data
addition to make it a masked array instead of a raster).Filter
Also, I don't think it's great that a maxc limit of 5.0 is hardcoded. Should that be made a keyword argument?
What do you think @rhugonnet?
The text was updated successfully, but these errors were encountered: