Skip to content
Snippets Groups Projects
Commit fc9c7c07 authored by Michael Hofer's avatar Michael Hofer
Browse files

fix formatting

parent ad02895c
No related branches found
No related tags found
No related merge requests found
Pipeline #5558108 failed
...@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment