Make sure FCI L2 reader returns cloud type and other categorical data as int#3339
Make sure FCI L2 reader returns cloud type and other categorical data as int#3339gerritholl wants to merge 2 commits intopytroll:mainfrom
Conversation
Add a test case reproducing pytroll#3338, where cloud type becomes a float. Test fails.
In the FCI L2 data, do not convert categorical data types (quality, cloud type, cloud phase, cloud mask, etc.) into float. Fixes pytroll#3338
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3339 +/- ##
=======================================
Coverage 96.34% 96.34%
=======================================
Files 463 463
Lines 58959 58962 +3
=======================================
+ Hits 56802 56805 +3
Misses 2157 2157
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Pull Request Test Coverage Report for Build 22132283193Details
💛 - Coveralls |
|
With the proposed fix you effectively disable the fill_value functionality for the integer data. In that case we should probably remove all Another solution would be to treat float and integer data independently in Hence, I'd vote for the first alternative (which you have started), but also cleaning up the corresponding |
Make sure that the FCI L2 reader returns categorical data, such as cloud type, cloud phase, cloud mask, pixel quality etc. as an exact dtype, de facto an integer dtype (in the source data those are enum).
This change may break backwards compatibility for users expecting a cloud mask or a cloud type as a float.