;----------------------------------------------------------------- ; pol_eigen.pro ; ; written by Andreas Reigber ;------------------------------------------------------------------ ; Fast calculation of eigenvectors and eigenvalues of a complex 3x3 ; matrix using LAPACK. Used in polarimetric eigenvector ; decompositions. ; ; Usage: pol_eigen,matrix,ew,ev ; matrix : complex 3x3 array ; ev : 3x3 complex array containing the calculated ; eigenvectors ; ew : complex array containing the calculated eigenvalues ; ;------------------------------------------------------------------ ; This software has been released under the terms of the GNU Public ; license. See http://www.gnu.org/copyleft/gpl.html for details. ;------------------------------------------------------------------ pro pol_eigen,cov_mat,ew,ev s = size(cov_mat) if s[0] ne 2 or s[1] ne 3 or s[2] ne 3 or s[3] ne 6 then begin print,'Wrong matrix format' print,'Only complex 3x3 matrices allowed' return endif ew=complexarr(3) ev=complexarr(3,3) dummy=call_external("liblidl.so","c_eigen_all",cov_mat,3l,ew,ev) end