Use external bare soil reflectance in otbSailModel

Hi.

I am making an algorithm that inverts the prosail model to obtain the biophysical parameters from spectra obtained by a hyperspectral camera on board a drone.
To better adjust the results I would like to use the dry and wet sand spectra from the study area instead of using the spectrum from the database.
I have investigated and I see that there is the possibility of using external spectra through the UseExternalSoilDB method, which uses as an input parameter a SoilDataBase object which is constructed from a file.
I have not been able to find any file examples or the format that the data has to have in order for it to be imported correctly. Does anyone know how to import the spectra data and what format the file should have?

Thanks and regards …

Hello,

Here is an example of file that can be read by the SoilDataBase class.

It seems that each line corresponds to a wavelength, the first value of the line is the wavelength in nm, that will be multiplied by the “wlfactor” (the second argument of the SoilDataBase constructor, 1000 in the case of the file mentioned above). the other values are the reflectance value corresponding to each soil. The values are separated by spaces.

Does that make sense ? I am trying to guess the format of the file looking at the code, but I have no knowledge of these algorithms.

Cédric

Hi Cédric.

Thank you very much for your early reply. This format makes sense to me.

Now my question is how to use the database loaded in the sailmodel class. The sail model uses a linear mixture of two spectra (dry and wet sand), UseExternalSoilDB method allows to enter the database and an index value that I suppose has to be 2 (the two sand spectra that I have to enter in the file). Does this make sense?

Thanks and regards …