exo_k.rayleigh

@author: jeremy leconte

Class for Rayleigh opacties.

Module Contents

class Rayleigh[source]

Bases: exo_k.util.singleton.Singleton

Class to compute Rayleigh opacities

init(self, *args, **kwds)[source]

Initializes various parameters for Rayleigh computations

sigma(self, wns, vmr)[source]

Computes the Rayleigh cross section for the gas. This one is faster than sigma_array, but can be used only when vmr values are floats.

Parameters
  • wns (array) – array of wavenumbers

  • vmr (dict of floats) – Keys are molecule names. Values are the volume mixing ratios

Returns

Rayleigh cross section for the whole gas in m^2/molecule

Return type

array of shape (wns.size)

sigma_array(self, wns, vmr)[source]

Computes the Rayleigh cross section for the gas.

Parameters
  • wns (array) – array of wavenumbers

  • vmr (dict of arrays) – Keys are molecule names. Values are arrays the volume mixing ratios

Returns

Rayleigh cross section for the whole gas in m^2/molecule

Return type

array of shape (vmr.values.size, wns.size)

sigma_mol(self, mol, wn2, wn4)[source]

Intermediary function to compute rayleigh for each molecule.

Parameters
  • mol (str) – Molecule name.

  • wn4 (wn2,) – Array of the wavenumber (in cm^-1) to the 2nd and 4th power. (To avoid recomputing it each time).

Returns

  • to_add (bool) – Says whether the molecule has been found and the contribution needs to be added.

  • tmp (array of size self.wns or None) – The cross section for the molecule as a function of wns. None if the molecule has not been found.