Common configuration keys
Below are listed the configuration keys commonly used in the the [wtf] section, independently of the chosen failure-compensation strategy.
Entry |
Type |
Description |
Mandatory? |
Allowed values |
|---|---|---|---|---|
|
|
Automatically generate the list of failed cavities to avoid manually typing all the cavities identifiers in systematic studies. |
❌ |
(‘single cavity failures’, ‘cryomodule failures’) |
|
|
Identifies list of failed cavities. This is typically a list of list of cavity identifiers (2D), but it can be a 1D list for automatic studies and it must be a 3D array if
|
✅ |
|
|
|
kwargs for the |
❌ |
|
|
|
Indicates if element (s), index of element (s), index of cavities. It can also be the index (es) of one or severalsection (s), or of one or several lattice (s). |
✅ |
(‘cavity’, ‘element’, ‘lattice’, ‘name’, ‘section’) |
|
|
Specify whether user-provided cavity indices are 0-based or 1-based. Set cavity has index 0 ( Python-style, default). Set if the first cavity has index 1 (human-friendly). This affects how the
interpret integer indices. |
❌ |
(0, 1) |
|
|
Objectives for the optimisation algorithm. |
✅ |
(‘CorrectorAtExit’, ‘EnergyMismatch’, ‘EnergyPhaseMismatch’, ‘EnergySeveralMismatches’, ‘EnergySyncPhaseMismatch’, ‘RegularEnvelope’, ‘experimental’, ‘rephased_ADS’, ‘simple_ADS’, ‘sync_phase_as_objective_ADS’) |
|
|
Name of optimisation algorithm. |
✅ |
(‘bayesian_optimization’, ‘differential_evolution’, ‘downhill_simplex’, ‘downhill_simplex_penalty’, ‘experimental’, ‘explorator’, ‘least_squares’, ‘least_squares_penalty’, ‘nelder_mead’, ‘nelder_mead_penalty’, ‘NSGA-III’, ‘NSGA-III Multi-threaded’, ‘simulated_annealing’) |
|
|
Keyword arguments passed to the optimisation algorithm. |
❌ |
|
|
|
How compensating cavities are selected. |
✅ |
(‘corrector at exit’, ‘global’, ‘global_downstream’, ‘k out of n’, ‘l neighboring lattices’, ‘manual’) |
Choice of failed cavities
General case
The failed cavities are selected using the failed keyword.
This is typically a 2D list identifying groups of simultaneously failed cavities.
Each inner list represents one FaultScenario.
Example
failed = [
["FM50"],
["FM60", "FM61"],
["FM50", "FM60", "FM61"],
]
id_nature = "name"
The above example defines three FaultScenarios:
The cavity named FM50 is broken.
The cavities FM60 and FM61 are broken.
The cavities FM50, FM60 and FM61 are broken.
id_nature controls how cavity identifiers are interpreted (names, cavity indices, element indices…).
The above example could also be written:
failed = [
[49],
[59, 60],
[49, 59, 60],
]
id_nature = "cavity"
Note
Indexes start at 0 by default.
Hence, a cavity numbered \(i\) by the user corresponds to index i - 1 internally.
If you set index_offset = 1, the same cavity will use index i, which may feel more natural for users.
Automatic studies
The automatic_study configuration key saves you the hassle of having to manually type all the cavity names when performing systematic studies.
Concretely, it expand failed into all individual FaultScenario used in a systematic study.
Two modes are available:
"single cavity failures": study all single cavity failures infailed.
"cryomodule failures": study all cryomodule failures.
When automatic_study is set, failed should be a 1D list.
Examples
Study all single failures of the first five lattices:
automatic_study = "single cavity failures"
failed = [0, 1, 2, 3, 4]
id_nature = "lattice"
Study all cryomodule failures in the first three sections:
automatic_study = "cryomodule failures"
failed = [0, 1, 2]
id_nature = "section"
Manual association of failed/compensating cavities
If you want to manually associate each failed cavity to its compensating cavities, failed must be a 3D list:
first dimension:
FaultScenariossecond dimension: groups of failed cavities (
Faults)third dimension: cavity identifiers in each group.
See also
The specific documentation for strategy = "manual".
Attribution of compensating cavities to every fault
The association of failed cavities with their compensating cavities is done with the strategy key.
The functions that assign compensating cavities to each failed cavity are listed below.
Strategy function |
Corresponding keyword |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Every strategy requires user to set specific parameters, as listed below.