beam_specs module

Define parameters necessary to define a beam.

Note

Several parameters hold the derived flag. It means that these quantities are calculated from other parameters by LightWin, and should not be handled by the user.

class BeamTableConfSpec(configured_object: Literal['beam', 'beam_calculator', 'beam_calculator_post', 'design_space', 'evaluators', 'files', 'plots', 'wtf'], table_entry: str, specs: Collection[KeyValConfSpec] | dict[str, Collection[KeyValConfSpec]] | dict[bool, Collection[KeyValConfSpec]], is_mandatory: bool = True, can_have_untested_keys: bool = False, selectkey_n_default: tuple[str, str | bool] | None = None, monkey_patches: dict[str, dict[str, Callable]] | dict[bool, dict[str, Callable]] | None = None)

Bases: TableConfSpec

Set the specifications for the beam.

We subclass TableConfSpec to define some keys requiring a specific treatment.

_pre_treat(toml_subdict: dict[str, Any], **kwargs) None

Edit some values, create new ones.

_validate(toml_subdict: dict[str, Any], **kwargs) bool

Add validations to the default ones.