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

Allow skipping unit conversion in NinJoTIFF #2025

Merged
merged 2 commits into from Feb 18, 2022

Conversation

gerritholl
Copy link
Collaborator

Add an option to the NinJoTIFF writer to skip unit conversion. For a
detailed rationale, see #2024.

Add an option to the NinJoTIFF writer to skip unit conversion.  For a
detailed rationale, see pytroll#2024.
@codecov
Copy link

codecov bot commented Feb 16, 2022

Codecov Report

Merging #2025 (0ab9806) into main (82112a6) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2025   +/-   ##
=======================================
  Coverage   93.56%   93.56%           
=======================================
  Files         282      282           
  Lines       41637    41650   +13     
=======================================
+ Hits        38957    38970   +13     
  Misses       2680     2680           
Flag Coverage Δ
behaviourtests 4.78% <0.00%> (-0.01%) ⬇️
unittests 94.09% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
satpy/tests/writer_tests/test_ninjotiff.py 100.00% <100.00%> (ø)
satpy/writers/ninjotiff.py 80.64% <100.00%> (+0.98%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 82112a6...0ab9806. Read the comment docs.

@coveralls
Copy link

coveralls commented Feb 16, 2022

Coverage Status

Coverage increased (+0.002%) to 94.023% when pulling 0ab9806 on gerritholl:ninjotiff-skip-unit-conversion into 82112a6 on pytroll:main.

@djhoese djhoese added component:writers enhancement code enhancements, features, improvements labels Feb 16, 2022
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.

I definitely shouldn't be the final word on this, but this seems like a reasonable solution. I think the general confusion that does/will arise for anyone "out of the know" trying to compare enhancements and data values will be happy with this and with stretch limits being specified in the units of the input data. I think there are other options (don't remember if you mentioned this in the related issue) that would require some duplicate code to reimplement save_datasets or maybe even a custom Enhancer object for the writer so that the unit conversion can happen after the initial Kelvin-based stretch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:writers enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to skip unit conversion in ninjotiff writer
4 participants