stytra.gui package¶
Submodules¶
stytra.gui.camera_display module¶
-
class
stytra.gui.camera_display.
SingleLineROI
(*args, **kwargs)[source]¶ Bases:
pyqtgraph.graphicsItems.ROI.LineSegmentROI
Subclassing pyqtgraph polyLineROI to remove the “add handle” behavior.
-
class
stytra.gui.camera_display.
CameraViewWidget
(*args, experiment=None, **kwargs)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
A widget to show images from a frame source and display the camera controls.
-
class
stytra.gui.camera_display.
CameraSelection
(**kwargs)[source]¶ Bases:
stytra.gui.camera_display.CameraViewWidget
Generic class to overlay on video an ROI that can be used to select regions of the image and communicate their position to the tracking algorithm (e.g., tail starting point or eyes region).
The changes of parameters read through the ROI position are handled via the track_params class, so they must have a corresponding entry in the definition of the FrameProcessingMethod of the tracking function of choice.
-
initialise_roi
(roi)[source]¶ ROI is initialised separately, so it can first be defined in the child __init__.
-
-
class
stytra.gui.camera_display.
EyeTailTrackingSelection
(**kwargs)[source]¶ Bases:
stytra.gui.camera_display.TailTrackingSelection
,stytra.gui.camera_display.EyeTrackingSelection
stytra.gui.container_windows module¶
-
class
stytra.gui.container_windows.
ExperimentWindow
(experiment, **kwargs)[source]¶ Bases:
PyQt5.QtWidgets.QMainWindow
Window for controlling a simple experiment including only a monitor the relative controls and the buttons for data_log and protocol control.
- Parameters
experiment (Experiment <stytra.experiments.Experiment> object) – experiment for which the window is built.
-
class
stytra.gui.container_windows.
VisualExperimentWindow
(*args, **kwargs)[source]¶ Bases:
stytra.gui.container_windows.ExperimentWindow
Window for controlling a simple experiment including only a monitor the relative controls and the buttons for data_log and protocol control.
- Parameters
experiment (Experiment <stytra.experiments.Experiment> object) – experiment for which the window is built.
-
class
stytra.gui.container_windows.
DynamicStimExperimentWindow
(*args, **kwargs)[source]¶ Bases:
stytra.gui.container_windows.VisualExperimentWindow
Window for plotting a dynamically varying stimulus.
-
class
stytra.gui.container_windows.
TrackingExperimentWindow
(tracking=True, *args, **kwargs)[source]¶ Bases:
stytra.gui.container_windows.CameraExperimentWindow
Window for controlling an experiment where the tail of an embedded fish is tracked.
stytra.gui.fishplots module¶
-
class
stytra.gui.fishplots.
StreamingPositionPlot
(*args, data_accumulator, n_points=500, **kwargs)[source]¶ Bases:
pyqtgraph.graphicsWindows.GraphicsWindow
Plot that displays the virtual position of the fish
-
class
stytra.gui.fishplots.
TailStreamPlot
(acc, n_points=300)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Displays the curvature of the tail in time using a heatmap
-
stytra.gui.fishplots.
angle_mean
(angles, axis=1)[source]¶ Correct calculation of a mean of an array of angles
-
stytra.gui.fishplots.
normalise_bout
(coord)[source]¶ Reset a bout to be facing upward and start from 0,0
- Parameters
bout –
stytra.gui.framerate_viewer module¶
stytra.gui.monitor_control module¶
stytra.gui.multiscope module¶
-
class
stytra.gui.multiscope.
PlotTuple
(curve, curve_label, min_label, max_label, value_label)¶ Bases:
tuple
-
curve
¶ Alias for field number 0
-
curve_label
¶ Alias for field number 1
-
max_label
¶ Alias for field number 3
-
min_label
¶ Alias for field number 2
-
value_label
¶ Alias for field number 4
-
-
class
stytra.gui.multiscope.
MultiStreamPlot
(time_past=5, bounds_update=0.1, compact=False, n_points_max=500, accumulators=None, precision=None, experiment=None, *args, **kwargs)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Window to plot live data that are accumulated by a DAtaAccumulator object. New plots can be added via the add_stream() method.
-
static
get_colors
(n_colors=1, lightness=50, saturation=50, shift=0)[source]¶ Get colors on the LCh ring
- Parameters
n_colors – param lightness: (Default value = 1)
lightness – (Default value = 50)
saturation – (Default value = 50)
shift – (Default value = 0)
-
static
stytra.gui.protocol_control module¶
-
class
stytra.gui.protocol_control.
ProtocolControlToolbar
(protocol_runner: stytra.stimulation.ProtocolRunner, main_window=None)[source]¶ Bases:
PyQt5.QtWidgets.QToolBar
GUI for controlling a ProtocolRunner.
This class implements the toolbar for controlling the protocol:
toggle button for starting/stopping the Protocol;
progress bar to display progression of the Protocol.
a button and window for controlling Protocol parameters;
- Parameters
protocol_runner (
ProtocolRunner
object) – ProtocolRunner that is controlled by the GUI.
Signals:
-
sig_start_protocol
¶ Emitted via the toggle button click, meant to start the protocol.
-
sig_stop_protocol
¶ Emitted via the toggle button click, meant to abort the protocol.