DOS#

class geowombat.radiometry.DOS[source]#

Bases: AOT, RadTransforms

Methods

dn_to_radiance(dn, gain, bias)

Converts digital numbers to radiance.

dn_to_sr(dn, solar_za, solar_az, sensor_za, ...)

Converts digital numbers to surface reflectance.

dn_to_toar(dn, gain, bias[, solar_za, ...])

Converts digital numbers to top-of-atmosphere reflectance.

get_aot(data, sza, meta[, data_values, ...])

Gets the aerosol optical thickness (AOT) from dark objects.

get_landsat_coefficients(meta_file)

Gets coefficients from a Landsat metadata file.

get_optimized_aot(blue_rad_dark, ...[, max_aot])

Gets the optimal aerosol optical thickness.

get_sentinel_coefficients(meta_file)

Gets coefficients from a Sentinel metadata file.

radiance_to_toar(radiance, solar_za, global_args)

Converts radiance to top-of-atmosphere reflectance.

toar_to_rad(toar, meta)

Converts top of atmosphere reflectance to top of atmosphere radiance.

toar_to_sr(toar, solar_za, solar_az, ...[, ...])

Converts top-of-atmosphere reflectance to surface reflectance.

Methods Documentation

get_aot(data, sza, meta, data_values='dn', angle_factor=0.01, dn_interp=None, interp_method='fast', aot_fallback=0.3, h2o=2.0, o3=0.3, altitude=0.0, w=None, n_jobs=1)[source]#

Gets the aerosol optical thickness (AOT) from dark objects.

Parameters:
  • data (DataArray) – The digital numbers or top of atmosphere reflectance at a coarse resolution.

  • sza (float | DataArray) – The solar zenith angle.

  • meta (Optional[namedtuple]) – A metadata object with gain and bias coefficients.

  • data_values (Optional[str]) – The values of data. Choices are [‘dn’, ‘toar’].

  • angle_factor (Optional[float]) – The scale factor for angles.

  • dn_interp (Optional[DataArray]) – A source DataArray at the target resolution.

  • interp_method (Optional[str]) – The LUT interpolation method. Choices are [‘fast’, ‘slow’]. ‘fast’: Uses nearest neighbor lookup with scipy.interpolate.NearestNDInterpolator. ‘slow’: Uses linear interpolation with scipy.interpolate.LinearNDInterpolator.

  • aot_fallback (Optional[float | DataArray]) – The aerosol optical thickness fallback if no dark objects are found (unitless). [0,3].

  • h2o (Optional[float]) – The water vapor (g/m^2). [0,8.5].

  • o3 (Optional[float]) – The ozone (cm-atm). [0,8].

  • altitude (Optional[float]) – The altitude over the sensor acquisition location (km above sea level).

  • w (Optional[int]) – The smoothing window size (in pixels).

  • n_jobs (Optional[int]) – The number of parallel jobs for moving_window and dask.compute.

Returns:

Data range: 0-3

Return type:

xarray.DataArray

References

See [MVS+06], [KWR+97], and [OV99].

get_optimized_aot(blue_rad_dark, blue_p_dark, sensor, wavelength, interp_method, sza, doy, h2o, o3, altitude, max_aot=0.5)#

Gets the optimal aerosol optical thickness.

Parameters:
  • blue_rad_dark (DataArray) –

  • blue_p_dark (DataArray) –

  • sensor (str) –

  • wavelength (str) –

  • interp_method (str) –

  • sza (float) – The solar zenith angle (in degrees).

  • doy (int) – The day of year.

  • h2o (float) – The water vapor (g/m^2). [0,8.5].

  • o3 (float) – The ozone (cm-atm). [0,8].

  • altitude (float) –

  • max_aot (float) –

get_aot(data, sza, meta, data_values='dn', angle_factor=0.01, dn_interp=None, interp_method='fast', aot_fallback=0.3, h2o=2.0, o3=0.3, altitude=0.0, w=None, n_jobs=1)[source]#

Gets the aerosol optical thickness (AOT) from dark objects.

Parameters:
  • data (DataArray) – The digital numbers or top of atmosphere reflectance at a coarse resolution.

  • sza (float | DataArray) – The solar zenith angle.

  • meta (Optional[namedtuple]) – A metadata object with gain and bias coefficients.

  • data_values (Optional[str]) – The values of data. Choices are [‘dn’, ‘toar’].

  • angle_factor (Optional[float]) – The scale factor for angles.

  • dn_interp (Optional[DataArray]) – A source DataArray at the target resolution.

  • interp_method (Optional[str]) – The LUT interpolation method. Choices are [‘fast’, ‘slow’]. ‘fast’: Uses nearest neighbor lookup with scipy.interpolate.NearestNDInterpolator. ‘slow’: Uses linear interpolation with scipy.interpolate.LinearNDInterpolator.

  • aot_fallback (Optional[float | DataArray]) – The aerosol optical thickness fallback if no dark objects are found (unitless). [0,3].

  • h2o (Optional[float]) – The water vapor (g/m^2). [0,8.5].

  • o3 (Optional[float]) – The ozone (cm-atm). [0,8].

  • altitude (Optional[float]) – The altitude over the sensor acquisition location (km above sea level).

  • w (Optional[int]) – The smoothing window size (in pixels).

  • n_jobs (Optional[int]) – The number of parallel jobs for moving_window and dask.compute.

Returns:

Data range: 0-3

Return type:

xarray.DataArray

References

See [MVS+06], [KWR+97], and [OV99].