.. _gui: MCS GUI doc file ################################## MCS Graphical User Interface (GUI) ################################## Introduction ############ This document walks through MCS's basic GUI features and how to setup the software to start running an observation. Main Window ########### The main window consists of four tabs, each one with a different purpose: * Main tab: this is the principal tab for check the status and track the observations * Campaigns: this tab is used to define the observing campaigns and observation modes * Manual: this tab is foreseen for manual control of the instrument * Config: in this tab, the user can configure the main instrument setup * Debug: this tab shows most important console messages of the instrument for the user Main Tab ******** The Main Tab contains five main areas: A. The **instrument status**. This shows the main instrument status and values. B. The **running conditions**. This is where you will see a the current time and positional conditions. C. The **observations**. This is where you will see the list of last images taken by the instrument. D. The **visualization canvas**. This is where visualization windows resides, and contains a FITS display and some properties of the FITS file. E. Then **plot canvas**. This is the area where is plotted the image spectrum when the user select an image and press the `Plot` button. .. figure:: ../_static/gui/main_gui.png :align: center :width: 80% MCS Main Tab panel Control Buttons --------------- The main tab panel contains a set of buttons that provides the main control of the instrument for the user, and give information about the current status of the instrument. See :ref:`activity_feedback` table for the description of each button. .. figure:: ../_static/gui/main_buttons.png :align: center :width: 40% Tool-bar Buttons ---------------- Some the the control buttons are replicated in the tool bar as shows next figure: .. figure:: ../_static/gui/tool_bar.png :align: center :width: 30% .. _activity_feedback: Activity Feedback ----------------- Next table shows the action or meaning of the buttons and leds that appears in the main tab of the GUI: +----------------------------+---------------------------+ | |connectbut| | Connect/disconnect to | | | devices (power on/off) | +----------------------------+---------------------------+ | |autobut| | Activate Automatic mode | +----------------------------+---------------------------+ | |manualbut| | Deactivate Automatic mode | +----------------------------+---------------------------+ | |quitbut| | Quit the application | +----------------------------+---------------------------+ | |resetbut| | Reset the devices | +----------------------------+---------------------------+ | |redled| | Instrument is power-off | | | and devices disconnected | +----------------------------+---------------------------+ | |greenled| | Instrument power-on | | | and devices connected | +----------------------------+---------------------------+ .. |connectbut| image:: ../_static/gui/plug.png .. |quitbut| image:: ../_static/gui/quit.png .. |resetbut| image:: ../_static/gui/reset.png .. |autobut| image:: ../_static/gui/play_auto.png .. |manualbut| image:: ../_static/gui/pause_auto.png .. |redled| image:: ../_static/gui/red-led-on.png :width: 10% .. |greenled| image:: ../_static/gui/green-led-on.png :width: 10% .. |temperaturebut| image:: ../_static/gui/icons8-temperatura-100.png :width: 5% Observations table ------------------ In the center of the Main Tab panel, you can find a table with the last files obtained by MCS. It includes serveral columns with info about the observation file. You can use this table to inspect the files (double click on the row, or press **View** button), and to plot the spectrum of the selected file in the row pressing the **Plot** button located in the right botton of the main panel. Buttons: #. View: displays the selected file using DS9_ viewer. #. Clear: clear the data rows contained in the table, but without deleting the associated files. #. Auto-View: if selected, displays automatically each new obervation file. .. figure:: ../_static/gui/observations_table.png :align: center :width: 70% Opening FITS ------------ There are multiple ways to open FITS data files: * By double-clicking on the row of the observation table in Main Tab panel. * By selecting a row on the observation table in the Main Tab panel, then click **View** button the the right side of the table. * By selecting the **Open** item under the **File** menu or using the equivalent shortcut (e.g. **Ctrl+O** on Linux, **Cmd+O** on Mac). * By opening a Terminal and launch DS9_ application as follow:: > ds9 /home/mima/DATA/MCS_DATA/YYYYMMDD/my_fits_image.fits Plotting Data ------------- MCS implement a quick processing of the science images, allowing to extracting and analyzying the 1D profile of the spectrum obtained from a filter image. To process the image and show the spectrum, in the Main panel tab, the user must select an image (containing an **MIMA** filter image) in the Observations table and click on the ``Plot`` button that appears in the right botton corner of the Main Tab panel. After processing the FITS file (it could take a few seconds), a new plot will appear in the plot window above the ``Plot`` button: .. figure:: ../_static/gui/plot_example.png :align: center :width: 70% Campaigns Tab ============= This Tab panel contains two tables; one for the Campaigns visualization and modification in the upper area, and similarly other for the Observing Modes visualization and edition, in above area. .. figure:: ../_static/gui/campaigns_tab.png :align: center :width: 70% - Campaign: The table will show the current campaigns defined in the system by the user. Double-cliking on one of them, will display their properties and will allow to modify them if needed. For adding a new campaign, the user must click the ``plus`` button on the right side. Clicking on the ``minus`` button, will remove the currently selected campaign. .. figure:: ../_static/gui/campaign_editor.png :align: center :width: 50% Campaign Editor .. note:: If a Campaign is being executed, it cannot be modified neither deleted. .. note:: Only PENDING Campaigns can be removed. .. _obs_mod_dia: - Observing Mode: The table will show the current Observing Modes defined in the system by the user. Double-cliking on one of them, will display their properties and will allow to modify them if needed. For adding a new Observing Mode, the user must click the ``plus`` button on the right side. Clicking on the ``minus`` button, will remove the currently selected campaign. .. figure:: ../_static/gui/observation_mode_editor.png :align: center :width: 50% Observing mode Editor **Calibrations**: See more details about calibration :ref:`here `. .. note:: By default, a 'Default' campaign is always created in the system, which is executed if no other campaign is defined. Similarly, an 'Default' Observing Mode is defined and associated to the default Campaign. The user should not remove of modify any of them for a right execution of the observations. Manual Tab ========== In this Tab panel, the user can handle the instrument Manually, i.e, it can set some image properties (filter, exposition time, repetitions, image type, readout speed mode, comment and observer name) and take an exposition. Once the image is taken, it is shown on the right side window, and clicking on the image will show the number of counts of the clicked pixel. To enable this mode, switch ON the instrument and click the |autobut| button on the right top of the main panel. When the instrument is handled in this way, no constraints are checked (temperatures, sun/moon elevation, etc), so it is forseen for testing purposes. Pressing the green "Expose" button at the bottom left will take an exposition, without saving into a FITS file. Pressing the green "Expose & Save" button at the bottom left will take an exposition and save into a FITS file. .. note:: This section will be **only** available when the instrument is not in **Automatic** mode. .. figure:: ../_static/gui/manual_tab.png :align: center :width: 70% Config Tab ========== This tab allows the user the configuration of some parameters of the instrument: .. figure:: ../_static/gui/config_tab.png :align: center :width: 70% Config Tab | - CCD: - port: it is auto-detected by the system, so it can not be modified by the user. - setup: it is auto-detected by the system, so it can not be modified by the user. - Filter Wheel: - port: it is auto-detected by the system, and it can not be modified by the user. - setup: it allows modify the filter name of each position of the filter wheel. .. figure:: ../_static/gui/FilterWheelDialog.png :align: center :width: 50% Filter Wheel setup | The first ever time the MCS application is launched, the filter setup (filter name and position) is read from the :ref:`configuration_file`, and the database is initialized with these values. Next updates of the Filter Wheel setup are saved **only** in the internal database of the MCS application, but not in the configuration file. So, configuration file values are only used the first ever time you launch MCS. MCS numbers the filters positions from 1 to 7, although internally the Filter Wheel and for the control hardware the positions are defined from 0 to 6. .. note:: When the Filter Wheel setup is modified, you **MUST** review the campaigns and observation modes that are defined in MCS; otherwise, some obsevation could be omitted due to some missing filter name. | - Temperature Control: - Temp. SetPoint(C): setpoint for working temperature of the filters. Because temperature sensors are in the filter wheel close to the filter wheel aperture, the real temperature of the positioned filter might be a bit different (1 or 2 degrees ). two degrees lower. - PID setup: it allow modify PID parameters that use the closed-loop of the temperature controller (password required). - port: it is auto-detected by the system, and it can not be modified by the user. .. figure:: ../_static/gui/TempCtrlDialog.png :align: center :width: 50% Temperature Control setup Debug Tab ========= This tab is for event logging system purposes, and gives information about events important events that happen in the system. .. figure:: ../_static/gui/debug_tab.png :align: center :width: 70% Instrument temperatures plot ============================ MCS monitors the instrument temperatures of CCD camera, Filter Wheel and Dome. These values are saved in a housekeeping file specified in the configuration file. Moreover, the user can plot that file with the values from the last 24 hours. To show that plot, the user need to press the |temperaturebut| button that appears in the tool-bar buttons. .. figure:: ../_static/gui/tool_bar.png :align: center :width: 30% Tool bar button .. figure:: ../_static/gui/instrument_temperatures.png :align: center :width: 70% Instrument housekeeping temperatures .. _MIMA: http://gapt.iaa.es/content/mima .. _NoMachine: https://www.nomachine.com/getting-started-with-nomachine .. _ConfigParser: https://docs.python.org/3/library/configparser.html#configparser.ConfigParser .. _DS9: https://sites.google.com/cfa.harvard.edu/saoimageds9