-
Notifications
You must be signed in to change notification settings - Fork 39
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
Return 3.x um reflectance with the same dtype as the NIR data #206
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #206 +/- ##
==========================================
- Coverage 89.96% 89.92% -0.04%
==========================================
Files 23 23
Lines 2580 2571 -9
==========================================
- Hits 2321 2312 -9
Misses 259 259
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I don't think we need to pass the dtype to the class constructor, we can just use the temp dtype directly in tb2radiance right? |
As @mraspaud suggested, I now handle the type conversion/preservation in blackbody and rad2bt methods. Along the way I needed to convert some tests to pytest so I could parametrize the dtype stuff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I just have a few comments inline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for all the effort @pnuu !
@adybbroe do you want to have a last look before we merge thist? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nothing to add, nice work.
This PR keeps the
dtype
of the input NIR data for the calculated reflected portion of it. For non-Numpy/Dask inputsfloat64
is used.The approach is pretty simplistic, I didn't want to start passingdtype
to the parent class of theCalculator
(RadTbConverter
)pytest pyspectral
flake8 pyspectral
AUTHORS.md
if not there already