Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MatlabOperation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
49
Issues
49
List
Boards
Labels
Service Desk
Milestones
Jira
Jira
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BeamDynamics
MatlabOperation
Commits
20939f96
Commit
20939f96
authored
Feb 08, 2019
by
Simone Liuzzo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
derivative of dispersion and tune vs K_quad modified to be identical to numeric ones
parent
b04b7f6a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
qem/qemderivAnalytic.m
qem/qemderivAnalytic.m
+5
-7
qem/qempanel2.fig
qem/qempanel2.fig
+0
-0
No files found.
qem/qemderivAnalytic.m
View file @
20939f96
...
...
@@ -81,8 +81,8 @@ else
disp
(
'computation starts on lattice without errors/correctors'
);
[
dDx_dq
,
~
]
=
qemdispderiv
(
qemres
(
1
)
.
at
,
qemres
.
ct
,
@
setk
,
1.e-3
,
...
[
varidx
],
qemres
.
bpmidx
,
dispfunc
);
% h dispersion derivative resepct to quadrupoles
dDx_dq
=
dDx_dq
.
/
qemres
.
qcorl
(:,
ones
(
1
,
size
(
dDx_dq
,
1
)))
'
;
% as in semskewresp
qemres
.
quadhdispresponse
=
dDx_dq
;
%
dDx_dq=dDx_dq./qemres.qcorl(:,ones(1,size(dDx_dq,1)))'; % as in semskewresp
qemres
.
quadhdispresponse
=
dDx_dq
;
% dDx/dKn
disp
(
'finished. stored in qemres.quadhdispresponse'
)
end
...
...
@@ -92,8 +92,6 @@ function elem=setk(elem,dk)
elem
.
PolynomB
(
2
)
=
k
;
end
dDx_dq
=
dDx_dq
.*
alpha_c
/
2
;
qind
=
find
(
atgetcells
(
mach
,
'Class'
,
'Quadrupole'
))
'
;
% response matrix computed always at all quadrupoles
% tune derivative analytic
...
...
@@ -104,7 +102,7 @@ else
[
l
,
~
,
~
]
=
atlinopt
(
mach
,
0
,
qind
);
betas
=
[
arrayfun
(
@
(
a
)
a
.
beta
(
1
),
l
,
'un'
,
1
);
arrayfun
(
@
(
a
)
a
.
beta
(
2
),
l
,
'un'
,
1
)];
L
=
cellfun
(
@
(
a
)
a
.
Length
,
mach
(
qind
),
'un'
,
1
)
'
;
dTunes_dq
=
-
betas
/
4
/
pi
.*
L
;
dTunes_dq
=
betas
/
4
/
pi
.*
L
;
% dQhv/dKn
qemres
.
quadtuneresponse
=
dTunes_dq
;
disp
(
'finished. stored in qemres.quadtuneresponse'
)
end
...
...
@@ -117,11 +115,11 @@ for iq=1:nq
ib
=
quadforresponse
(
iq
);
% use only selected quadrupoles
rha
=
dX_dq
(:,:,
ib
);
rva
=
dY_dq
(:,:,
ib
);
dxdqa
=
[
dDx_dq
(:,
ib
);
dTunes_dq
(:,
ib
)]
/
dval
(
iq
);
%
analytic, no tune dispersion derivative very different from
dxdqa
=
[
dDx_dq
(:,
ib
);
dTunes_dq
(:,
ib
)]
;
%/dval(iq)
analytic, no tune dispersion derivative very different from
dresp
(:,
iq
)
=
[
rha
(:);
rva
(:);
dxdqa
];
rhsa
=
dXY_ds
(:,:,
ib
);
rvsa
=
dYX_ds
(:,:,
ib
);
dxdqsa
=
[
dDy_ds
(:,
ib
)]
/
dval
(
iq
);
%
analytic, no tune dispersion derivative very different from
dxdqsa
=
[
dDy_ds
(:,
ib
)]
;
%/dval(iq)
analytic, no tune dispersion derivative very different from
drespskew
(:,
iq
)
=
[
rhsa
(:);
rvsa
(:);
dxdqsa
];
...
...
qem/qempanel2.fig
View file @
20939f96
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment