Skip to content
Snippets Groups Projects
Commit 9090f1af authored by Charlotte Bond's avatar Charlotte Bond
Browse files

correcting useage of removal functions

parent 7090de13
Branches
No related tags found
No related merge requests found
......@@ -25,12 +25,10 @@ map = FT_recenter_mirror_map(map);
map = FT_remove_elements_outside_map(map);
% Removing zernike curvature
[map,zc] = FT_remove_zernike_curvatures_from_map(map,'constant');
[map,A,Rc] = FT_remove_zernike_curvatures_from_map(map,'constant');
% Calculate equivalent radius of curvature
R = map.xstep*(FT_find_map_radius(map,'max'));
A = FT_get_zernike_coefficient(zc,2,0);
OF = FT_zernike_optical_features(A,R,2,0);
% Map radius
R = map.xstep*FT_find_map_radius(map);
% Plot mirror
FT_plot_mirror_map(map,0)
......@@ -39,6 +37,6 @@ FT_plot_mirror_map(map,0)
fprintf('--------------------------------------------------------------\n')
fprintf('Mirror diameter: %g cm \n',2*R*100)
fprintf('Zernike amplitude (Z20): %g nm \n',A)
fprintf('Equivalent ROC: %g m \n',OF.value)
fprintf('Equivalent ROC: %g m \n',Rc(1))
fprintf('--------------------------------------------------------------\n')
......@@ -24,19 +24,13 @@ map = FT_recenter_mirror_map(map);
map = FT_remove_elements_outside_map(map);
% Removing zernike curvature
[map,zc] = FT_remove_zernike_curvatures_from_map(map,'constant');
[map,A2,Rc] = FT_remove_zernike_curvatures_from_map(map,'constant');
% Calculating equivalent radius of curvature
R = map.xstep*FT_find_map_radius(map,'max');
A2 = FT_get_zernike_coefficient(zc,2,0);
OF2 = FT_zernike_optical_features(A2,R,2,0);
% Map radius
R = map.xstep*FT_find_map_radius(map);
% Remove zernike offset
map = FT_remove_zernike_offset_from_map(map);
% Equivalent offset
A0 = FT_get_zernike_coefficient(zc,0,0);
OF0 = FT_zernike_optical_features(A0,R,0,0);
[map,A0] = FT_remove_zernike_offset_from_map(map);
% Plot mirror
FT_plot_mirror_map(map,0)
......@@ -45,9 +39,8 @@ FT_plot_mirror_map(map,0)
fprintf('--------------------------------------------------------------\n')
fprintf('Mirror diameter: %g cm \n',2*R*100)
fprintf('Zernike amplitude (Z20): %g nm \n',A2)
fprintf('Equivalent ROC: %g m \n',OF2.value)
fprintf('Equivalent ROC: %g m \n',Rc(1))
fprintf('Zernike amplitude (Z00): %g nm \n',A0)
fprintf('Equivalent offset: %g nm \n',OF0.value)
fprintf('--------------------------------------------------------------\n')
......
......@@ -25,28 +25,16 @@ map = FT_recenter_mirror_map(map);
map = FT_remove_elements_outside_map(map);
% Removing zernike curvature
[map,zc] = FT_remove_zernike_curvatures_from_map(map,'constant');
[map,A2,Rc] = FT_remove_zernike_curvatures_from_map(map,'constant');
% Calculating equivalent radius of curvature
R = map.xstep*FT_find_map_radius(map,'max');
A2 = FT_get_zernike_coefficient(zc,2,0);
OF2 = FT_zernike_optical_features(A2,R,2,0);
% Map radius
R = map.xstep*FT_find_map_radius(map);
% Remove zernike offset
map = FT_remove_zernike_offset_from_map(map);
% Equivalent offset
A0 = FT_get_zernike_coefficient(zc,0,0);
OF0 = FT_zernike_optical_features(A0,R,0,0);
[map,A0] = FT_remove_zernike_offset_from_map(map);
% Remove zernike tilt
map = FT_remove_zernike_tilt_from_map(map);
% Equivalent mis-alignements
A1o = FT_get_zernike_coefficient(zc,1,-1);
OF1o = FT_zernike_optical_features(A1o,R,1,-1);
A1e = FT_get_zernike_coefficient(zc,1,1);
OF1e = FT_zernike_optical_features(A1e,R,1,1);
[map,A1,xbeta,ybeta] = FT_remove_zernike_tilt_from_map(map);
% Plot map
FT_plot_mirror_map(map,0)
......@@ -55,11 +43,10 @@ FT_plot_mirror_map(map,0)
fprintf('--------------------------------------------------------------\n')
fprintf('Mirror diameter: %g cm \n',2*R*100)
fprintf('Zernike amplitude (Z20): %g nm \n',A2)
fprintf('Equivalent ROC: %g m \n',OF2.value)
fprintf('Equivalent ROC: %g m \n',Rc(1))
fprintf('Zernike amplitude (Z00): %g nm \n',A0)
fprintf('Equivalent offset: %g nm \n',OF0.value)
fprintf('Zernike amplitude (Z1-1): %g nm \n',A1o)
fprintf('Equivalent tilt (ybeta): %g urad \n',OF1o.value*1e6)
fprintf('Zernike amplitude (Z11): %g nm \n',A1e)
fprintf('Equivalent tilt (xbeta): %g urad \n',OF1e.value*1e6)
fprintf('Zernike amplitude (Z1-1): %g nm \n',A1(1))
fprintf('Equivalent tilt (ybeta): %g urad \n',ybeta*1e6)
fprintf('Zernike amplitude (Z11): %g nm \n',A1(2))
fprintf('Equivalent tilt (xbeta): %g urad \n',xbeta*1e6)
fprintf('--------------------------------------------------------------\n')
......@@ -16,7 +16,8 @@ clear all;
filename = 'CVI1-S1-BC.asc';
% Read map in .asc format
map = FT_read_zygo_map(filename,2)
map = FT_read_zygo_map(filename,2);
% Prepare the map for use in FINESSE simulations
map_out = FT_prepare_phase_map_for_finesse(map,[0,0],'constant');
\ No newline at end of file
% Using no Gaussian weighting for removal of curvatures
map_out = FT_prepare_phase_map_for_finesse(map,[0,0],0);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment