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

making sure can use for plane wave (no maxtem) command

parent 235dc6cb
Branches
No related tags found
No related merge requests found
...@@ -133,8 +133,13 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror ...@@ -133,8 +133,13 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror
npos = nodes{5}; npos = nodes{5};
% Read in the mirror parameters from blocks % Read in the mirror parameters from blocks
if ~strcmp(etmx,'off')
[R_ETMX,T_ETMX,L_ETMX,phi_ETMX] = FT_read_mirror_parameters_from_blocks(blocks,etmx); [R_ETMX,T_ETMX,L_ETMX,phi_ETMX] = FT_read_mirror_parameters_from_blocks(blocks,etmx);
end
if ~strcmp(etmy,'off')
[R_ETMY,T_ETMY,L_ETMY,phi_ETMY] = FT_read_mirror_parameters_from_blocks(blocks,etmy); [R_ETMY,T_ETMY,L_ETMY,phi_ETMY] = FT_read_mirror_parameters_from_blocks(blocks,etmy);
end
[R_BS,T_BS,L_BS,phi_BS] = FT_read_mirror_parameters_from_blocks(blocks,bs); [R_BS,T_BS,L_BS,phi_BS] = FT_read_mirror_parameters_from_blocks(blocks,bs);
% Read in original reflective coefficients for recycling mirrors % Read in original reflective coefficients for recycling mirrors
...@@ -190,11 +195,15 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror ...@@ -190,11 +195,15 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror
% Perform tunigns twice, once with maxtem 0 and once with the value for % Perform tunigns twice, once with maxtem 0 and once with the value for
% maxtem set in infile % maxtem set in infile
for i=1:ntimes for i=1:ntimes
Nm = 0;
%====================================================================== %======================================================================
%============ 1. Tuning arm cavities to be on resonance =============== %============ 1. Tuning arm cavities to be on resonance ===============
%====================================================================== %======================================================================
%---------------------------------------------------------------------- %----------------------------------------------------------------------
% Tuning the x arm cavity % Tuning the x arm cavity
if ~strcmp(etmx,'off')
tuning = phi_ETMX; tuning = phi_ETMX;
tuning = scan_for_operating_point(FT,Run1,blocks,etmx,nptx,tuning,range,npoints,'max',relative_err,zooms,debug(1)); tuning = scan_for_operating_point(FT,Run1,blocks,etmx,nptx,tuning,range,npoints,'max',relative_err,zooms,debug(1));
...@@ -204,8 +213,12 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror ...@@ -204,8 +213,12 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror
% Setting tuning for x arm % Setting tuning for x arm
phi_ETMX = tuning; phi_ETMX = tuning;
Nm = Nm+1;
tunings(Nm) = phi_ETMX;
blocks = FT_replace_mirror_parameter_in_blocks(blocks,etmx,'phi',phi_ETMX); blocks = FT_replace_mirror_parameter_in_blocks(blocks,etmx,'phi',phi_ETMX);
fprintf('Setting %s tuning to %f\n',etmx,phi_ETMX); fprintf('Setting %s tuning to %f\n',etmx,phi_ETMX);
end
if ~strcmp(etmy,'off')
%---------------------------------------------------------------------- %----------------------------------------------------------------------
% Tuning the y arm cavity % Tuning the y arm cavity
tuning = phi_ETMY; tuning = phi_ETMY;
...@@ -217,8 +230,11 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror ...@@ -217,8 +230,11 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror
% Setting tuning for y arm % Setting tuning for y arm
phi_ETMY = tuning; phi_ETMY = tuning;
Nm = Nm+1;
tunings(Nm) = phi_ETMY;
blocks = FT_replace_mirror_parameter_in_blocks(blocks,etmy,'phi',phi_ETMY); blocks = FT_replace_mirror_parameter_in_blocks(blocks,etmy,'phi',phi_ETMY);
fprintf('Setting %s tuning to %f\n',etmy,phi_ETMY); fprintf('Setting %s tuning to %f\n',etmy,phi_ETMY);
end
%---------------------------------------------------------------------- %----------------------------------------------------------------------
%====================================================================== %======================================================================
%====================================================================== %======================================================================
...@@ -236,6 +252,8 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror ...@@ -236,6 +252,8 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror
% Setting BS tuning % Setting BS tuning
phi_BS = tuning; phi_BS = tuning;
Nm = Nm+1;
tunings(Nm) = phi_BS;
blocks = FT_replace_mirror_parameter_in_blocks(blocks,bs,'phi',phi_BS); blocks = FT_replace_mirror_parameter_in_blocks(blocks,bs,'phi',phi_BS);
fprintf('Setting %s tuning to %f\n',bs,phi_BS); fprintf('Setting %s tuning to %f\n',bs,phi_BS);
%====================================================================== %======================================================================
...@@ -265,6 +283,8 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror ...@@ -265,6 +283,8 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror
% Setting BS tuning % Setting BS tuning
phi_PRM = tuning; phi_PRM = tuning;
Nm = Nm+1;
tunings(Nm) = phi_PRM;
blocks = FT_replace_mirror_parameter_in_blocks(blocks,prm,'phi',phi_PRM); blocks = FT_replace_mirror_parameter_in_blocks(blocks,prm,'phi',phi_PRM);
fprintf('Setting %s tuning to %f\n',prm,phi_PRM); fprintf('Setting %s tuning to %f\n',prm,phi_PRM);
%============================================================== %==============================================================
...@@ -303,6 +323,8 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror ...@@ -303,6 +323,8 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror
% Setting BS tuning % Setting BS tuning
phi_SRM = tuning+srm_tuning; phi_SRM = tuning+srm_tuning;
Nm = Nm+1;
tunings(Nm) = phi_SRM;
blocks = FT_replace_mirror_parameter_in_blocks(blocks,srm,'phi',phi_SRM); blocks = FT_replace_mirror_parameter_in_blocks(blocks,srm,'phi',phi_SRM);
fprintf('setting %s tuning to %f\n',srm,phi_SRM); fprintf('setting %s tuning to %f\n',srm,phi_SRM);
%============================================================== %==============================================================
...@@ -312,15 +334,6 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror ...@@ -312,15 +334,6 @@ function [tunings] = FT_DR_FP_MICH_initial_tuning(infile,outfile,commands,mirror
end end
% Store final tunings
tunings = [phi_ETMX phi_ETMY phi_BS];
if ~strcmp(prm,'off')
tunings(4) = phi_PRM;
end
if ~strcmp(srm,'off')
tuning(5) = phi_SRM;
end
if length(commands)>0 if length(commands)>0
% Writing new output file, adding command lines back in % Writing new output file, adding command lines back in
FT_write_blocks_into_file([blocks,command_blocks],outfile); FT_write_blocks_into_file([blocks,command_blocks],outfile);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment