playnano.utils.param_utils module¶
Utility to attach parameter-condition functions to processing callables.
- playnano.utils.param_utils.param_conditions(**conds: Callable[[dict], bool])[source]¶
Decorate a processing or analysis callable with parameter-conditions.
Each keyword is the parameter name and the value is a callable that will be called with the currently collected kwargs (a dict) and must return True if that parameter should be asked/present, False otherwise.
Uses example: @param_conditions(hole_area=lambda p: p.get(“fill_holes”, False) def run()