pynaviz.utils#

Functions

check_processes()

Simple function to check all Python processes.

get_plot_attribute(plot, attr_name[, ...])

Auxiliary safe function for debugging.

get_plot_min_max(plot)

Get xmin,xmax, ymin, ymax in world coordinates.

map_screen_to_world(camera, pos, viewport_size)

trim_kwargs(func, kwargs)

Classes

RenderTriggerSource(*values)

Enumeration of the renderer draw triggering source.

class pynaviz.utils.RenderTriggerSource(*values)[source]#

Bases: Enum

Enumeration of the renderer draw triggering source.

INITIALIZATION = 1#
LOCAL_KEY = 4#
SET_FRAME = 5#
SYNC_EVENT_RECEIVED = 3#
UNKNOWN = 0#
ZOOM_TO_POINT = 2#
pynaviz.utils.check_processes()[source]#

Simple function to check all Python processes.

Common usage: while using the debugger, call to check which python processes are active after each line of code. Note that you may need to wait a few seconds when a new process is started.

Notes

Needs psutils

pynaviz.utils.get_plot_attribute(plot, attr_name, filter_graphic=None)[source]#

Auxiliary safe function for debugging.

Parameters:
  • plot (_BasePlot)

  • filter_graphic (dict[bool])

Return type:

dict | None

pynaviz.utils.get_plot_min_max(plot)[source]#

Get xmin,xmax, ymin, ymax in world coordinates.

Parameters:

plot – The plot object.

Returns:

The plot xmin, xmax, ymin, ymax in world coordinates.

pynaviz.utils.map_screen_to_world(camera, pos, viewport_size)[source]#
pynaviz.utils.trim_kwargs(func, kwargs)[source]#