geomatik / qlsu

QLSU (QGIS Linear Spectral Unmixing) Plugin - QLSU Plugin allows users to perform unconstrained, partially constrained and fully constrained least squares linear spectral unmixing on multispectral imagery
GNU General Public License v2.0
1 stars 1 forks source link

Problem when loading spectra from endmembers in .csv format #2

Open sebamed96 opened 1 week ago

sebamed96 commented 1 week ago

Hello!

I am quite interested in this project, and currently I'm looking to implement it into my science research.

But, when it comes to loading spectra from .csv file, that contains endmember values, I always get an error stating:

File "C:\Users/pc4you/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qlsu-main\qlsu.py", line 1181, in load_endmembers self.e_names, self.e_wlengths, self.e_data = self.get_endmembers() File "C:\Users/pc4you/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qlsu-main\qlsu.py", line 1159, in get_endmembers endmember_wlengths = endmember_wlengths.astype(float) ValueError: could not convert string to float:

Can you provide example of .csv file that You used in Your research paper, because it might be crucial part of this research.

geomatik commented 1 week ago

Hello @sebamed96 . I think the problem is with the wavelength column of your endmember csv file. It probably contains string type data. I couldn't have time to write a comprehensive documentation yet for the plugin. But i will provide an example csv file containing actual endmember spectra.

The example spectra given below is not from the QLSU article but taken from;

Small C, Sousa D. The Sentinel 2 MSI Spectral Mixing Space. Remote Sensing. 2022; 14(22):5748. https://doi.org/10.3390/rs14225748 URL:https://www.mdpi.com/2072-4292/14/22/5748

It is an open access article, The spectra is given in Table-3. The endmember csv file that i give is the reflectance values of Substrate, Vegetation and Dark components for Sentinel 2 MSI Sensor given in the table.

image_2024-04-24_002438286

You can download it as csv file; endmembersvd.csv

When loaded in QLSU plugin; image_2024-04-24_002757983

Thank you for your interest in QLSU plugin. If you have further questions, Please let me know. Bahadır