Spectral Unmixing Endmember File Error


I am trying to use the Spectral Unmixing feature in SNAP on a S3 subset. I have created a tab separated csv file using python in several different ways. The csv endmember file uploads successfully and the individual endmembers can be seen in the LSU popup window. However, when I click Run, I get error saying “Matrix is Singular”. I am not sure what this means or how to address the problem.

If I create a tab separated csv file with the same data using Excel the LSU tool runs successfully. I am not sure what difference using python is creating.


I think the format is correct in both cases. But are you sure that you use the same values in both cases?

A matrix is singular if its determinant is zero.

Hello @marpet .

I am also having problems with the Endmember file for the unmixing. I exported my endmembers from Envi in ASCII format and then converted it in a tab separated CSV file using Excel and Notepad. It looks like this:

However, when I added it to SNAP I am not getting any error but it is not showing any endmember. Do you have any suggestion on how to solve this?


The endmember file should follow the format which is described in the help.

Especially, the leading " is not correct in your file.

Thanks @marpet. How many Endmembers does the Unmixing allow? I am not able to add more than 10.

No, there is no artificial limit. If you like you can send me the endmembers files, e.g. as PM. Then I can test it.

All Endmembers are loaded into the tool

There is only a slider missing in the list of endmembers. If you further step down through the list by the cursor keys you see different spectra highlighted in the graph.

Also, it would be good if you have a different name for each of the endmember.
And you have to make sure that you have more source bands then endmembers.

ok, I see. Perfect. Thank you.

Yes, I do have different names and around 271 source bands.

thank you for your time!

Excuse me, how do you get these Endmembers?

Spectral Unmixing Tools

I mean in the Endmembers section, How can we add this “Forest”, “Cropland” and … items?

Please read the help, it’s well explained,