MPL: KnownElementsList.plot_survey()#1040
Conversation
ee5ab6d to
b9bde5e
Compare
KnownElementsList.plot()KnownElementsList.plot_survey()
3c83b75 to
524fd84
Compare
| # if el_type == "Kicker": | ||
| # height = copysign(0.8, el_dict["xkick"]) |
Check notice
Code scanning / CodeQL
Commented-out code Note
| "Quad": "tab:blue", | ||
| "Multipole": "tab:orange", | ||
| "Sbend": "tab:green", | ||
| "CFbend": "tab:olive", # TODO: improve and plot as two on top of each other | ||
| "ConstF": "tab:red", | ||
| "ChrPlasmaLens": "tab:red", | ||
| "SoftSolenoid": "tab:red", | ||
| "TaperedPL": "tab:red", | ||
| "RFCavity": "tab:brown", | ||
| "ShortRF": "tab:brown", | ||
| "Buncher": "tab:purple", | ||
| "Aperture": "black", | ||
| "Kicker": "tab:pink", | ||
| # 'tab:cyan' | ||
| "other": "tab:gray", |
There was a problem hiding this comment.
To double check, I asked again about the colors according to ChatGPT:
- sbend (main dipole) – blue
- quadrupole – silver-grey stainless steel (white for the IR triplets)
- multipole corrector (sextupole, octupole, …) – blue
- final-focus / triplet quadrupole (generic “focusing element”) – white
- RF accelerating cavity (400 MHz) – white
- RF buncher cavity (800 MHz) – white
- aperture / collimator – beige-ivory (sometimes bare stainless steel)
- kicker – black
There was a problem hiding this comment.
slac-lcls2:
(visual appearance in the LCLS-II tunnel / gallery)
- sbend (dipole) – teal-green
- quadrupole – teal-green
- multipole (sextupole, octupole, corrector) – teal-green
- other focusing magnets (doublets, triplets) – teal-green
- 1.3 GHz SRF cryomodule – light-grey / metallic stainless-steel
- 3.9 GHz harmonic (bunch-length control) cryomodule – light-grey / metallic stainless-steel
- warm 2.856 GHz copper buncher cavity – copper-orange
- aperture / collimator / slit – bare stainless-steel (silver-grey)
- kicker (fast deflector) – teal-green
There was a problem hiding this comment.
lbnl-als (ALS-U)
- sbend (dipole) – turquoise / teal-green
- quadrupole – turquoise / teal-green
- multipole (sextupole, octupole, corrector) – turquoise / teal-green
- other focusing elements (doublets, triplets) – turquoise / teal-green
- 500 MHz RF accelerating cavity – bare copper (reddish-orange)
- higher-harmonic / bunching cavity – bare copper (reddish-orange)
- aperture / collimator / absorber – bare stainless-steel (silver-grey)
- kicker (injection / extraction) – turquoise / teal-green
There was a problem hiding this comment.
cornell-cesr:
- sbend (dipole) – blue
- quadrupole – green
- multipole (sextupole / octupole / corrector) – red
- other focusing elements (doublets / triplets) – green
- RF accelerating cavity – bare copper (reddish-orange)
- RF buncher / harmonic cavity – bare copper (reddish-orange)
- aperture / collimator / absorber – bare stainless-steel (silver-grey)
- kicker (injection / extraction) – yellow
There was a problem hiding this comment.
fnal-pip-ii (PIP-II linac / transfer line):
- sbend (dipole) – teal-green
- quadrupole – teal-green
- multipole / corrector (sextupole, dipole corrector, etc.) – teal-green
- other warm focusing elements (doublets, triplets) – teal-green
- superconducting RF cryomodules (HWR, SSR1/2, LB650, HB650) – light-grey brushed stainless-steel
- 162.5 MHz RFQ – light-grey brushed stainless-steel
- 325 MHz room-temperature buncher cavity – copper-orange
- aperture / collimator / absorber – bare stainless-steel (silver-grey)
- kicker / chopper – teal-green
There was a problem hiding this comment.
I will add such palettes in a follow-up PR where we can do a careful review and detailed docs.
There was a problem hiding this comment.
I did some checks on the SPS/LHC complex and there are def some hallucinations in the above responses :)
Example: ```py import matplotlib.pyplot as plt sim.lattice.plot_survey(ref) plt.show() ```
cemitch99
left a comment
There was a problem hiding this comment.
Great! I tried this and it worked for me. I just left a suggestion regarding the documentation.
Co-authored-by: Chad Mitchell <46825199+cemitch99@users.noreply.github.com>
Quick plot of a lattice over
s.Implement #887 (comment)
Example
To Do
rcplot_surveyFollow-Up
refparticle if the lattice is crated fromsim.lattice