diff --git a/src/new/mirror_maps/FT_prepare_phase_map_for_finesse.m b/src/new/mirror_maps/FT_prepare_phase_map_for_finesse.m index 65b041d055245cdee416ac0ae9652e72a377a083..11b7f6a080e51f41b598decc2c81492100603d5c 100644 --- a/src/new/mirror_maps/FT_prepare_phase_map_for_finesse.m +++ b/src/new/mirror_maps/FT_prepare_phase_map_for_finesse.m @@ -114,8 +114,7 @@ function [map_out] = FT_prepare_phase_map_for_finesse(map,offset,w) disp(sprintf(' --- removing tilt of A11 = %g [nm] ...',sqrt(A1(1)^2+A1(2)^2))) disp(sprintf(' (xbeta = %g [rad], ybeta = %g [rad])',xbeta,ybeta)) - % Offset map - if offset(1)~=0 || offset(2)~=0 + if length(offset)>1 % Add offset to mirror centre map_out.x0 = map_out.x0+offset(1)*1e-3/map_out.xstep; map_out.y0 = map_out.y0+offset(2)*1e-3/map_out.ystep; @@ -167,7 +166,7 @@ function []=write_results(FID,map,A0,A1,A2,Rc,xbeta,ybeta,offset); fprintf(FID,'(xbeta = %2.2g urad, ybeta = %2.2g urad)\n',xbeta*1e6,ybeta*1e6); fprintf(FID,'Curvature (Z20): %3.1f nm\n',A2); fprintf(FID,'(Rc = %3.1f m)\n',Rc(1)); - if offset(1)~=0 || offset(2)~=0 + if length(offset)>1 fprintf(FID,'x0 offset: %3.2f mm\n',offset(1)); fprintf(FID,'y0 offset: %3.2f mm\n',offset(2)); end diff --git a/src/new/mirror_maps/FT_remove_zernike_curvatures_from_map.m b/src/new/mirror_maps/FT_remove_zernike_curvatures_from_map.m index a979743ecd0a4087fb47c5d9e7f319e9665be87b..746dc0748ccf4349a701097e36af7300da23caea 100644 --- a/src/new/mirror_maps/FT_remove_zernike_curvatures_from_map.m +++ b/src/new/mirror_maps/FT_remove_zernike_curvatures_from_map.m @@ -61,7 +61,7 @@ function [map_out,A,Rc]=FT_remove_zernike_curvatures_from_map(map,curvature) A(i) = FT_get_zernike_coefficient(zc,n,m); % Remove polynomial - map_out=FT_remove_zernike_polynomial_from_map(map_out,n,m,A); + map_out=FT_remove_zernike_polynomial_from_map(map_out,n,m,A(i)); end diff --git a/src/new/zernike_polynomials/FT_1D_zernike_polynomial.m b/src/new/zernike_polynomials/FT_1D_zernike_polynomial.m index e7965c6c293ffa6e19b8b656e969b22874c8bf47..be370a0743bef2882b53dbcf682868cdea2dd23d 100644 --- a/src/new/zernike_polynomials/FT_1D_zernike_polynomial.m +++ b/src/new/zernike_polynomials/FT_1D_zernike_polynomial.m @@ -21,7 +21,7 @@ function [Z] = FT_1D_zernike_polynomial(n,m,option,points,R) zdata = FT_zernike_polynomial_for_grid(points,points,(points+1)/2,(points+1)/2,R,R,n,m); - Z = FT_select_1D_data(zdata,option,(points+1)/2); + Z = FT_select_1D_data(zdata,option,round((points+1)/2)); end