IFU Viewer

All of the tabs described in Builtin tab types allow to open a window to better inspect the content of one IFU by double clicking on it.

Here we describe the various IFU Viewer that are shipped with VDAT.

The FITS viewer

The fits viewer allows to display the content of one or more fits files in separate tabs together with their header information. The figure below show an example of such a window:

fits viewer window

Screenshot of the fits viewer windows.

The window consist of multiple tabs, one per file and each tab is divided in two parts:

  • The upper part contains a widget based on the Ginga fits viewer that allow to explore a fits file in details through, e.g., zooming, panning, changing scale method and color map. All the available Ginga key bindings, that allow to change things like color map, are enabled. The Help menu contains a link to the documentation of the available key bindings.

    If the input fits file is a data cube, it shows a compressed splice along the z direction. Custom z indices can be given using the z_indx configuration option, as described in fits_cube.

    If the configuration dictionary passed to the FITS viewer contains the ext option, the corresponding extension of the fits file will be displayed. If no custom title is used (as e.g. in the exp_* and fits* tab types), the extension name or index, i.e. the value of ext, is appended within square brackets to the tab name, as shown in this figure:

    fits viewer window with extension

    Screenshot of the upper part of the fits viewer windows when a fits extension is explicitly chosen.

  • The lower part shows the full file header. By default header keys are shown in the same order as they appear in the file. However it is possible for the user to have one or more header keywords to be shown on top of all the others using the header_keys option in the tab configuration entries for the tabs supporting it. header_keys expects a list of string. When provided, the headers keywords specified are searched and put on top of all the others in the same order as they are given. Non existent keywords are ignored. If at least one keyword is found, a separator is added. The figure above was created using

    header_keys: ['SPECID', 'IFUID', 'IFUSLOT', 'CCDPOS', 'CCDHALF']
    

By default, the title and the tool tip of each tab are the file name and its absolute path. However those can be customized. E.g. when double-clicking on one IFU reconstructed image, the only tab shown has 'Recontructed' for title and the list of all files used to create the image for tool tip message.

If the Ginga viewer is not enough for the user needs, it is also possible to send the files to DS9, if available in the system. The ds9 menu allows to send the file shown in the current tab to a new or an existing DS9 session. The figure shows the menu as it appears if one DS9 window is already open. In case of data cubes, the full underlying fits file is sent to DS9, not only the visible slice. For multi extension files, only the current extension is sent to DS9.

menu to send to DS9

Example of the ds9 menu used to send the current immage to a DS9 instance

The text file viewer

The text file viewer displays the content of a file as plain text and allows basic editing functionalities. The following image shows the window displaying a typical dither file:

text file viewer window

Screenshot of the text file viewer window.

It is possible to edit the file and save it, also to a different name. Default functionality, like undo/redo, selection and navigation are available via the key bindings listed below and described in the QTextEdit documentation:

Keypresses Action
Backspace Deletes the character to the left of the cursor.
Delete Deletes the character to the right of the cursor.
Ctrl+C Copy the selected text to the clipboard.
Ctrl+Insert Copy the selected text to the clipboard.
Ctrl+K Deletes to the end of the line.
Ctrl+V Pastes the clipboard text into text edit.
Shift+Insert Pastes the clipboard text into text edit.
Ctrl+X Deletes the selected text and copies it to the clipboard.
Shift+Delete Deletes the selected text and copies it to the clipboard.
Ctrl+Z Undoes the last operation.
Ctrl+Y Redoes the last operation.
LeftArrow Moves the cursor one character to the left.
Ctrl+LeftArrow Moves the cursor one word to the left.
RightArrow Moves the cursor one character to the right.
Ctrl+RightArrow Moves the cursor one word to the right.
UpArrow Moves the cursor one line up.
Ctrl+UpArrow Moves the cursor one word up.
DownArrow Moves the cursor one line down.
Ctrl+Down Arrow Moves the cursor one word down.
PageUp Moves the cursor one page up.
PageDown Moves the cursor one page down.
Home Moves the cursor to the beginning of the line.
Ctrl+Home Moves the cursor to the beginning of the text.
End Moves the cursor to the end of the line.
Ctrl+End Moves the cursor to the end of the text.
Alt+Wheel Scrolls the page horizontally (the Wheel is the mouse wheel).
Ctrl+Wheel Zooms the text.

The distortion file viewer

This window displays the content of one or more distortion files. More importantly, it also provides a few menus that sends fits files and distortion solutions to DS9. Under the ds9 menu there are the following sub menus:

  • Distortion and fits: send the fits_names (from the dist tab type configuration) either to a new or an existing DS9 window (as done in The FITS viewer) and overlay the distortion solutions to all the above fits files;
  • Distortion only: overlay the distortion solution to a file in an existing DS9 window; this menu entry is useful to overlay a distortion solution to e.g. a science fits file.

In both cases only the distortion in the currently visible tab and the related fits files are sent to DS9.

The following image shows an example the distortion window and of the DS9 window with two fits files sent (mastertwi and masterarc) with the distortion solution overlaid in to them in green:

distortion file viewer window

Screenshot of the distortion file viewer window and of a ds9 window