Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
finesse
simtools
Commits
c04a3f8c
Commit
c04a3f8c
authored
11 years ago
by
Charlotte Bond
Browse files
Options
Downloads
Patches
Plain Diff
making sure can use for plane wave (no maxtem) command
parent
235dc6cb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/new/finesse/prepare_files/FT_DR_FP_MICH_initial_tuning.m
+49
-36
49 additions, 36 deletions
src/new/finesse/prepare_files/FT_DR_FP_MICH_initial_tuning.m
with
49 additions
and
36 deletions
src/new/finesse/prepare_files/FT_DR_FP_MICH_initial_tuning.m
+
49
−
36
View file @
c04a3f8c
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment