vdat.gui.tabs.entry_points
- Tab types definitions¶
This module implements all the entry points shipped with vdat
-
vdat.gui.tabs.entry_points.
exp_fits
(target_dir, tab_dict, step_name, cache, parent_widget)[source]¶ Create or retrieve and return tabs of type
tab_widget.FitsFplanePanel
. Each tab represent one exposure in one of the types intarget_dir
.This tab type accepts the following configuration options:
tab_type
(mandatory): name of the type.file_name
(mandatory): name of the file(s) to show. It is possible to format the file name using the python formatting syntax.cols
,rows
(optional): list of objects, typically strings. The thumbnail gets divided into len(cols)*len(rows) quadrants and each one shows one file.title
(optional): title to use for the tab; if absent'{step} {orig_type} {exp}'
is used. It is possible to format the title similarly to thefile_name
.tool_tip
(optional): tooltip to show when hovering on the tab name; it is possible to format the tool_tip similarly to thefile_name
.header_keys
(optional): list of strings. Header keywords to show on top of the others in the fits viewer window.
Available formatting names:
ifuslot
,ifuid
,specid
(file_name
only): ID of the slot, of the IFU bundle and of the spectrograph it is connected to.basename
: date-time part of the file name.col
,row
(file_name
only): replaced with each of the elements in thecols
androws
configuration options.step
: name of the step at handtype
: type of the file(s) in the target directory, i.e. the name shown in the GUI.orig_type
: original type of the file(s) in the target directory.object
: value of the OBJECT header keyword.exp
: exposure number.
See
interface.plugin_interface()
for the signature of this function.
-
vdat.gui.tabs.entry_points.
exp_combined
(target_dir, tab_dict, step_name, cache, parent_widget)[source]¶ Same as
exp_fits()
, but using tabs of typetab_widget.FitsAndReconFplanePanel
.
-
vdat.gui.tabs.entry_points.
_exp_tabs
(cls, target_dir, tab_dict, step_name, cache, parent_widget)[source]¶ Implementation of
exp_fits()
andfits_combined()
types.Parameters: - cls :
tab_widget.BaseFplanePanel
or child class to initialize if not found in cache
- others :
same as
fits_combined()
- cls :
-
vdat.gui.tabs.entry_points.
fits
(target_dir, tab_dict, step_name, cache, parent_widget)[source]¶ Create or retrieve and return one or more tabs of type
tab_widget.FitsFplanePanel
. Each tab represents one file type chosen by the user.This tab type accepts the following configuration options:
tab_type
(mandatory): name of the type.file_name
(mandatory): name of the file(s) to show. It is possible to format the file name using the python formatting syntax.file_types
(optional): can be'type'
,'orig_type'
,'object'
or a user defined string. This entry is used in the following way:- If the value of
file_types
is any of'type'
,'orig_type'
,'object'
: the corresponding information is extracted from the internal database and interpreted as a list. If e.g. the'orig_type'
is used and the database contains for the entry the following'cmp, flt'
value, two tabs will be created and the{orig_type}
formatting key will be replaced with'cmp'
in one tab and'flt'
in the other. - If the value of
file_types
is any of'type'
,'orig_type'
,'object'
and if it present as a keyword in the tab configuration: the content of the keyword is used, instead of the internal information. The value of the keyword must be a list. If e.g. the'orig_type'
is used and there is one keyword whose value is['flat', 'arc']
, two tabs will be created and the{orig_type}
formatting key will be replaced with'flat'
in one tab and'arc'
in the other. - If the value is a custom string: this string must be present in the
tab configuration and its value must be a list. It is also added in the
list of available formatting names to allow substitutions. If e.g. the
'custom'
string is used, there must be one such key. If its value is['my', 'tab']
, two tabs will be created and the{custom}
formatting key will be replaced with'my'
in one tab and'tab'
in the other.
Default:
'orig_type'
.- If the value of
cols
,rows
(optional): list of objects, typically strings. The thumbnail gets divided into len(cols)*len(rows) quadrants and each one shows one file.title
(optional): title to use for the tab; if absent'{step} {orig_type}'
is used. It is possible to format the title similarly to thefile_name
.tool_tip
(optional): tooltip to show when hovering on the tab name; it is possible to format the tool_tip similarly to thefile_name
.header_keys
(optional): list of strings. Header keywords to show on top of the others in the fits viewer window.
Available formatting names:
ifuslot
,ifuid
,specid
(file_name
only): ID of the slot, of the IFU bundle and of the spectrograph it is connected to.col
,row
(file_name
only): replaced with each of the elements in thecols
androws
configuration options.step
: name of the step at handtype
: type of the file(s) in the target directory, i.e. the name shown in the GUI.orig_type
: original type of the file(s) in the target directory.object
: value of the OBJECT header keyword.
See
interface.plugin_interface()
for the signature of this function.
-
vdat.gui.tabs.entry_points.
fits_combined
(target_dir, tab_dict, step_name, cache, parent_widget)[source]¶ Same as
fits()
, but using tabs of typetab_widget.FitsAndReconFplanePanel
.
-
vdat.gui.tabs.entry_points.
fits_cube
(target_dir, tab_dict, step_name, cache, parent_widget)[source]¶ Same as
fits()
, but using tabs of typetab_widget.CubeFplanePanel
.On top of the configuration options described in
fits()
, this tab type accepts the following options:z_indx
(optional): before creating the thumbnail for the data cubes, the image is compressed along the z-dimension using the median; ifz_indx
is not given or is[null, null]
, it uses the whole range, otherwise it uses only the part of the cube in the range [z_indx[0], z_indx[1])
-
vdat.gui.tabs.entry_points.
fits_multiext
(target_dir, tab_dict, step_name, cache, parent_widget)[source]¶ Same as
fits()
, but using tabs of typetab_widget.MultiExtFplanePanel
.On top of the configuration options described in
fits()
, this tab type accepts the following options:extensions
(list of ints or strings): indices or names of the fits extensions to display in the IFU.
On top of the formatting names described in
fits()
, this tab type has this additional formatting name:ext
: index or name of the extension displayed
-
vdat.gui.tabs.entry_points.
_fits_tabs
(cls, target_dir, tab_dict, step_name, cache, parent_widget, extra_format=None)[source]¶ Implementation of
fits()
andfits_combined()
.Parameters: - cls :
tab_widget.BaseFplanePanel
or child class to initialize if not found in cache
- extra_format : dict, optional
extra formatting values to add to the
format_dict
passed to thecls
- others :
same as
fits_combined()
- cls :
-
vdat.gui.tabs.entry_points.
reconstruct
(target_dir, tab_dict, step_name, cache, parent_widget)[source]¶ Create or retrieve and return a tab of type
tab_widget.QuickReconFplanePanel
. It collects all the exposures for thetarget_dir
and combine all of them in a single reconstructed image.This tab type accepts the following configuration options:
tab_type
(mandatory): name of the type.file_name
(mandatory): name of the file(s) to show. It is possible to format the file name using the python formatting syntax.cols
,rows
(optional): list of objects, typically strings. The thumbnail gets divided into len(cols)*len(rows) quadrants and each one shows one file.title
(optional): title to use for the tab; if absent'{step} {orig_type}'
is used. It is possible to format the title similarly to thefile_name
.tool_tip
(optional): tooltip to show when hovering on the tab name; it is possible to format the tool_tip similarly to thefile_name
.header_keys
(optional): list of strings. Header keywords to show on top of the others in the fits viewer window.
Available formatting names:
ifuslot
,ifuid
,specid
(file_name
only): ID of the slot, of the IFU bundle and of the spectrograph it is connected to.col
,row
(file_name
only): replaced with each of the elements in thecols
androws
configuration options.basename
(file_name
only): date-time part of the file name.step
: name of the step at handtype
: type of the file(s) in the target directory, i.e. the name shown in the GUI.orig_type
: original type(s) of the file(s) in the target directory.object
: value(s) of the OBJECT header keyword.
See
interface.plugin_interface()
for the signature of this function.
-
vdat.gui.tabs.entry_points.
text_file
(target_dir, tab_dict, step_name, cache, parent_widget)[source]¶ Create or retrieve and return one tab of type
tab_widget.TextFileWidget
.This tab type accepts the following configuration options:
tab_type
(mandatory): name of the type.file_name
(mandatory): name of the file(s) to show. It is possible to format the file name using the python formatting syntax.title
(optional): title to use for the tab; if absent'{step}'
is used. It is possible to format the title similarly to thefile_name
.tool_tip
(optional): tooltip to show when hovering on the tab name; it is possible to format the tool_tip similarly to thefile_name
.
Available formatting names:
ifuslot
,ifuid
,specid
(file_name
only): ID of the slot, of the IFU bundle and of the spectrograph it is connected to.step
: name of the step at handtype
: type of the file(s) in the target directory, i.e. the name shown in the GUI.orig_type
: original type(s) of the file(s) in the target directory.object
: value(s) of the OBJECT header keyword.
See
interface.plugin_interface()
for the signature of this function.
-
vdat.gui.tabs.entry_points.
dist
(target_dir, tab_dict, step_name, cache, parent_widget)[source]¶ Create or retrieve and return one tabs of type
tab_widget.DistPanel
.This tab type accepts the following configuration options:
tab_type
(mandatory): name of the type.file_name
(mandatory): name of the distortion file(s) to show. It is possible to format the file name using the python formatting syntax.fits_names
(mandatory): list of names of the fits files to use then displaying the distortion in DS9. If the list is empty, it is not possible to display the data on DS9.cols
,rows
(optional): list of objects, typically strings. The thumbnail gets divided into len(cols)*len(rows) quadrants and each one shows one file.title
(optional): title to use for the tab; if absent'{step} {orig_type}'
is used. It is possible to format the title similarly to thefile_name
.tool_tip
(optional): tooltip to show when hovering on the tab name; it is possible to format the tool_tip similarly to thefile_name
.
Available formatting names:
ifuslot
,ifuid
,specid
(file_name
andfits_names
only): ID of the slot, of the IFU bundle and of the spectrograph it is connected to.col
,row
(file_name
andfits_names
only): replaced with each of the elements in thecols
androws
configuration options.step
: name of the step at handtype
: type of the file(s) in the target directory, i.e. the name shown in the GUI.orig_type
: original type of the file(s) in the target directory.object
: value of the OBJECT header keyword.
See
interface.plugin_interface()
for the signature of this function.
-
vdat.gui.tabs.entry_points.
_empty_fplane
(target_dir, tab_dict, step_name, cache, parent_widget)[source]¶ Create or retrieve and return one tab of type
tab_widget.BaseFplanePanel
.This entry point has been created for testing purposes but can be used to display the focal plane and be able to select/deselect IFUs when no plugin is available to display data for a step
See
interface.plugin_interface()
for the signature of this function.