exo_k.util.spectral_object

@author: jeremy leconte

A class with some basic functions for all objects with a spectral dimension

Module Contents

class exo_k.util.spectral_object.Spectral_object[source]

Bases: object

A class with some basic functions for all objects with a spectral dimension

Initializes some attributes to None

property wls

Returns the wavelength array for the bin centers (in micron)

property wledges

Returns the wavelength array for the bin edges (in micron)

property wnrange

Returns the limits of the wavenumber range.

First tries with wnedges (for Ktables) and then wns (Xtables).

property wlrange

Returns the limits of the wavelength range

_compute_spectral_range(wn_range=None, wl_range=None)[source]

Converts an unordered spectral range in either wavenumber or wavelength in an ordered wavenumber range.

Parameters:
  • wn_range (list or array of size 2) – Minimum and maximum wavenumber (in cm^-1).

  • wl_range (list or array of size 2) – Minimum and maximum wavelength (in micron)

select_spectral_range(wn_range=None, wl_range=None)[source]

Select spectral range, without restricting the data (but the spectral axes are modified in place). Should use either wn_range OR wl_range, not both.

To be selected, the whole bin must be inside the range.

Parameters:
  • wn_range (array, np.ndarray) – Wavenumber range in cm^-1.

  • wl_range (array, np.ndarray) – Wavelength range in micron.

Returns:

tuple:

iw_min, iw_max the boundary indices of the spectral range

blackbody(Temperature, integral=True)[source]

Computes the surface black body flux (in W/m^2/cm^-1) at Temperature.

Parameters:
  • float (Temperature;) – Blackbody temperature

  • integral (boolean, optional) –

    • If true, the black body is integrated within each wavenumber bin.

    • If not, only the central value is used. False is faster and should be ok for small bins, but True is the correct version.

Returns:

Spectrum object

Spectral flux in W/m^2/cm^-1