Commit 29c82288 authored by Daniel Brown's avatar Daniel Brown
Browse files

fixing surface motion gouy phase and reverse gouy terms, also minus sign in PI...

fixing surface motion gouy phase and reverse gouy terms, also minus sign in PI gain detector. Lower sidebands now match up with positive PI gain and vice-versa for upper sidebands
parent c0aa5b3d
......@@ -1330,8 +1330,13 @@ int set_k_mirror(int mirror_index) {
mirror->knm.k22[n][m] = rev_gouy(mirror->knm_no_rgouy.k22[n][m], n1, m1, n2, m2, knm_q.qxt1_22, knm_q.qxt2_22, knm_q.qyt1_22, knm_q.qyt2_22);
for(k=0; k<mirror->num_surface_motions; k++){
//mirror->knm_surf_x_a_1[k][n][m] = rev_gouy(mirror->knm_surf_x_a_1[k][n][m], n1, m1, n2, m2, knm_q.qxt1_11, knm_q.qxt2_11, knm_q.qyt1_11, knm_q.qyt2_11);
//mirror->knm_surf_x_a_2[k][n][m] = rev_gouy(mirror->knm_surf_x_a_2[k][n][m], n1, m1, n2, m2, knm_q.qxt1_22, knm_q.qxt2_22, knm_q.qyt1_22, knm_q.qyt2_22);
mirror->knm_surf_motion_1i[k][n][m] = rev_gouy(mirror->knm_surf_motion_1i[k][n][m], n2, m2, n1, m1, knm_q.qxt1_11, knm_q.qxt2_11, knm_q.qyt1_11, knm_q.qyt2_11);
mirror->knm_surf_motion_1o[k][n][m] = rev_gouy(mirror->knm_surf_motion_1o[k][n][m], n2, m2, n1, m1, knm_q.qxt1_22, knm_q.qxt2_22, knm_q.qyt1_22, knm_q.qyt2_22);
mirror->knm_surf_motion_2i[k][n][m] = rev_gouy(mirror->knm_surf_motion_2i[k][n][m], n1, m1, n2, m2, knm_q.qxt1_11, knm_q.qxt2_11, knm_q.qyt1_11, knm_q.qyt2_11);
mirror->knm_surf_motion_2o[k][n][m] = rev_gouy(mirror->knm_surf_motion_2o[k][n][m], n1, m1, n2, m2, knm_q.qxt1_22, knm_q.qxt2_22, knm_q.qyt1_22, knm_q.qyt2_22);
mirror->knm_surf_x_a_1[k][n][m] = rev_gouy(mirror->knm_surf_x_a_1[k][n][m], n1, m1, n2, m2, knm_q.qxt1_11, knm_q.qxt2_11, knm_q.qyt1_11, knm_q.qyt2_11);
mirror->knm_surf_x_a_2[k][n][m] = rev_gouy(mirror->knm_surf_x_a_2[k][n][m], n1, m1, n2, m2, knm_q.qxt1_22, knm_q.qxt2_22, knm_q.qyt1_22, knm_q.qyt2_22);
}
}
}
......@@ -1390,6 +1395,11 @@ int set_k_mirror(int mirror_index) {
mirror->knm.k22[n][m] = z_by_x(mirror->knm.k22[n][m], -1);
for(k=0; k<mirror->num_surface_motions; k++){
mirror->knm_surf_motion_1o[k][n][m] = cminus(mirror->knm_surf_motion_1o[k][n][m]);
mirror->knm_surf_motion_1i[k][n][m] = cminus(mirror->knm_surf_motion_1i[k][n][m]);
mirror->knm_surf_motion_2o[k][n][m] = cminus(mirror->knm_surf_motion_2o[k][n][m]);
mirror->knm_surf_motion_2i[k][n][m] = cminus(mirror->knm_surf_motion_2i[k][n][m]);
mirror->knm_surf_x_a_1[k][n][m] = cminus(mirror->knm_surf_x_a_1[k][n][m]);
mirror->knm_surf_x_a_2[k][n][m] = cminus(mirror->knm_surf_x_a_2[k][n][m]);
}
......
......@@ -2115,7 +2115,7 @@ void fill_detectors(void) {
solve_ccs_matrix(&M_ifo_sig, M_ifo_sig.rhs_values, false, false);
output_data->signal.re = z_pl_z(div_complex(complex_1, z_by_x(crhs[rhs_idx], 1)), complex_m1).re;
output_data->signal.re = z_m_z(complex_1, div_complex(complex_1, crhs[rhs_idx])).re;
output_data->signal.im = 0;
} else {
output_data->signal = complex_0;
......
......@@ -943,7 +943,7 @@ void calc_mirror_knm_surf_motions_map(mirror_t *m, double nr1, double nr2, compl
#else
integrate_riemann_sum_surf(&value, &p);
#endif
// surface integration is just the real kernal of the hermite
// surface integration is just the real kernel of the hermite
// polynomials, have to add in the gouy phase here.
// Even though we reverse gouy it later it needs to be in
// here for merging with any static distortions
......@@ -958,7 +958,7 @@ void calc_mirror_knm_surf_motions_map(mirror_t *m, double nr1, double nr2, compl
// the msign(n1+n2) is the difference between the incoming beam
// coordinate system and that of the maps, the x-axis is inverted.
m->knm_surf_motion_1o[k][in][out] = knm;
m->knm_surf_motion_1i[k][in][out] = cconj(z_by_x(knm, msign(p.n1+p.n2)));
m->knm_surf_motion_1i[k][in][out] = cconj(knm);
//warn("%i%i->%i%i = %.15g\n",p.n1, p.m1, p.n2, p.m2, zabs(knm));
......@@ -993,12 +993,12 @@ void calc_mirror_knm_surf_motions_map(mirror_t *m, double nr1, double nr2, compl
integrate_riemann_sum_surf(&value, &p);
#endif
complex_t knm = z_by_xphr(complex_1, value, (p.n1 - p.n2)*gx22 + (p.m1 - p.m2)*gy22);
complex_t knm = z_by_xphr(complex_1, value, (p.n1 - p.n2) * gx22 + (p.m1 - p.m2) * gy22);
// use a minus sign (complex_m1) here because the surface motion will appear
// opposite from node 2 side, we also have the msign term here because the coord
// system of the outgoing beam has a negative x compared to the map coord system
m->knm_surf_motion_2o[k][in][out] = z_by_x(knm, msign(p.n1+p.n2));
m->knm_surf_motion_2o[k][in][out] = knm;
m->knm_surf_motion_2i[k][in][out] = cconj(knm);
if(out!=in) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment