User Select
user_select
Standard selectors for going from user inputs to various scan resources and settings.
Re-usable in many different sorts of scans.
Attributes
Classes
Functions
select_diagnostic
Standard selector used to assemble the blop/xopt scans.
From some standard set of options, return the diagnostic device we'll be use using in the optimization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_type
|
Devices
|
One of "yag" or "wave8" |
required |
location
|
Diagnostics
|
One of "xcs1", "dg1", "dg2", "ip" |
required |
Source code in mfx/optimize/user_select.py
select_goal
select_goal(device_type: Devices, location: Diagnostics, goal: Optional[float] = None, goal_2d: Optional[tuple[float, float]] = None, use_2d_markers: bool = False) -> Union[float, tuple[float, float]]
Select a goal for the alignment.
The goal is either a specific point on a 2d plane or on a 1d line.
Exactly one of goal, goal_2d, and use_2d_markers must be provided.
Some other combinations of arguments are not allowed and will raise ValueError.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
device_type
|
Devices
|
One of "yag" or "wave8" |
required |
location
|
Diagnostics
|
One of "xcs1", "dg1", "dg2", "ip" |
required |
goal
|
float
|
1D goal to align to |
None
|
goal_2d
|
tuple[float, float]
|
2D goal to align to |
None
|
use_2d_markers
|
bool
|
Set to True to automatically select the goal from the camviewer makers. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
goal |
float or tuple[float, float]
|
The location to align to, given the settings. |