navigate.model.features.adaptive_optics.TonyWilson
- class navigate.model.features.adaptive_optics.TonyWilson(model)
Bases:
object
Tony Wilson iterative AO routine
- __init__(model)
Initialize the Tony Wilson iterative AO routine
- Parameters:
model (Model) – Model object
Methods
__init__
(model)Initialize the Tony Wilson iterative AO routine
build_report
()End the data
End the signal
get_steps
(ranges, step_size)Calculate the number of steps and the position offset
Calculate how many frames are needed: iterations x steps x num_coefs
in_func_data
([frame_ids])Run the data
Run the signal.
Prepare the data
Prepare the signal
process_data
(coef[, mode])Process the data
run
(*args)Run the Tony Wilson iterative AO routine
Attributes
Number of modes
Number of iterations
Number of steps
Coefficient amplitude
True if all iterations are done, False otherwise
True if the current iteration is done, False otherwise
detailed report to save as JSON after
Model object
Mirror object
whether to save report at the end of run
List of coefficients to change
List of mode names
- end_func_data()
End the data
- Returns:
True if the data is done, False otherwise
- Return type:
bool
- end_func_signal()
End the signal
- Returns:
True if the signal is done, False otherwise
- Return type:
bool
- get_steps(ranges, step_size)
Calculate the number of steps and the position offset
- Parameters:
ranges (int) – Range of the scan
step_size (int) – Step size
- Returns:
int – Number of steps
int – Position offset
- get_tw_frame_num()
Calculate how many frames are needed: iterations x steps x num_coefs
- in_func_data(frame_ids=[])
Run the data
- Parameters:
frame_ids (list, optional) – List of frame ids, by default []
- Returns:
List of frame ids
- Return type:
list
- in_func_signal()
Run the signal.
- Returns:
True if the signal is done, False otherwise
- Return type:
bool
- pre_func_data()
Prepare the data
- pre_func_signal()
Prepare the signal
- process_data(coef, mode='poly')
Process the data
- Parameters:
coef (int) – Coefficient index
mode (str, optional) – Fitting mode, by default “poly”
- run(*args)
Run the Tony Wilson iterative AO routine
- Parameters:
args[0] (dict) – Current microscope state.
args[1] (dict) – Autofocus parameters
- change_coef
List of coefficients to change
- Type:
list
- coef_amp
Coefficient amplitude
- Type:
float
- done_all
True if all iterations are done, False otherwise
- Type:
bool
- done_itr
True if the current iteration is done, False otherwise
- Type:
bool
- mirror_controller
Mirror object
- Type:
navigate.model.devices.mirrors.mirror_imop.ImagineOpticsMirror
- mode_names
List of mode names
- Type:
list
- model
Model object
- Type:
navigate.model.Model
- n_iter
Number of iterations
- Type:
int
- n_modes
Number of modes
- Type:
int
- n_steps
Number of steps
- Type:
int
- report
detailed report to save as JSON after
- Type:
list
- save_report
whether to save report at the end of run
- Type:
bool