SRF

class typhon.physics.units.SRF(f, W)[source]

Respresents a spectral response function

TODO: representation of uncertainties

__init__(f, W)[source]

Initialise SRF object.

You can either initialise an SRF from scratch, or use the classmethod fromArtsXML to read it from a file.

A toy example on initiating it from scratch:

>>> from typhon.physics.units.common import ureg
>>> from typhon.physics.units.em import SRF
>>> srf = SRF(ureg.Quantity(numpy.array([200, 200.1, 200.2, 200.3, 200.4, 200.5]), 'GHz'), numpy.array([0, 0.5, 1, 1, 0.5, 0]))
>>> R_300 = srf.blackbody_radiance(ureg.Quantity(300, 'K'))
>>> print(R_300)
[  3.63716781e-15] watt / hertz / meter ** 2 / steradian
>>> print(R_300.to("K", "radiance", srf=srf))
[ 300.] kelvin

You can also pass in other spectroscopic units (wavenumber, wavelength) that will be converted internally to frequency:

>>> srf = SRF(ureg.Quantity(numpy.array([10.8, 10.9, 11.0, 11.1, 11.2, 11.3]), 'um'), numpy.array([0, 0.5, 1, 1, 0.5, 0]))
>>> R_300 = srf.blackbody_radiance(ureg.Quantity(numpy.atleast_1d(250), 'K'))
>>> print(R_300)
[  1.61922509e-12] watt / hertz / meter ** 2 / steradian
>>> print(R_300.to("cm * mW / m**2 / sr", "radiance"))
[ 48.54314703] centimeter * milliwatt / meter ** 2 / steradian
>>> print(R_300.to("K", "radiance", srf=srf))
[ 300.] kelvin
Parameters:
  • f (ndarray) – Array of frequencies. Can be either a pure ndarray, which will be assumed to be in Hz, or a ureg quantity.

  • W (ndarray) – Array of associated weights.

Methods

__init__(f, W)

Initialise SRF object.

as_dataarray(coordinate)

Return xarray.DataArray object.

blackbody_radiance(T[, spectral])

Calculate integrated radiance for blackbody at temperature T

centroid()

Calculate centre frequency

channel_radiance2bt(L)

Convert channel radiance to brightness temperature

estimate_band_coefficients([sat, instr, ch, ...])

Estimate band coefficients for fast/explicit BT calculations

fromArtsXML(sat, instr, ch)

Read SRF from ArtsXML files.

fromRTTOV(sat, instr, ch)

Read SRF from RTTOV format files.

integrate_radiances(f, L[, spectral])

From a spectrum of radiances and a SRF, calculate channel (spectral) radiance

make_lookup_table()

Construct lookup table radiance <-> BT

shift(amount)

Get new SRF, shifted by <amount>

Attributes

L_to_T

T_lookup_table

frequency

lookup_table

wavelength

wavenumber