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

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_xlim()[source]#

Return the current x 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, callback=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.SpanYLockController(*args, **kwargs)[source]#

Bases: SpanController

Horizontal time-panning with y-axis locked