ThermalOptics#
- class ThermalOptics(temperature, emissivity, fratio=None, solid_angle=None, nelements=1, geometry='circular', meta={})[source]#
Bases:
objectThermal 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 (
floator array_like) – Temperature(s) of the optical elements in K.emissivity (
floator array_like) – Emissivity of the optical elements, between 0 and 1.fratio (
floator array_like orNone, optional) – F-ratio(s) of the optical elements, used to computesolid_angle. Either one value per element (same in both directions) or one(fratio_y, fratio_x)pair per element. Default is None.solid_angle (
floator array_like orNone, optional) – Solid angle(s) in steradian. If None, it is computed fromfratio. Default is None.nelements (
intor array_like ofint, optional) – Number of optical elements sharing each temperature and emissivity. Default is 1.geometry (
stror array_like ofstr, 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 (
listofstr) – Parameters that can be changed after initialization withupdate.
Methods
Create a
ThermalOpticsfrom a configuration dictionary.Calculate the thermal signal received, integrated over wavelength bins.
Update the mutable parameters.
Attributes
Emissivity of the optical elements, shape
(n, 1).F-ratio(s) of the optical elements, or None.
Pupil shape(s) of the optical elements (
"circular"or"square").Metadata dictionary of the instance.
Number of elements sharing each temperature and emissivity.
Solid angle(s) of the optical elements in steradian.
Temperature of the optical elements in K, shape
(n, 1).ThermalRadiationobject built from the current parameters.- classmethod from_config(config, no_solidangle_ok=True)[source]#
Create a
ThermalOpticsfrom a configuration dictionary.- Parameters:
config (
dict) – Configuration dictionary. It must contain"temperature"and"emissivity", and may contain"fratio","solid_angle","nelements"and"geometry"(seeThermalOptics). The full dictionary is stored asmeta.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 andno_solidangle_okis 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 (
floator array_like orNone, optional) – Solid angle(s) in steradian under which the emission is received (e.g. the spaxel angular area). If None,solid_angleis used. Default is None.qe (
floator callable orNone, 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 ifqeis given) integrated over each bin, with one row per optical element.
See also
ThermalRadiation.get_signalUnderlying computation.
- update(reset_thermal=True, **kwargs)[source]#
Update the mutable parameters.
See
mutable_parametersfor the list of accepted names.
- 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
fratioandgeometry(seefratio_to_solidangle). AValueErroris raised if neither is available.
- temperature#
Temperature of the optical elements in K, shape
(n, 1).
- thermal#
ThermalRadiationobject built from the current parameters.