Calculator Information
- class transfocate.calculator.Calculator(xrt_lenses, tfs_lenses)[source]
Class for the transfocator beryllium lens calculator.
- Parameters:
xrt_lenses (list) – A list of the xrt prefocus lenses
tfs_lenses (list) – A list of the transfocator lenses
- combinations(include_prefocus=True)[source]
All possible combinations of the given lenses
- Parameters:
include_prefocus (bool) – Use only combinations that include a prefocusing lens. If False, only combinations of Transfocator lenses are returned
- Returns:
combos – List of LensConnect objects
- Return type:
list
- find_solution(target, n=4, z_obj=0.0, include_prefocus=True)[source]
Find a combination to reach a specific focus
- Parameters:
target (float) – The desired position of the focal plane in accelerator coordinates
n (int, optional) – The maximum number of lenses in a valid combination. This saves time by avoiding calculating the focal plane of combinations with a large number of lenses
z_obj (float, optional) – The source point of the beam
include_prefocus (bool, optional) – Use only combinations that include a prefocusing lens. If False, only combinations of Transfocator lenses are returned
- Returns:
array – An array of lens combinations with the closest possible image to the target_image
- Return type: