-
Notifications
You must be signed in to change notification settings - Fork 301
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
Change sensor attribute to lowercase in FCI L2 NetCDF reader #3048
Change sensor attribute to lowercase in FCI L2 NetCDF reader #3048
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3048 +/- ##
=======================================
Coverage 96.11% 96.11%
=======================================
Files 383 383
Lines 55673 55673
=======================================
Hits 53511 53511
Misses 2162 2162
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 13131140073Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
My guess is that the documentation about the YAML I think your suggestion of adding the sensor information to the metadata section would be good. I think we should leave the sensor information about the YAML as that is still sometimes used I think with
Small grammar fix: remove the "in" before Satpy. I wonder if we should add something about needing it to be consistent across readers? Also there is support for multiple sensors as a
|
I like your suggestion, I've added it to the docs now. The docs build fails for the PR though, however it also failed before I edited the docs file, so I think it's something unrelated? |
Thanks! The RTD failure was the one that should be fixed in main so I've merged this. |
Following a discussion on slack (https://pytroll.slack.com/archives/CK9TPLCG0/p1737127470400239 and https://pytroll.slack.com/archives/C0LNH7LMB/p1737561433643359), this PR changes the
sensor
name dataset attribute in the FCI L2 NetCDF reader (fci_l2_nc
) from uppercase to lowercase. This is needed in order to identify instrument specific composites and enhancements. I also modified the tests to mimic the real files where there sensor and platform information are stored in uppercase in the file metadata, such that we can also check that thesensor
attribute is still returned with lowercase.As discussed on slack, it could be worthwhile updating the documentation as well. However, I'm a bit confused and therefore not sure what and how to update. In the documentation for adding custom readers (https://satpy.readthedocs.io/en/v0.53.0/dev_guide/custom_reader.html) it says that the sensor(s) listed in the yaml file, "must be all lowercase letters for full support throughout in Satpy". However, this was already the case before the PR:
Hence, it seems like this is not enough and that the
sensor
attribute of the dataset also has to be in lowercase, which is not mentioned here: https://satpy.readthedocs.io/en/stable/reading.html#dataset-metadata (sensor
is not even listed as mandatory metadata/attribute). Hence, my question is whether there is any link between the sensor(s) listed in the yaml file and the sensor attribute added as metadata to a dataset? To me it seems like it's not the case, and if so we might want to add a note under the dataset metadata (https://satpy.readthedocs.io/en/stable/reading.html#dataset-metadata), similar to what we have for the reader yaml-file, e.g. something like this:"
sensor
- name of the sensor. For full support throughout in Satpy this must be all lowercase letters."