ibl_alignment_gui.utils.utils
Functions
Iterate over multiple shanks and configurations. |
- ibl_alignment_gui.utils.utils.shank_loop(func)[source]
Iterate over multiple shanks and configurations.
This decorator allows a method to be called automatically for each combination of shank and configuration, collecting the results.
Behavior
If no shanks are provided in kwargs, self.all_shanks is used.
If no configs are provided in kwargs, self.model.configs is used.
If data_only is False, shanks without alignment (align_exists) are skipped.
The decorated function is called with additional keyword arguments
- type func:
Callable- param func:
The instance method to decorate. It must accept: self, items, *args, **kwargs (with shank and config in kwargs).
- type func:
Callable
- returns:
A wrapped method that, when called, loops over the specified (or default) shanks and configurations, calling the original method for each, and returning a list of results.
- rtype:
Callable