vdat.gui.central – The widget at the center of VDAT

This describe the central VDAT widget

class vdat.gui.central.VDATCentral(parent=None)[source]

Bases: PyQt5.QtWidgets.QWidget

This widget groups together the focal plane widget and the buttons into a Qsplitter, to allow resizing and decouple them from the rest of the gui.

Custom signals
Name Signature Description
sig_ifuSelected str, bool emitted when a user selects/deselects an IFU; the parameters are the SLOTID of the IFU and whether the IFU has been selected
sig_selectAllIFUs   emitted when a user selects all IFUs
sig_deselectAllIFUs   emitted when a user deselects all IFUs
Custom slot
Name Signature Description
change_target() str, str Change the view to the path passed as first argument; the second argument is the type of files associated to the path.
change_task() str, dict Switch the change the focal plane to the view for the task passed as first argument; the second argument contains the dictionary describing the task tabs and buttons.
ifuToggled() str, bool Mark ifuslot, given in the first argument as selected, if the second argument is True.
selectAllIFUs()   Select all the IFUs.
deselectAllIFUs()   Deselect all the IFUs.
runCommand() str, list When clicking a button create the commands and submit them to the queue
Connections between custom signals and/or slots
Signal Slot
vdat.gui.tasks.VDATTaskStack.sig_taskChanged change_task()
vdat.gui.tasks.VDATTaskStack.sig_runCommand runCommand()
sig_selectAllIFUs vdat.gui.fplane.FplaneWidget.selectAllIFUs()
sig_deselectAllIFUs vdat.gui.fplane.FplaneWidget.deselectAllIFUs()
sig_ifuSelected vdat.gui.fplane.FplaneWidget.ifuSelected()
vdat.gui.fplane.FplaneWidget.sig_ifuToggled ifuToggled()
Parameters:
parent : PyQt5.QtWidgets.QWidget or derivate

parent object of the tree view model

sig_ifuSelected
sig_selectAllIFUs
sig_deselectAllIFUs
change_target(target, typ)[source]

Change the view to the path target of typ. If the selected type has not tasks associated, show the overlay.

This method is also a pyqt slot with signature str, str.

Parameters:
target : string

path of the selected directory

typ : string

type of the target

change_task(task, task_dict)[source]

Switch the change the focal plane to the view for the task

This method is also a pyqt slot with signature str, dict.

Parameters:
task : string

name of the task to view

task_dict : dict

dictionary with the configuration for the tabs and buttons to display

ifuToggled(ifuslot, val)[source]

Mark ifuslot as selected or not

This method is also a pyqt slot with signature str, bool.

Parameters:
ifuslot : str

SLOTID of one IFU

val : bool

True to select the IFU, False otherwise

selectAllIFUs()[source]

Select all the IFU

This method is also a pyqt slot.

deselectAllIFUs()[source]

Deselect all the IFU

This method is also a pyqt slot.

runCommand(s, l)[source]

When clicking a button create the commands and submit them to the queue

This method is also a pyqt slot with signature str, list

Parameters:
s : string

name of the button clicked or cumulative name of the commands to execute

l : list

list of command to execute

_config_with_dirs(command_name)[source]

Get the command configuration and add target_dir, zero_dir and cal_dir to the configuration.

Parameters:
command_name : string

name of the command

Returns:
command_conf : dict

configuration dictionary for the command at hand

_error_dialog(error, command)[source]

Create the dialog to show the error

Parameters:
error : Exception instance

error raised by the constructor

command : string

full command string