pynaviz.controller#

The controller class.

Classes

CustomController([camera, enabled, damping, ...])

GetController([camera, enabled, ...])

The class for grabbing a single time point

SpanController([camera, enabled, damping, ...])

The class for horizontal time-panning

SpanXLockController([camera, enabled, ...])

Vertical panning with x-axis locked (prevents horizontal pan/zoom).

SpanXYLockController([camera, enabled, ...])

Both axes locked — no manual pan or zoom.

SpanYLockController(*args, **kwargs)

Horizontal time-panning with y-axis locked

class pynaviz.controller.CustomController(camera=None, *, enabled=True, damping=0, auto_update=True, renderer=None, controller_id=None, dict_sync_funcs=None)[source]#

Bases: ABC, PanZoomController

Parameters:
abstractmethod advance(delta=0.025)[source]#
property controller_id#
get_view()[source]#

Return the current visible range as (xmin, xmax, ymin, ymax).

Camera internals use float32, so values are normalised through float32 to keep get_view stable across a set_viewget_view roundtrip.

Return type:

tuple[float, float, float, float]

get_xlim()[source]#

Return the current x boundaries

get_ylim()[source]#

Return the current y boundaries

abstractmethod sync(event)[source]#
class pynaviz.controller.GetController(camera=None, *, enabled=True, auto_update=True, renderer=None, controller_id=None, data=None, buffer=None, plot_callbacks=None)[source]#

Bases: CustomController

The class for grabbing a single time point

Parameters:
advance(delta=0.025)[source]#

Advance the current time by a specified delta value.

This can be used to play movies with a timer thread.

Parameters:

(float) (delta)

property frame_index#
set_frame(target_time)[source]#

Set the frame from target time.

Parameters:

target_time (float) – A time point.

set_view(xmin, xmax, ymin, ymax)[source]#

Set the visible X and Y ranges for an OrthographicCamera.

Parameters:
sync(event)[source]#

Get a new data point and update the texture

class pynaviz.controller.SpanController(camera=None, *, enabled=True, damping=0, auto_update=True, renderer=None, controller_id=None, dict_sync_funcs=None, plot_callbacks=None)[source]#

Bases: CustomController

The class for horizontal time-panning

Parameters:
advance(delta=0.025)[source]#

Advances the camera’s position by a specified delta value along the x-axis.

This can be used to play the time series with a timer thread.

Parameters:

(float) (delta)

go_to(target_time)[source]#

Directly set the camera’s x-axis position to a specified target time.

Parameters:
  • (float) (target_time)

  • target_time (float)

set_view(xmin, xmax, ymin, ymax)[source]#

Set the visible X and Y ranges for an OrthographicCamera.

Parameters:
set_xlim(xmin, xmax)[source]#

Set the visible X range for an OrthographicCamera.

Parameters:
set_ylim(ymin, ymax)[source]#

Set the visible Y range for an OrthographicCamera.

Parameters:
sync(event)[source]#

Set a new camera state using the sync rule provided.

class pynaviz.controller.SpanXLockController(camera=None, *, enabled=True, damping=0, auto_update=True, renderer=None, controller_id=None, dict_sync_funcs=None, plot_callbacks=None)[source]#

Bases: SpanController

Vertical panning with x-axis locked (prevents horizontal pan/zoom).

Parameters:
class pynaviz.controller.SpanXYLockController(camera=None, *, enabled=True, damping=0, auto_update=True, renderer=None, controller_id=None, dict_sync_funcs=None, plot_callbacks=None)[source]#

Bases: SpanController

Both axes locked — no manual pan or zoom. Playback (advance) still works.

Parameters:
class pynaviz.controller.SpanYLockController(*args, **kwargs)[source]#

Bases: SpanController

Horizontal time-panning with y-axis locked