Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mbtrack2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PA
Collective Effects
mbtrack2
Commits
cbd90bb7
Commit
cbd90bb7
authored
Mar 1, 2021
by
Gamelin Alexis
Browse files
Options
Downloads
Patches
Plain Diff
[Fix] Remove previous commit
parent
5b0aa938
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
tracking/element.py
+1
-22
1 addition, 22 deletions
tracking/element.py
tracking/monitors/monitors.py
+1
-1
1 addition, 1 deletion
tracking/monitors/monitors.py
tracking/optics.py
+1
-2
1 addition, 2 deletions
tracking/optics.py
tracking/synchrotron.py
+0
-15
0 additions, 15 deletions
tracking/synchrotron.py
with
3 additions
and
40 deletions
tracking/element.py
+
1
−
22
View file @
cbd90bb7
...
@@ -142,27 +142,6 @@ class SynchrotronRadiation(Element):
...
@@ -142,27 +142,6 @@ class SynchrotronRadiation(Element):
# Reset energy change to 0 for next turn
# Reset energy change to 0 for next turn
bunch
.
energy_change
=
0
bunch
.
energy_change
=
0
#--------------------------------------
# if (self.switch[0] == True):
# rand = np.random.normal(size=len(bunch))
# bunch["delta"] = ((1 - 2*self.ring.T0/self.ring.tau[2])*bunch["delta"] +
# 2*self.ring.sigma_delta*(self.ring.T0/self.ring.tau[2])**0.5*rand)
# if (self.switch[1] == True):
# rand = np.random.normal(size=(len(bunch),2))
# bunch["x"] += self.ring.sigma[0]*(2*self.ring.T0/self.ring.tau[0])**0.5*rand[:,0]
# bunch["xp"] = (1 + bunch["delta"])/(1 + bunch["delta"] + bunch.energy_change)*bunch["xp"]
# bunch["xp"] += self.ring.sigma[1]*(2*self.ring.T0/self.ring.tau[0])**0.5*rand[:,1]
# if (self.switch[2] == True):
# rand = np.random.normal(size=(len(bunch),2))
# bunch["y"] += self.ring.sigma[2]*(2*self.ring.T0/self.ring.tau[1])**0.5*rand[:,0]
# bunch["yp"] = (1 + bunch["delta"])/(1 + bunch["delta"] + bunch.energy_change)*bunch["yp"]
# bunch["yp"] += self.ring.sigma[3]*(2*self.ring.T0/self.ring.tau[1])**0.5*rand[:,1]
# # Reset energy change to 0 for next turn
# bunch.energy_change = 0
#----------------------------------------
class
TransverseMap
(
Element
):
class
TransverseMap
(
Element
):
"""
"""
Transverse map for a single turn in the synchrotron.
Transverse map for a single turn in the synchrotron.
...
...
This diff is collapsed.
Click to expand it.
tracking/monitors/monitors.py
+
1
−
1
View file @
cbd90bb7
...
@@ -16,7 +16,7 @@ from mbtrack2.tracking.element import Element
...
@@ -16,7 +16,7 @@ from mbtrack2.tracking.element import Element
from
mbtrack2.tracking.particles
import
Bunch
,
Beam
from
mbtrack2.tracking.particles
import
Bunch
,
Beam
from
scipy.interpolate
import
interp1d
from
scipy.interpolate
import
interp1d
from
abc
import
ABCMeta
from
abc
import
ABCMeta
#
from mpi4py import MPI
from
mpi4py
import
MPI
class
Monitor
(
Element
,
metaclass
=
ABCMeta
):
class
Monitor
(
Element
,
metaclass
=
ABCMeta
):
"""
"""
...
...
This diff is collapsed.
Click to expand it.
tracking/optics.py
+
1
−
2
View file @
cbd90bb7
...
@@ -215,7 +215,6 @@ class Optics:
...
@@ -215,7 +215,6 @@ class Optics:
"""
"""
return
self
.
_local_gamma
return
self
.
_local_gamma
def
beta
(
self
,
position
):
def
beta
(
self
,
position
):
"""
"""
Return beta functions at specific locations given by position. If no
Return beta functions at specific locations given by position. If no
...
...
This diff is collapsed.
Click to expand it.
tracking/synchrotron.py
+
0
−
15
View file @
cbd90bb7
...
@@ -265,21 +265,6 @@ class Synchrotron:
...
@@ -265,21 +265,6 @@ class Synchrotron:
sigma
[
3
,:]
=
(
self
.
emit
[
1
]
*
self
.
optics
.
alpha
(
position
)[
1
]
+
sigma
[
3
,:]
=
(
self
.
emit
[
1
]
*
self
.
optics
.
alpha
(
position
)[
1
]
+
self
.
optics
.
dispersion
(
position
)[
3
]
**
2
*
self
.
sigma_delta
)
**
0.5
self
.
optics
.
dispersion
(
position
)[
3
]
**
2
*
self
.
sigma_delta
)
**
0.5
return
sigma
return
sigma
#------------------------------------------
# @property
# def sigma(self):
# """RMS beam size at equilibrium"""
# sigma = np.zeros((4,))
# sigma[0] = (self.emit[0]*self.optics.beta(10)[0] +
# self.optics.dispersion(10)[0]**2*self.sigma_delta)**0.5
# sigma[1] = (self.emit[0]*self.optics.alpha(10)[0] +
# self.optics.dispersion(10)[1]**2*self.sigma_delta)**0.5
# sigma[2] = (self.emit[1]*self.optics.beta(10)[1] +
# self.optics.dispersion(10)[2]**2*self.sigma_delta)**0.5
# sigma[3] = (self.emit[1]*self.optics.alpha(10)[1] +
# self.optics.dispersion(10)[3]**2*self.sigma_delta)**0.5
# return sigma
#------------------------------------------
def
synchrotron_tune
(
self
,
Vrf
):
def
synchrotron_tune
(
self
,
Vrf
):
"""
"""
...
...
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