Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FCC-ee-lattice
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
acc-models
acc-models-fcc
FCC-ee-lattice
Commits
fc9c7c07
Commit
fc9c7c07
authored
1 year ago
by
Michael Hofer
Browse files
Options
Downloads
Patches
Plain Diff
fix formatting
parent
ad02895c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#5558108
failed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
web/create_web.py
+5
-7
5 additions, 7 deletions
web/create_web.py
with
5 additions
and
7 deletions
web/create_web.py
+
5
−
7
View file @
fc9c7c07
...
@@ -29,7 +29,6 @@ ELEMENT_STYLES = [
...
@@ -29,7 +29,6 @@ ELEMENT_STYLES = [
]
]
PARAMETER_WITH_UNITS
=
{
PARAMETER_WITH_UNITS
=
{
"
CIRCUMFERENCE
"
:
r
'
Circumference~[m]
'
,
"
CIRCUMFERENCE
"
:
r
'
Circumference~[m]
'
,
"
BENDING_RADIUS_OF_ARC_DIPOLE
"
:
r
'
Bending radius of arc dipole~[m]
'
,
"
BENDING_RADIUS_OF_ARC_DIPOLE
"
:
r
'
Bending radius of arc dipole~[m]
'
,
"
ENERGYLOSS_PER_TURN
"
:
r
'
Energy loss/turn~[GeV]
'
,
"
ENERGYLOSS_PER_TURN
"
:
r
'
Energy loss/turn~[GeV]
'
,
...
@@ -59,8 +58,7 @@ PARAMETER_WITH_UNITS={
...
@@ -59,8 +58,7 @@ PARAMETER_WITH_UNITS={
"
CRAB_WAIST_RATIO
"
:
r
"
$Crab waist ratio$
"
,
"
CRAB_WAIST_RATIO
"
:
r
"
$Crab waist ratio$
"
,
"
BEAMBEAM_TUNESHIFT_X
"
:
r
"
$Beam-beam tune shift \xi_x$
"
,
"
BEAMBEAM_TUNESHIFT_X
"
:
r
"
$Beam-beam tune shift \xi_x$
"
,
"
BEAMBEAM_TUNESHIFT_Y
"
:
r
"
$Beam-beam tune shift \xi_y$
"
,
"
BEAMBEAM_TUNESHIFT_Y
"
:
r
"
$Beam-beam tune shift \xi_y$
"
,
"
LUMINOSITY_PER_IP
"
:
r
"
$Luminosity / IP~[10^{34}cm^{-2}s^{-1}]$
"
,
"
LUMINOSITY_PER_IP
"
:
r
"
$Luminosity / IP~[10^{34}cm^{-2}s^{-1}]$
"
,
}
}
# Script arguments -------------------------------------------------------------
# Script arguments -------------------------------------------------------------
...
@@ -89,7 +87,7 @@ def main(opt):
...
@@ -89,7 +87,7 @@ def main(opt):
# the df is then transformed into an mk table and fills the parameter template
# the df is then transformed into an mk table and fills the parameter template
operation_modes
=
pd
.
json_normalize
([
REFERENCE_FILE
[
key
]
for
key
in
OPERATION_MODES
])
operation_modes
=
pd
.
json_normalize
([
REFERENCE_FILE
[
key
]
for
key
in
OPERATION_MODES
])
operation_modes
.
index
=
OPERATION_MODES
operation_modes
.
index
=
OPERATION_MODES
with
open
(
REPOSITORY_TOP_LEVEL
/
'
CHANGELOG.md
'
)
as
f
:
with
open
(
REPOSITORY_TOP_LEVEL
/
'
CHANGELOG.md
'
)
as
f
:
changelog
=
f
.
read
()
changelog
=
f
.
read
()
...
@@ -247,7 +245,7 @@ def plot_lattice_elements(figure, twiss):
...
@@ -247,7 +245,7 @@ def plot_lattice_elements(figure, twiss):
# create position column to correct for mad-x usually outputting the s of the end of an element
# create position column to correct for mad-x usually outputting the s of the end of an element
twiss
[
'
POSITION
'
]
=
twiss
[
'
S
'
]
-
0.5
*
twiss
[
'
L
'
]
twiss
[
'
POSITION
'
]
=
twiss
[
'
S
'
]
-
0.5
*
twiss
[
'
L
'
]
# modify lengths in order to plot zero-length elements
# modify lengths in order to plot zero-length elements
twiss
.
loc
[
twiss
[
'
L
'
]
==
0.0
,
'
L
'
]
=
0.001
twiss
.
loc
[
twiss
[
'
L
'
]
==
0.0
,
'
L
'
]
=
0.001
...
@@ -259,14 +257,14 @@ def plot_lattice_elements(figure, twiss):
...
@@ -259,14 +257,14 @@ def plot_lattice_elements(figure, twiss):
element
[
'
height
'
],
element
[
'
height
'
],
element
[
'
color
'
]
element
[
'
color
'
]
)
)
add_element_group
(
figure
,
add_element_group
(
figure
,
twiss
.
loc
[(
twiss
.
KEYWORD
.
str
.
contains
(
'
QUADRUPOLE
'
))
&
(
twiss
.
K1L
>
0.0
)],
twiss
.
loc
[(
twiss
.
KEYWORD
.
str
.
contains
(
'
QUADRUPOLE
'
))
&
(
twiss
.
K1L
>
0.0
)],
0.6
,
0.6
,
1.2
,
1.2
,
'
red
'
'
red
'
)
)
add_element_group
(
figure
,
add_element_group
(
figure
,
twiss
.
loc
[(
twiss
.
KEYWORD
.
str
.
contains
(
'
QUADRUPOLE
'
))
&
(
twiss
.
K1L
<
0.0
)],
twiss
.
loc
[(
twiss
.
KEYWORD
.
str
.
contains
(
'
QUADRUPOLE
'
))
&
(
twiss
.
K1L
<
0.0
)],
-
0.6
,
-
0.6
,
...
...
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