ThermalOptics#

class ThermalOptics(temperature, emissivity, fratio=None, solid_angle=None, nelements=1, geometry='circular', meta={})[source]#

Bases: object

Thermal emission of a set of optical elements.

Each optical element (or group of identical elements) is described by a temperature, an emissivity, a number of elements and an f-ratio (or a solid angle). Array inputs define one entry per element.

Parameters:
  • temperature (float or array_like) – Temperature(s) of the optical elements in K.

  • emissivity (float or array_like) – Emissivity of the optical elements, between 0 and 1.

  • fratio (float or array_like or None, optional) – F-ratio(s) of the optical elements, used to compute solid_angle. Either one value per element (same in both directions) or one (fratio_y, fratio_x) pair per element. Default is None.

  • solid_angle (float or array_like or None, optional) – Solid angle(s) in steradian. If None, it is computed from fratio. Default is None.

  • nelements (int or array_like of int, optional) – Number of optical elements sharing each temperature and emissivity. Default is 1.

  • geometry (str or array_like of str, optional) – Pupil shape of the optical elements, "circular" or "square". Default is "circular".

  • meta (dict, optional) – Metadata dictionary (e.g. the input configuration). Default is an empty dict.

Variables:

mutable_parameters (list of str) – Parameters that can be changed after initialization with update.

Methods

from_config

Create a ThermalOptics from a configuration dictionary.

get_signal

Calculate the thermal signal received, integrated over wavelength bins.

update

Update the mutable parameters.

Attributes

emissivity

Emissivity of the optical elements, shape (n, 1).

fratio

F-ratio(s) of the optical elements, or None.

geometry

Pupil shape(s) of the optical elements ("circular" or "square").

meta

Metadata dictionary of the instance.

mutable_parameters

nelements

Number of elements sharing each temperature and emissivity.

solid_angle

Solid angle(s) of the optical elements in steradian.

temperature

Temperature of the optical elements in K, shape (n, 1).

thermal

ThermalRadiation object built from the current parameters.

classmethod from_config(config, no_solidangle_ok=True)[source]#

Create a ThermalOptics from a configuration dictionary.

Parameters:
  • config (dict) – Configuration dictionary. It must contain "temperature" and "emissivity", and may contain "fratio", "solid_angle", "nelements" and "geometry" (see ThermalOptics). The full dictionary is stored as meta.

  • no_solidangle_ok (bool, optional) – If True, do not warn when both "fratio" and "solid_angle" are missing. Default is True.

Returns:

ThermalOptics – The thermal optics instance.

Raises:

ValueError – If "temperature" or "emissivity" is missing.

Warns:

UserWarning – If both "fratio" and "solid_angle" are given (the solid angle is then not derived from the f-ratio), or if both are missing and no_solidangle_ok is False.

get_signal(lbda_bin, area, solid_angle=None, qe=None)[source]#

Calculate the thermal signal received, integrated over wavelength bins.

Parameters:
  • lbda_bin (array_like) – Wavelength bin(s) in Angstrom, either 1D [lbda_min, lbda_max] or 2D [[lbda_min, lbda_max], [lbda_min, lbda_max], ...].

  • area (float) – Collecting area in m^2.

  • solid_angle (float or array_like or None, optional) – Solid angle(s) in steradian under which the emission is received (e.g. the spaxel angular area). If None, solid_angle is used. Default is None.

  • qe (float or callable or None, optional) – Quantum efficiency in e-/ph, as a constant or a function of wavelength (in Angstrom). If None, the signal is in photons. Default is None.

Returns:

numpy.ndarray – Thermal signal in ph/s (or e-/s if qe is given) integrated over each bin, with one row per optical element.

See also

ThermalRadiation.get_signal

Underlying computation.

update(reset_thermal=True, **kwargs)[source]#

Update the mutable parameters.

See mutable_parameters for the list of accepted names.

Parameters:
  • reset_thermal (bool, optional) – If True, reset the cached thermal object so that it is rebuilt with the new parameters. Default is True.

  • **kwargs – Mutable parameters to update.

Warns:

UserWarning – If a given parameter is not mutable (it is then ignored).

emissivity#

Emissivity of the optical elements, shape (n, 1).

fratio#

F-ratio(s) of the optical elements, or None.

geometry#

Pupil shape(s) of the optical elements ("circular" or "square").

meta#

Metadata dictionary of the instance.

mutable_parameters = ['temperature', 'emissivity', 'nelements']#
nelements#

Number of elements sharing each temperature and emissivity.

solid_angle#

Solid angle(s) of the optical elements in steradian.

If not provided at initialization, it is computed from fratio and geometry (see fratio_to_solidangle). A ValueError is raised if neither is available.

temperature#

Temperature of the optical elements in K, shape (n, 1).

thermal#

ThermalRadiation object built from the current parameters.