wonambi.widgets.modal_widgets module

class wonambi.widgets.modal_widgets.ChannelDialog(parent)[source]

Bases: QDialog

Template dialog for event detection.

parent

the main window

Type:

instance of QMainWindow

groups

information about groups from Channels

Type:

list of dict

index

Contains detection parameters.

Type:

dict of FormFloat

bbox

Button box with Ok and Cancel

Type:

QDialogButtonBox

idx_group

Combo box of channel groups.

Type:

FormMenu

idx_chan

List widget containing all channels for selected group.

Type:

QListWidget

idx_stage

List widget containing all stages.

Type:

QListWidget

idx_cycle

List widget containing all marked cycles.

Type:

QListWidget

one_grp

info about selected group from Channels

Type:

dict

create_widgets()[source]

Build basic components of dialog.

get_channels()[source]

Get the selected channel(s in order).

Returns:

list of str – name of each channel (without group), in original record order

get_cycles()[source]

Get the selected cycle(s in order).

Returns:

list of tuple – Each tuple is (start time (sec), end time (sec), index (starting at 1).

update_channels()[source]

Update the channels list when a new group is selected.

update_cycles()[source]

Enable cycles checkbox only if there are cycles marked, with no errors.

update_groups()[source]

Update the channel groups list when dialog is opened.

class wonambi.widgets.modal_widgets.DateTimeDialog(title, start_time, dur)[source]

Bases: QDialog

Dialog to specify time in the recordings, either as seconds from the start of the recordings or absolute time.

Parameters:
  • title (str) – ‘Lights out’ or ‘Lights on’

  • start_time (datetime) – absolute start time of the recordings

  • dur (int) – total duration of the recordings

Notes

The value of interest is in self.idx_seconds.value(), which is seconds from the start of the recordings.

button_clicked(button)[source]
changed_datetime(dt)[source]
changed_spin(i)[source]
class wonambi.widgets.modal_widgets.SVGDialog(dirname)[source]

Bases: QDialog

button_clicked(button)[source]
select_filename()[source]