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
Let the user provide custom weight into pyresample #12
Comments
From lavergne...@gmail.com on November 26, 2013 00:41:37 OK. I have a version I would like to share with you, Esben. Can you take a look? I implemented this as an extra keyword parameter custom_weight=None to resample_gauss() and resample_custom(). This new feature should have no impact for resample_nn(). If custom_weight is None (default), I checked that the testsuite runs smoothly. I have also created 2 test cases for the new feature, and will add more today. Please find attached kd_tree.py with the new feature, and test_kd_tree.py. This version is tentatively named 1.1.1. I also attach an animated gif that cycles between 3 images of the "average sensing time" (0-24 hours) when doing a daily composite of SSM/I swath data in the Arctic. That uses resample_gauss(). The loop is going through "pyresample-1.1.0", "pyresample-1.1.1_withCustomWeight", and "pyresample-1.1.1_withoutCustomWeight". In that case, the custom_weight I use is a "hat" function that gives a weight of 1 at sensing_time 12utc, and a weight of 0 at sensing_time 00utc and 24utc. The idea is to get a daily averaged image that is sharpened towards 12utc. So we see that "pyresample-1.1.0" is the same as "pyresample-1.1.1_withoutCusomWeights" (frame 1 and 3), whille pyresample-1.1.1_withCustomWeights (frame 2) does what we want (gives less weight to the late 22utc swath). What do you think, how do we proceed from here? Thomas Attachment: kd_tree.py test_kd_tree.py |
From lavergne...@gmail.com on November 26, 2013 00:50:48 Posting the 3 frames separately, since animated gif didn't pass. Attachment: test_pr111_times_frame1.png test_pr111_times_frame2.png test_pr111_times_frame3.png |
@TomLav Is this implemented now ? |
Short answer: no. |
Yaml jpss1 Tests are passing and coverage has not decreased. Now also RTD builds fine, so ready to merge
From lavergne...@gmail.com on November 25, 2013 14:15:49
Hei pyresample team,
I am seating at the pytroll workshop, and would like a new feature:
Users could specify an array of weights (same dimension as lat/lon/data), and this weight would multiply the weight computed from distance (through the fov function, either _custom() or _gauss()).
Two use cases:
I'll start implementing right now :)
Thomas
Original issue: http://code.google.com/p/pyresample/issues/detail?id=12
The text was updated successfully, but these errors were encountered: