Closed pnuu closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 96.09%. Comparing base (
118fc93
) to head (3f1076a
). Report is 7 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Totals | |
---|---|
Change from base Build 11517264487: | 0.003% |
Covered Lines: | 53219 |
Relevant Lines: | 55318 |
@pnuu so is the plan for this to be closed and not used? Theoretically pyspectral should have all the changes for dtype stuff, right? Also I really thought I got pyspectral working and retaining dtypes. Shoot.
Well, maybe the tests I've added should stay. I'll have a look at how much needs to be done to Pyspectral so that it doesn't upcast stuff, and whether there are still something that is needed on Satpy. Like a kwarg or something.
I'm converting this to a draft while I inspect the Pyspectral side of things.
Right. There was nothing wrong in Pyspectral, it was just the clipping of input value of reduce_strength
that produced int64
for reduce_strength=1
and thus promoted the float32
data to float64
.
So in short: this PR makes sure the inputs to Rayleigh correction has proper data type to keep the data from being upcast. And adds the unrelated checks to other tests.
@djhoese do you want to look at this? otherwise it's good to merge
This is workaround for the Pyspectral Rayleigh correction that always uses
float64
datatype.This includes also few additional dtype checks for other modifiers and enhancements. Those changes are here because I originally started this to hunt a data upcasting in true color composite, but didn't end up finding the final issue and didn't want to discard all the changes.
I'll create an issue to Pyspectral to fix the data upcasting. Hopefully tomorrow. Or a direct fix if I see a simple solution.