From 12df7876752598867a42d0199727c0f796eb2bf4 Mon Sep 17 00:00:00 2001 From: Charlotte Bond <czb@star.sr.bham.ac.uk> Date: Mon, 31 Mar 2014 16:10:37 +0100 Subject: [PATCH] conforming functions --- src/new/mirror_maps/FT_prepare_phase_map_for_finesse.m | 5 ++--- src/new/mirror_maps/FT_remove_zernike_curvatures_from_map.m | 2 +- src/new/zernike_polynomials/FT_1D_zernike_polynomial.m | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) 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 65b041d..11b7f6a 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 a979743..746dc07 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 e7965c6..be370a0 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 -- GitLab