field_map module
Hold a FIELD_MAP.
Todo
Handle the different kind of field_maps…
Todo
Completely handle the SET_SYNCH_PHASE command
Todo
Hande phi_s fitting with TraceWin.
Note
When subclassing field_maps, do not forget to update the transfer matrix
selector in:
- Envelope3D
- ElementEnvelope3DParameters
- SetOfCavitySettings
- the run_with_this methods
- IMPLEMENTED_STATUS = ( 'nominal', 'rephased (in progress)', 'rephased (ok)', 'failed', 'compensate (in progress)', 'compensate (ok)', 'compensate (not ok)')
- class FieldMap(line: DatLine, default_field_map_folder: Path, cavity_settings: CavitySettings, dat_idx: int | None = None, **kwargs)
Bases:
ElementA generic
FIELD_MAP.- base_name = 'FM'
- __init__(line: DatLine, default_field_map_folder: Path, cavity_settings: CavitySettings, dat_idx: int | None = None, **kwargs) None
Set most of attributes defined in
TraceWin.
- property status: str
Give the status from the
CavitySettings.
- update_status(new_status: str) None
Change the status of the cavity.
We use
ElementBeamCalculatorParameters.re_set_for_broken_cavity()method. Ifk_e,phi_s,v_cav_mvare altered, this is performed inCavitySettings.status()setter.
- set_full_path(extensions: dict[str, list[str]]) None
Set absolute paths with extensions of electromagnetic files.
- keep_cavity_settings(cavity_settings: CavitySettings) None
Keep the cavity settings that were found.
- get(*keys: str, to_numpy: bool = True, none_to_nan: bool = False, **kwargs: bool | str | None) Any
Shorthand to get attributes from this class or its attributes.
- to_line(which_phase: Literal['phi_0_abs', 'phi_0_rel', 'phi_s', 'as_in_settings', 'as_in_original_dat'] = 'phi_0_rel', *args, **kwargs) list[str]
Convert the object back into a line in the
.datfile.- Parameters:
- Returns:
The line in the
.dat, with updated amplitude and phase from current object.- Return type:
- property _indexes_in_line: dict[str, int]
Give the position of the arguments in the
FIELD_MAPcommand.
- _abc_impl = <_abc._abc_data object at 0x7f36f97bd400>