Slant Column Density

The slant column fitter classes facilitate the extraction of slant column density values from radiance spectra, given suitable cross sections and optionally a Ring spectrum.

General SCD Class

class skdoas.scd.scd.SlantColumnFitterNonLinear(poly_degree: int, cross_sections: List[scipy.interpolate.interpolate.interp1d], ring_spectrum: Optional[scipy.interpolate.interpolate.interp1d], window: Tuple[float, float])

Bases: object

General class for fitting cross sections to measured spectra to derive slant column densities.

The following parameters can be specified for the fit:

  • the order of the polynomial representing the slow-changing spectral components
  • at least one absorbing species cross sections
  • a Ring spectrum to account for inelastic scattering
  • the wavelength window to perform the fit in

This classes uses the Levenberg-Marquardt algorithm as implemented in scipy.optimize.curve_fit.

fit(wl: numpy.core.multiarray.array, rad: numpy.core.multiarray.array, err: Optional[numpy.core.multiarray.array] = None, **kwargs)

Performs a spectral fit on the supplied radiance data in order to retrieve the slant column densities.

Parameters:
  • wl (numpy.array) – The wavelengths in nm where the radiance is specified.
  • rad (numpy.array) – The radiance spectrum to fit to.
  • err (Union[numpy.array, None]) – The error associated with rad. If err is set to None, equal error is assumed across all wavelengths and the retrieved one sigma values will not be physically meaningful.
  • **kwargs – Keyword arguments to pass to scipy.optimize.curve_fit.
Returns:

Dictionary containing the following entries:

  • ’popt’: The optimal parameters in the order required for function and jacobian.
  • ’pcov’: The covariance matrix associated with the optimal parameters.
  • ’scds’: The slant column densities extracted from popt, in the order of the provided cross sections.
  • ’scds_one_sigma’: The one sigma uncertainty associated with each slant column density.
  • ’ring’: The retrieved Ring amplitude. Only included if a Ring spectrum was provided.
  • ’ring_one_sigma’: The one sigma uncertaintly associated with the Ring amplitude. Only included if a Ring spectrum was provided.
  • ’chi_sq’: The chi squared value for the fit. Only included if err is supplied. Values close to 1 indicate that the fitting residual matches the error well.

Return type:

dict

function(wl: numpy.core.multiarray.array, *fit_params)

The non-linear DOAS equation.

Parameters:
  • wl (numpy.array) – Wavelengths in nm to evaluate the equation at.
  • *fit_params (List[float]) –

    The parameters that are being optimized. Should consists of the following values (in this order):

    • all polynomial coefficients in order of descending power
    • all slant column densities (in the same order as the provided cross sections)
    • the Ring amplitude (only if a Ring spectrum was provided)
Returns:

The non-linear DOAS equation evaluated at wl and fit_params. The array has shape (len(wl),).

Return type:

numpy.array

jacobian(wl, *fit_params)

The Jacobian for the non-linear DOAS equation.

Parameters:
  • wl (numpy.array) – Wavelengths in nm to evaluate the equation at.
  • *fit_params (List[float]) –

    The parameters that are being optimized. Should consists of the following values (in this order):

    • all polynomial coefficients in order of descending power
    • all slant column densities (in the same order as the provided cross sections)
    • the Ring amplitude (only if a Ring spectrum was provided)
Returns:

The Jacobian of the non-linear DOAS equation evaluated at wl and fit_params. The array has shape (len(wl), len(fit_params)).

Return type:

numpy.array

cross_sections

List of interpolation objects representing cross sections for all absorbing species that will be included in the fit. The interpolation must be valid for all wavelengths where the spectrum is defined.

Type:List[interp1d]
polynomial_degree

Order of the polynomial to fit to the spectrum.

Type:int
ring_spectrum

Interpolation object representing the differential Ring spectrum to be used in the fit. If this is set to None then the Ring effect is not accounted for.

Type:interp1d
window

Wavelength window in nm where the fit should be performed. Radiances at wavelengths outside this window will be ignored when passed to the fit function.

Type:Tuple[float, float]

OMI NO2 Standard Product V2.1

class skdoas.scd.omno2.SlantColumnFitterOMNO2(cross_section_no2: scipy.interpolate.interpolate.interp1d, cross_section_o3: scipy.interpolate.interpolate.interp1d, cross_section_h2o: scipy.interpolate.interpolate.interp1d, ring_spectrum: scipy.interpolate.interpolate.interp1d)

Bases: skdoas.scd.scd.SlantColumnFitterNonLinear

This class carries out the spectral fitting for OMI as described in Section 2.1 of Bucsela et. al., with no de-striping. Absorption cross sections for NO2, O3, and H2O are fit to the measured spectra, as well as a Ring spectrum.

References

E. J. Bucsela, N. A. Krotkov, E. A. Celarier, L. N. Lamsal, W. H. Swartz, P. K. Bhartia, K. F. Boersma, J. P. Veefkind, J. F. Gleason, and K. E. Pickering. A new stratospheric and tropospheric NO2 retrieval algorithm for nadir-viewing sateelite instruments: applications to OMI. Atmospheric Measurement Techniques, 6:2607-2626, 2013.

fit(wl: numpy.core.multiarray.array, rad: numpy.core.multiarray.array, err: Optional[numpy.core.multiarray.array] = None, **kwargs)

Performs a spectral fit on the supplied radiance data in order to retrieve the slant column densities.

Parameters:
  • wl (numpy.array) – The wavelengths in nm where the radiance is specified.
  • rad (numpy.array) – The radiance spectrum to fit to.
  • err (Union[numpy.array, None]) – The error associated with rad. If err is set to None, equal error is assumed across all wavelengths and the retrieved one sigma values will not be physically meaningful.
  • **kwargs – Keyword arguments to pass to scipy.optimize.curve_fit.
Returns:

Dictionary containing the following entries:

  • ’popt’: The optimal parameters in the order required for function and jacobian.
  • ’pcov’: The covariance matrix associated with the optimal parameters.
  • ’no2_scd’: The NO2 slant column density.
  • ’no2_scd_one_sigma’: The one sigma uncertainty associated with the NO2 slant column density.
  • ’o3_scd’: The O3 slant column density.
  • ’o3_scd_one_sigma’: The one sigma uncertainty associated with the O3 slant column density.
  • ’h2o_scd’: The NO2 slant column density.
  • ’h2o_scd_one_sigma’: The one sigma uncertainty associated with the H2O slant column density.
  • ’ring’: The retrieved Ring amplitude. Only included if a Ring spectrum was provided.
  • ’ring_one_sigma’: The one sigma uncertaintly associated with the Ring amplitude. Only included if a Ring spectrum was provided.
  • ’chi_sq’: The chi squared value for the fit. Only included if err is supplied. Values close to 1 indicate that the fitting residual matches the error well.

Return type:

dict