-
Notifications
You must be signed in to change notification settings - Fork 303
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 areas for FCI #1188
Add areas for FCI #1188
Conversation
Add two areas 'fci_0deg_1km' and 'fci_0deg_2km', corresponding to the full disk FCI view. I created those areas using: print(sc["vis_08"].attrs["area"].create_areas_def()) and print(sc["ir_123"].attrs["area"].create_areas_def()) with subsequent manual editing of name and description.
Test code: from satpy import Scene
from glob import glob
sc = Scene(glob("/media/nas/x21308/2020_04_MTG_unofficial_Testdata/20130804_RC72/W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-FDHSI-FD--CHK-BODY--L2P-NC4E_C_EU*.nc"), reader="fci_l1c_fdhsi")
sc.load(["ir_123"])
nsc = sc.resample("fci_0deg_2km")
nsc.save_dataset("ir_123", "/tmp/ir_123.png") |
With commit 432cd8d this is upside down: |
With b1afd8a this gives me a segmentation fault:
|
Codecov Report
@@ Coverage Diff @@
## master #1188 +/- ##
=======================================
Coverage 89.62% 89.62%
=======================================
Files 200 200
Lines 29550 29550
=======================================
+ Hits 26483 26484 +1
+ Misses 3067 3066 -1
Continue to review full report at Codecov.
|
This is affected by pytroll/pyresample#274 and #930. When passing |
What tests and/or documentation does this need, where and how? |
No test or documentation needed. Maybe the description could say this is base on testdata for now ? |
In the FCI areas description, add a note that these areas are based on pre-launch test data.
Rather than swapping the native area manually, use the slicing property on AreaDefinition:: print(sc["ir_123"].attrs["area"][::-1, :].create_areas_def()) This creates a slightly area extent, presumably because the area extent corners refer to the outer corners of the outer pixels.
In b1afd8a, I swapped the y-extent manually. This may be buggy because the area extent refers to the external corners of the outermost pixels. In ac1fcfa, I instead used the fact that area definitions can be sliced: print(sc["ir_123"].attrs["area"][::-1, :].create_areas_def()) With this area extent, there is no more segmentation fault. The resulting image looks correct: |
Is slicing buggy? Does that mean my 3rd attempt at the fci area definitions, where I used slicing to invert rather than flipping manually (which I thought buggy for another reason), is still wrong? If I switch the ll with the ul corner then I'm making the entire area smaller, aren't I? Because "lower left of lower left corner" is now "lower left of upper left corner". Although if I also change the sign it should actually become "lower left of lower left corner" -> "upper left of upper left corner". Then which area is correct? b1afd8a or ac1fcfa? |
@ameraner could have a look at this and see if it works for you ? |
This was confirmed to work by @ameraner on slack, merging |
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.
LGTM
Add two areas 'fci_0deg_1km' and 'fci_0deg_2km', corresponding to the
full disk FCI view. I created those areas using:
and
with subsequent manual editing of name and description.