You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/packages/omc3/analysis.md
+14-10Lines changed: 14 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This page contains a walk-through of a typical but simple analysis workflow with the `omc3` codes.
4
4
To follow along, the reader needs to [have installed](getting_started.md) the `omc3` package and to have measurement or simulation data to use the codes on.
5
-
In case the reader does not have appropriate data to follow along with, a script is provided below to create some.
5
+
In case the reader does not have appropriate data to follow along with, a `MAD-X`script is provided below to create some.
6
6
7
7
## The Analysis Workflow
8
8
@@ -36,8 +36,10 @@ In this walk-through, we will cover the use of the different entrypoints availab
36
36
option, echo=false, warn=false;
37
37
38
38
! ----- Set up Lattice and Define the Optics ----- !
@@ -638,10 +641,10 @@ While `omc3` codes can read data from many machine formats, we will for demonstr
638
641
639
642
For this `omc3` provides the `tbt_converter` entrypoint.
640
643
A typical use consists in specifying the location of your turn-by-turn measurement files, the data type of said files and the location in which to write the converted `SDDS` data.
641
-
The formats supported by the converter are:
644
+
The formats supported by the converter are listed in its help output, the main ones being:
642
645
643
-
- Machine formats: `lhc`, `iota` and `esrf`, or any machine using one of these.
644
-
- Simulation formats: the `trackone` and `ptc` formats from tracking data from `MAD-X` or `PTC`.
646
+
- Machine formats: `lhc`, `sps`, `iota` and `esrf`, or any machine using one of these.
647
+
- Simulation formats: the `trackone` and `ptc` formats from tracking data from `MAD-X` or `PTC`, or `madng` from `MAD-NG`.
645
648
646
649
??? info "The `trackone` and `ptc` formats"
647
650
What is referred to here as the `trackone` or `ptc` format is obtained by giving the `DUMP` and `ONETABLE` options to the `TRACK` or `PTC_TRACK` commands, respectively, in `MAD-X`.
@@ -677,7 +680,7 @@ In order to perform the optics analysis, one needs a model of the given machine
677
680
For this, `omc3` provides the `model_creator` entrypoint, which allows you to run a model simulation of the desired machine and output the needed files.
678
681
679
682
??? example "Supported Machines"
680
-
The out-of-the-box supported machines for model creation are `lhc`, `ps` and `psbooster`, machines we work on.
683
+
The out-of-the-box supported machines for model creation are `lhc`, `sps`, `ps` and `psbooster`, machines we work on.
681
684
While the `skekb`, `JPARC`, `petra` and `iota` have accelerator classes, no model creator has been implemented for them yet.
682
685
It is possible to extend this list for your machine by defining an appropriate `Accelerator` class as well as a model creator.
As one can see, a "model" is essentially one or more TFS files with optics functions at BPMs (`twiss.dat`) and elements (`twiss_elements.dat`), other files being here for the user to understand or reproduce the result.
712
-
Had we created a driven model, then an additional `twiss_ac.dat` or `twiss_adt.dat` file would have been created, with optics functions at BPMs while driving the beam.
715
+
Had we created a driven model, then an additional `twiss_ac.dat` or `twiss_adt.dat` file would have been created, with optics functions at BPMs while exciting the beam.
713
716
One can create their own models without the `model_creator` should they want to, as it only acts as a convenience wrapper.
714
717
715
718
A `driven model` is the same as above, with also a `TWISS` taking into account the exciting effect of an AC dipole or ADT onto the optics.
@@ -721,7 +724,7 @@ Once measurement or simulation is in the appropriate format, the first step as s
721
724
To do so, `omc3` provides the `hole_in_one` entrypoint, which will perform frequency analysis of the data when provided with the `--harpy` flag.
722
725
723
726
The script provides options involved in both data cleaning and parameter tweaking for the harmonic analysis, which is useful when you have relevant information about your measurements.
724
-
To use these, refer to the `Harpy Kwargs` section of the [hole_in_one API documentation][hole_in_one].
727
+
To use these, refer to the `Harpy kwargs` section of the [hole_in_one API documentation][hole_in_one].
725
728
726
729
In our example we will leave most of these to their default values to keep the analysis simple, but ask from `harpy` to output all computed results.
727
730
We will input `lhc` for the `--tbt_datatype` flag, but if you skipped the use of the `tbt_converter` you should input the type of your machine there.
The `*.freqs[xy]` files contain for each BPM in column format the frequencies of the resonance lines detected in the spectrum, for respectively the horizontal (`.freqsx`) and vertical (`.freqsy`) planes while the `*.amps[xy]` files contain the amplitudes of said resonance lines.
775
778
This means in the column of a given BPM, the `nth` row in the `.amps[xy]` file corresponds to the amplitude of the resonance line located at the frequency given by the `nth` row in the column of the same name in the `.freqs[xy]` file.
779
+
776
780
For illustration purposes, simplistic plotting of the horizontal spectrum (without the spectrum plotter mentioned above) from these files would go as:
0 commit comments