navigate.model.features.adaptive_optics.TonyWilson
- class navigate.model.features.adaptive_optics.TonyWilson(model, verbose=False)
Bases:
FeatureBaseTony Wilson iterative AO routine
- __init__(model, verbose=False)
Initialize the Tony Wilson iterative AO routine
- Parameters:
model (Model) – Model object
Methods
__init__(model[, verbose])Initialize the Tony Wilson iterative AO routine
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
- build_report()
- 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
- 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_modes
Number of modes
- Type:
int
- parameter_schema = {'verbose': SettingSpec(value_type=<class 'bool'>, default=False, label='Verbose', help_text='Print detailed adaptive-optics progress while the routine runs.', choices=None, choice_values=None, minimum=None, exclusive_minimum=None, maximum=None, step=None, required=False, dynamic_source=None, depends_on=None)}
- report
detailed report to save as JSON after
- Type:
list
- save_report
whether to save report at the end of run
- Type:
bool
- verbose
True if you want to print the full output string each step
- Type:
bool