telescope – Telescope and guide probe information¶
Telescope module
Stores information related to the guide, i.e. guide probe and tracker information. Also deals with illumination and image quality servers.
-
class
pyhetdex.het.telescope.Shot(fwhm_fallback=1.6, illumination_fallback=1.0, transparency_fallback=1.0)[source]¶ Bases:
objectClass to store information about the whole shot and retrieve fwhm, illumination, transparency and normalization.
Each of them rely on some underlying model, with the interface defined by
ModelInterfaceParameters: - fwhm_fallback : float, optionally
number to use when instantiating a
ConstantModelif afwhm_modelis not provided- illumination_fallback : float, optionally
number to use when instantiating a
ConstantModelif aillumination_modelis not provided- transparency_fallback : float, optionally
number to use when instantiating a
ConstantModelif atransparency_modelis not provided
Attributes: fwhm_modelRetrieve, set or remove the fwhm model.
illumination_modelRetrieve, set or remove the illumination model.
transparency_modelRetrieve, set or remove the transparency model.
-
fwhm_model¶ Retrieve, set or remove the fwhm model. If not set or removed, fall back to one that returns a constant value
-
fwhm(x, y, dither)[source]¶ Return the FWHM
Parameters: - x, y : float
position in the focal plane in arcseconds
- dither : int
the dither number (starting from 1)
-
illumination_model¶ Retrieve, set or remove the illumination model. If not set or removed, fall back to one that returns a constant value
-
illumination(x, y, dither)[source]¶ Return the illumination
Parameters: - x,y : float
position in the focal plane in arcseconds
- dither : int
the dither number (starting from 1)
-
transparency_model¶ Retrieve, set or remove the transparency model. If not set or removed, fall back to one that returns a constant value
-
class
pyhetdex.het.telescope.ModelInterface[source]¶ Bases:
objectAbstract Base Class for the models.
Shotexpects that all the models are derived from this one and/or that implement the__call__()
-
class
pyhetdex.het.telescope.ConstantModel(constant)[source]¶ Bases:
pyhetdex.het.telescope.ModelInterfaceDummy model that always return the value passed to the constructor
Parameters: - constant : number
number that
__call__()should return
-
class
pyhetdex.het.telescope.PerDitherValueModel(vals)[source]¶ Bases:
pyhetdex.het.telescope.ModelInterface- A model that returns a single value per
- dither, that doesn’t depend on x, y
Parameters: - vals : array
an array of values, one for each dither
-
class
pyhetdex.het.telescope.HetpupilModel(files, normalize=True)[source]¶ Bases:
pyhetdex.het.telescope.ModelInterfaceRun the
$CUREBIN/hetpupilcode on the input files and save the relative illumination into a list. If required normalize the whole list to the first element.subprocess.check_output()is used.hetpupilis searched in CUREBIN and then in the pathParameters: - files : list of strings
name of the files on which to run the command
- normalize : bool, optional
normalize the output of hetpupil to the first value found
Raises: - ``pyhetdex.tools.six_ext.SubprocessExeError``
if he hetpupil executable cannot be found
Attributes: - fill_factor : list
list of filling factors for each input file