-
Notifications
You must be signed in to change notification settings - Fork 5
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
Python3 porting #510
Comments
So for now I'm working in private so I can rebase as-needed. @bhbraswell, whenever we want to start collaborating, I can push, and if you want to see my commits sooner please just let me know. In the mean time, here's the rough plan I'm working from at the moment:
At some point in this process I think it'd be best for someone with scientific training to inspect some generated raster files, like products and exports, but I'm not sure when would be best. Computed stats look okay so far (eg std dev & mean only vary by a little), but obviously my eyes don't see as much as either of yours would. |
Another todo: Need to fix landsat bqashadow process sys test after we merge dev into the python 3 branch, because that product has been restored in the dev branch but was deleted entirely in the python 3 branch. |
@ags-tolson I'd be glad to begin looking at/ informally testing whenever you'd like to push your branch. |
Okay, the branch is named
Drivers whose process system tests pass:
These drivers are broken in their process system tests:
Also If you want to observe these changes in output, you can build a container suitable for running the test suite with I can also send along newly-generated product files for your perusal, too. |
Thanks @ags-tolson. I'll look at MSAVI2 and MERRA, and also HLS which actually would be a priority for me personally. Just a question, instead of |
I think we could and should. I'm not sure when the best moment to sort containerization would be though. |
An update on system tests in the dev branch + gippy 0.3.11: The CI pipeline passes, and for process tests, the passing drivers are hls, modis, merra, most of landsat, and some of sentinel2. The landsat problem is minor, and the fixes in place in the 510 branch seem trustworthy, so that just leaves sentinel2. Sentinel2's problematic products under dev + gippy 0.3.11 are mostly the same as for the gippy 1.0 branch: crcm, s2rep, and mtci. Meanwhile s2rep-toa and mtci-toa pass under gippy 0.3.11 and fail under gippy 1.0. crcm deviates from the expectation but resembles the 0.3.11 outcome, and I'm told it looks okay graphically, which makes me think it's okay to accept it as-is (maybe just a stale expectation):
mtci is acting like it got pushed up to its maximum somehow, maybe a problem with the numpy faff (it's computed manually, not a
mtci-toa looks very different from its expectation, but weirdly similar to the surface mtci's expectation & gippy 0.3.11 outcome:
s2rep is similarly showing a huge blow-up to the max and is similarly computed by the driver, not gippy:
s2rep-toa looks very different from its expectation but in the ballpark of the surface s2rep expectation and gippy 0.3.11 outcome, which makes me think the expectation is wrong:
Due to the way sentinel-2 works I suppose I'll look at their surface versions first, since for sentinel-2 it represents less processing. |
So this is odd; I have some memory of having to work back from the s2 ref product, which is really just opening the asset, to get to the ref-toa product, but looking at the code, I can see no evidence of this. Apparently I'm mistaken? Anyway I'm starting with mtci-toa instead since that's closer to the source. |
So, the idea there is that ESA provides, |
For the py3 + gippy 1 version of mtci-toa, in the histogram, there's strange spikes near the 0.5 marks of the histogram (see especially spiky spike at 0.0): But otherwise I guess it looks good, and close to atmo-corrected mtci in any case. Let me know if this isn't an acceptable artifact kind of situation. |
That looks like a possible quantization effect, but I would defer to @bziniti on whether that is problematic. I believe she's the only one who has utilized MTCI. |
I used MTCI once for a forest defoliation mapping project. I'm not sure I understand what the problem is. @lledoux may be more familiar than I. Or maybe this will help? https://www.sciencedirect.com/science/article/pii/S092427161300107X |
I would tend to agree with @ircwaves , as it's too much of a coincidence that those spikes happen at every 0.5 step; though I am unsure as to whether it may cause issues later on if/when the data are used. Like @bziniti , I only used this product for mapping deforestation (a while ago). Sorry I'm not more help! Perhaps Torbick may be able to provide some input? |
So, I'd say that MTCI is good for now, but maybe file an issue to look at the level of quantization being employed. |
So merra processing went okay; I'm pivoting to export tests. Modis index exports are showing a strange geolocation thing; going from
|
The piece that jumps out there to me is the pixel size being different. That shouldn't have changed. |
Not sure how many spots it comes up in, but my guess is that the issue is here: So, I believe that there is a bug in this gippy use-case, but it also points out again that we need to add |
Okay,
Thus, fetch & process for most drivers has been verified under python 3 + gippy 1.0, plus some random other testing by our unit & integration tests. Next steps (updated Fri 20 sep --T):
|
A note for containerization, need to add w/o python-dev
w/ python-devbash$ pip3 install gippy ; echo "exit status: $?"
|
As of now that PR (#513) is mature enough to pass the CI test suite (unit + int + sys), which means technically it can be merged into dev if it passes code review. @ircwaves note that as you recommended As we consider merging, the key issues I know of are:
I'm going to attempt a local dev merge, see how miserable it is. |
That's great to hear! My current thinking is that we move forward with dev @ python3+gippy1, and keep master at python2.7 until dependent apps have been ported to python 3+gippy1. Raise any flags for anyone? |
Really impressive @ags-tolson. Definitely doesn't raise any warning flags for me. |
Merge complete + test suite passes; if dev doesn't move much, the 510 branch head now contains dev as well. There were several merge conflicts but hopefully test passage is a good sign. A bunch of coreg changes came in, but I don't have a test suite for coreg generally. I attempted to follow @bhbraswell's pattern of changing calls to match gippy but it's possible I didn't catch everything. I didn't do manual testing in any case because I don't know enough about coreg to know if it worked or changed behavior. Likewise there are more dockerfiles than before. There's going to be a little layer cake with
Suggest adding coreg stuff ( |
Okay, the mergeable pushed branch is
|
Thanks @ags-tolson and @bhbraswell for getting started on this. We anticipate needing to have some discussion on some facets of this. We're off to a good start. https://pythonclock.org/
(also see #376)
The text was updated successfully, but these errors were encountered: