MEFMixin

class stginga.plugins.local_plugin_mixin.MEFMixin[source]

Bases: object

Mixin class for Ginga local plugin that enables manipulation of multi-extension FITS images.

Methods Summary

autoload_ginga_image(filename, extnum, cachekey)

Automatically load a given image extension into Ginga viewer.

general_mef_settings(prefs)

Load MEF settings.

load_dq(image, header)

Find and load DQ extension.

load_err(image, header)

Find and load ERR extension.

Methods Documentation

autoload_ginga_image(filename, extnum, cachekey)[source]

Automatically load a given image extension into Ginga viewer.

Parameters:
filenamestr

Image filename.

extnumint

Image extension number.

cachekeystr

Key for Ginga data cache. Usually, this is in the format of prefix[extname, extver].

Returns:
imageginga.AstroImage.AstroImage

Ginga image object.

general_mef_settings(prefs)[source]

Load MEF settings.

Sets the following internal variables from Ginga’s general user preferences:

self._sci_extname
self._err_extname
self._dq_extname
self._ext_key
self._extver_key
self._ins_key
self._tel_key

Also sets the following:

self._no_keyword
Parameters:
prefsginga.misc.Settings.Preferences

Ginga preferences from self.fv.get_preferences().

load_dq(image, header)[source]

Find and load DQ extension.

Special Handling for WFPC2

The DQ file has c1m in its name. However, extension name could be either 'DQ' or 'SCI'.

Parameters:
imageginga.AstroImage.AstroImage

Ginga image object.

headerdict

Header associated with the image.

Returns:
dqsrcginga.AstroImage.AstroImage or False

DQ image associated with given image, if available.

load_err(image, header)[source]

Find and load ERR extension.

Note

WFPC2 does not have ERR.

Parameters:
imageginga.AstroImage.AstroImage

Ginga image object.

headerdict

Header associated with the image.

Returns:
errsrcginga.AstroImage.AstroImage or False

ERR image associated with given image, if available.