astrocook.core.debug_hooks module#
Hook for the debug plots requested by the core.
The core does not depend on the GUI (findings register F6): it hands the plot data to a handler, which the GUI sets to the signal that draws them on the main thread. Without a handler (scripts, tests) the request is dropped, as the GUI signal did when nothing was connected to it.
- astrocook.core.debug_hooks.set_debug_plot_handler(handler: Callable[[dict], None] | None) None[source]#
Set the function that receives the debug plot requests.
- Parameters:
handler (callable or None) – Called with a dictionary of plot data (
'title'and the arrays to plot);Noneremoves the current handler.