SliceRangeSelectorWidget

lumicks.pylake.nb_widgets.range_selector.SliceRangeSelectorWidget

class SliceRangeSelectorWidget(channel_slice, axes=None, show=True, **kwargs)

Notebook widget for selecting data ranges by time.

Open a widget used to select time ranges. The timestamps of these time ranges can then be extracted from selector.ranges, while the slices can be extracted from selector.slices.

Please refer to the tutorial for more information.

Actions:
  • left-click – Define time ranges by clicking the left and then the right boundary of the region you wish to select.

  • right-click – Remove previously selected time range.

Parameters:
  • channel_slice (Slice) – Data slice.

  • axes (matplotlib.axes.Axes, optional) – If supplied, the axes instance in which to plot.

  • show (bool, optional) – Show widget. Default is True.

  • **kwargs – Arguments forwarded to plot().

connect_click_callback()

Connects a callback for clicking the axes

disconnect_click_callback()

Disconnects the clicking callback if it exists

property ranges

Return list of arrays containing start and stop timestamps for each selection.

property slices

Return list of selected slices of data as Slice