finesse.tracing.tools.handle_symbolic¶
- finesse.tracing.tools.handle_symbolic(*args, symbolic: tuple | bool, simplify: bool, sym_func: Callable, num_func: Callable)[source]¶
Handles logic for the ‘symbolic’ argument for
propagate_beam()
andcompute_abcd()
.- Parameters
- symbolictuple | bool
If True or a tuple, returns a symbolic equation. If tuple, only returns symbolic equation with symbols in the tuple. Else returns numeric.
- simplifybool
Wether to simplify the symbolics
- sym_funcCallable
Function to call for symbolic solution
- num_funcCallable
Function to call for numeric solution
- Returns
- Any
Symbolic or numeric solution
- Raises
- ValueError
When ‘symbolic’ is not a tuple or a boolean