Element documentation
Element(in_parameters=None, index=None, elem_type=None)
Bases: ABC
Generic class for element handling in the beamline.
Attributes:
| Name | Type | Description |
|---|---|---|
settings |
Optional[dict]
|
Dictionary containing the element settings. |
girder |
Optional[Girder]
|
The girder reference the |
type |
Optional[str]
|
The type of the element. |
index |
Optional[int]
|
ID of the element |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
in_parameters |
Optional[dict]
|
The dict with input settings. |
None
|
girder |
The girder reference the |
required | |
index |
Optional[int]
|
The index of the element in the lattice. |
None
|
cache_data()
Cache the cachable parameters.
Note: the parameters that can be cached are forcely initiated and assigned to 0.0 when the Element is created.
to_placet()
Convert the element to a Placet format.
Returns:
| Type | Description |
|---|---|
str
|
A string line containing the element description in Placet format. |
use_cached_data(clear_cache=False)
Use the data stored in cache.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
clear_cache |
bool
|
If True clears the cache after uploading. |
False
|