+ for (int itsep = 0; itsep < O815->comargs.lsize[1]/2; itsep++) {
+ gsl_matrix_complex_set_zero(totalval);
+ gsl_vector_set_zero(jackerrornorm);
+
+ for (int imeas=0; imeas<O815->comargs.nmeas; imeas++)
+ gsl_matrix_complex_add( totalval, measurements[imeas][itsep] );
+
+ // compute mean //
+ gsl_complex tmpc2;
+ tmpc2.dat[0] = 1.0/O815->comargs.nmeas;
+ tmpc2.dat[1] = 0;
+ gsl_matrix_complex_memcpy (tmpmatrix, totalval);
+ gsl_matrix_complex_scale (tmpmatrix, tmpc2);
+ cdiag(jackres, tmpmatrix);
+ // END
+
+ for (int imeas=0; imeas<O815->comargs.nmeas; imeas++) {
+ gsl_complex tmpc;
+ tmpc.dat[0] = 1.0/(O815->comargs.nmeas-1);
+ tmpc.dat[1] = 0;
+
+ gsl_matrix_complex_memcpy (tmpmatrix, totalval);
+ gsl_matrix_complex_sub (tmpmatrix, measurements[imeas][itsep]);
+ gsl_matrix_complex_scale ( tmpmatrix, tmpc );