Calculate entropy

Hello, I’m trying to calculate entropy (H) for image from Radarast 2 by using my own python script, but for some pixels calculated eigenvalues of the T3 matrix are negative. And entropy values aren’t between 0 and 1. I calculated entropy also in PolSARpro and there for the same SAR image the calculated eigenvalues there are nonnegative. I perform calculation on nonfiltered image, T3 matrix is generate by using snappy. For the image, after filtering the spots, there are fewer negative eigenvalues, but they also appear. What should I do to remove negative eigenvalues?

Dear @mgier, please double check your eigenvalue calculation… The eigenvalues of the T3 matrix should never be negative : - )

Also you might want to double-check your other steps… Such as even the simple things like loading the data, and setting up the complex numbers. If you place a link to your script in the forum, might be able to help you better…
cheers
Ashlin