You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to add interpolation to spectra, so that a measurement with higher or lower spectral resolution can be used directly and the result gets constrained to the available wavelengths.
In that manner the user could provide spectra (currently the case, with 1nm step) with any resolution or even an analytical function and the result would match the finest resolution.
Would you be interested in such a pull request?
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for the interest. I had thought about this, but I came to the conclusion that selecting an interpolation method should be left to the user, and is best done outside of the library. However, I think actually constraining the spectral response to overlap one a given spectra (I have a few tests that force the 400-2500 nm spectral space) would be a good idea. But then, either you:
Provide all spectra interpolated by your method of choice for the spectral range of interest, or
For the spectra that you still want to use, you do some simple linear interpolation to match those. This would include soil spectra as well as PROSPECT constituents.
Option (2) is a bit hacky, but I guess that most of the time a linear interpolation gets you where you want anyway, so... In this case, the code should be in the run_prospect function (it also returns wavelengths, so that's handy), and then the order of the soil spectra interpretation in sail_model.py should be changed to account for the spectral ranges in the PROSPECT response?
The way to make this work cleanly (I think) would be to make the input spectra (e.g. Cab absorption) either have a 1D array (covering 400-2500 nm at 1nm as default) or a 2D array (with wavelengths and absorption). Then it's easy to interpolate, and code that already uses the old format still works.
Hi,
I would like to add interpolation to spectra, so that a measurement with higher or lower spectral resolution can be used directly and the result gets constrained to the available wavelengths.
In that manner the user could provide spectra (currently the case, with 1nm step) with any resolution or even an analytical function and the result would match the finest resolution.
Would you be interested in such a pull request?
The text was updated successfully, but these errors were encountered: