Skip to content
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

Improve flexibility of olci level2 reader #2504

Merged
merged 4 commits into from
Jun 9, 2023

Conversation

mraspaud
Copy link
Member

@mraspaud mraspaud commented Jun 8, 2023

This PR adds some flexibility to the olci l2 reader. In particular, it adds the the possibility to un-log10 the data which has units like lg(re mg.m-3) and lets the user provide its own mask items.

  • Tests added
  • Fully documented

@mraspaud mraspaud requested a review from simonrp84 June 8, 2023 10:44
@mraspaud mraspaud requested a review from djhoese as a code owner June 8, 2023 10:44
@mraspaud mraspaud self-assigned this Jun 8, 2023
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Merging #2504 (8d0ae24) into main (4642264) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2504   +/-   ##
=======================================
  Coverage   94.84%   94.85%           
=======================================
  Files         337      337           
  Lines       49571    49617   +46     
=======================================
+ Hits        47016    47062   +46     
  Misses       2555     2555           
Flag Coverage Δ
behaviourtests 4.41% <0.00%> (-0.01%) ⬇️
unittests 95.47% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
satpy/readers/olci_nc.py 94.20% <100.00%> (+0.38%) ⬆️
satpy/tests/reader_tests/test_olci_nc.py 100.00% <100.00%> (ø)

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5210366489

  • 49 of 49 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 95.419%

Totals Coverage Status
Change from base Build 5208379223: 0.005%
Covered Lines: 47175
Relevant Lines: 49440

💛 - Coveralls

@djhoese djhoese added enhancement code enhancements, features, improvements component:readers labels Jun 8, 2023
Copy link
Member

@djhoese djhoese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also adds the ability to specify mask items right? Otherwise, looks good from what I understand.

standard_name: algal_pigment_concentration
units: "lg(re mg.m-3)"
standard_name: algal_pigment_concentration
units: "lg(re mg.m-3)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this remove the calibration: "reflectance" from the DataID and .attrs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that a problem if it does? It's not reflectance data.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, but I'm just pointing out that it did exist, now it doesn't. Since multiple calibrations don't exist I guess it doesn't matter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is removed, but it is A Good Thing (r) because it never was reflectance data.

@mraspaud
Copy link
Member Author

mraspaud commented Jun 9, 2023

This is also adds the ability to specify mask items right?

Yes, I mentioned it in the description of the PR :)

@mraspaud mraspaud merged commit 060c819 into pytroll:main Jun 9, 2023
15 of 16 checks passed
@mraspaud mraspaud deleted the feature_olcil2_mask_and_unlog branch June 9, 2023 06:44
@mraspaud mraspaud changed the title Improve flexibility of olci level2 reader Improve flexibility of olci level2 reader Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:readers enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants