mad_gui.plot_tools.labels.BaseRegionLabel#

class mad_gui.plot_tools.labels.BaseRegionLabel(start: int, end: int, parent, events: Series | None = None, identifier: int | None = None, description: str | Sequence[str] | None = None, **_kwargs)[source]#

Bases: LinearRegionItem

A label region label plotted in the graph.

Parameters:
identifier

An id for the label. Usually we just give it an increasing number.

description

A list of strings, filled by the user via the NestedLabelDialog

start

Start time of the label in samples.

end

End time of the label in samples.

events

A pd.DataFrame, with columns that are names for events and rows that have the positions of the events in samples since start of the data stream.

plot_events

self.events are only plotted if the name of the regarding event is in this list.

parent

A mad_gui.plot_tools.BasePlot object.

Attributes:
name

A string that is used to represent the label type in the GUI.

Methods

configure_children

make_editable

make_readonly

make_removable

color = [150, 150, 150, 100]#
configure_children()[source]#
descriptions = None#
make_editable()[source]#
make_readonly()[source]#
make_removable()[source]#
max_height = 1#
min_height = 0#
name = 'Base Label'#
snap_to_max = False#
snap_to_min = False#