+ gsl_matrix_complex_scale ( tmpmatrix, gsl_complex_rect(1.0/(O815->comargs.nmeas-1), 0.0) );
+ gsl_vector_complex_memcpy( tmpvecc, totaldisco );
+ gsl_vector_complex_sub( tmpvecc, measurements_disco[imeas] );
+ for (int icorr=0; icorr<4; icorr++)
+ for (int jcorr=0; jcorr<4; jcorr++) {
+ gsl_complex discopart = gsl_complex_mul( gsl_vector_complex_get(tmpvecc, icorr),
+ gsl_complex_conjugate( gsl_vector_complex_get(tmpvecc, jcorr) )
+ );
+ discopart = gsl_complex_mul_real(discopart, pow(1.0/(O815->comargs.nmeas-1),2));
+ gsl_matrix_complex_set( tmpmatrix, icorr, jcorr,
+ gsl_complex_sub( gsl_matrix_complex_get( tmpmatrix, icorr, jcorr ),
+ discopart
+ )
+ );
+ }
+
+ gsl_blas_zgemm (CblasNoTrans, CblasNoTrans, gsl_complex_rect(1.0,0.0),
+ invC0, tmpmatrix, gsl_complex_rect(0.0,0.0), tmpmatrix2);
+
+ cdiag(tmpvec, tmpmatrix2);