+void obs_diagcorr::invertcm (gsl_matrix_complex *invm, const gsl_matrix_complex *m)
+{
+ int s;
+ gsl_permutation * perm = gsl_permutation_alloc (m->size1);
+
+ gsl_matrix_complex *mtmp = gsl_matrix_complex_alloc(m->size1,m->size2);
+ gsl_matrix_complex_memcpy(mtmp, m);
+
+ gsl_linalg_complex_LU_decomp (mtmp, perm, &s);
+ gsl_linalg_complex_LU_invert (mtmp, perm, invm);
+
+ gsl_matrix_complex_free(mtmp);
+}
+