hypso.atmospheric.atmospheric_correction_6sv1

Module Contents

Functions

BasicParameters(wavelengths, hypercube_L1, hypso_info, ...)

Get the parameters you need for 6s atmospheric correction

clip_srf(single_wl, single_srf)

Trim and clip Spectral Response Function (SRF) to the 6SV1 requirements

AtmosphericCorrection(BandId, SixsInputParameter, srf)

Call the 6s model and assign values to the parameters to obtain the atmospheric correction coefficients

get_surface_reflectance(radiance_band, py6s_results)

Calculate surface reflectance from at-sensor radiance given waveband name and the 6SV1 coefficients

get_corrected_radiance(radiance_band, py6s_results)

Alternative NOT USED method to correct based on the coefficients a, b and c

run_py6s(wavelengths, hypercube_L1, hypso_info, ...)

Run the PY6S atmospheric correction on the Hypso spectral image

hypso.atmospheric.atmospheric_correction_6sv1.BasicParameters(wavelengths, hypercube_L1, hypso_info, lat_2d_array, lon_2d_array, time_capture)

Get the parameters you need for 6s atmospheric correction

Parameters:
  • wavelengths (numpy.ndarray) – Wavelengths corresponding to the spectral image

  • hypercube_L1 (numpy.ndarray) – Hypercube of the spectral image L1B

  • hypso_info (dict) – Dictionary containing the information of the spectral image

  • lat_2d_array (numpy.ndarray) – 2D latitude array of the spectral image

  • lon_2d_array (numpy.ndarray) – 2D longitude array of the spectral image

  • time_capture (datetime) – Time of the capture

Returns:

Dictionary of the Basic Paramters for the PY6SV1 correction method

Return type:

dict

hypso.atmospheric.atmospheric_correction_6sv1.clip_srf(single_wl, single_srf)

Trim and clip Spectral Response Function (SRF) to the 6SV1 requirements

Parameters:
  • single_wl – Wavelengths for the SRF

  • single_srf – Single band SRF [0, 1]

Returns:

Returns the wavelength of the SRF adjusted for 6SV1 and the SRF for the 6SV1 model [0, 1]

Return type:

Tuple[numpy.ndarray, numpy.ndarray]

hypso.atmospheric.atmospheric_correction_6sv1.AtmosphericCorrection(BandId, SixsInputParameter, srf)

Call the 6s model and assign values to the parameters to obtain the atmospheric correction coefficients

Parameters:
  • BandId (int) – ID of the band being corrected

  • SixsInputParameter (dict) – Basic Parmeters used for the correction

  • srf (list) – Spectral response functions for Hypso

Returns:

Return type:

dict

hypso.atmospheric.atmospheric_correction_6sv1.get_surface_reflectance(radiance_band, py6s_results)

Calculate surface reflectance from at-sensor radiance given waveband name and the 6SV1 coefficients

Parameters:
  • radiance_band (numpy.ndarray) – Radiance band to calculate surface reflectance (2D array)

  • py6s_results (dict) – Dictionary containing the results of the correction

Returns:

Surface reflectance for a single band

Return type:

numpy.ndarray

hypso.atmospheric.atmospheric_correction_6sv1.get_corrected_radiance(radiance_band, py6s_results)

Alternative NOT USED method to correct based on the coefficients a, b and c

Parameters:
  • radiance_band (numpy.ndarray) – Radiance band to calculate surface reflectance (2D array)

  • py6s_results – Dictionary containing the results of the correction

Returns:

Surface reflectance for a single band

Return type:

numpy.ndarray

hypso.atmospheric.atmospheric_correction_6sv1.run_py6s(wavelengths, hypercube_L1, hypso_info, lat_2d_array, lon_2d_array, py6s_dict, time_capture, srf)

Run the PY6S atmospheric correction on the Hypso spectral image

Parameters:
  • wavelengths (numpy.ndarray) – Wavelengths corresponding to the spectral image

  • hypercube_L1 (numpy.ndarray) – Hypercube of the spectral image L1B

  • hypso_info (dict) – Dictionary containing the information of the spectral image

  • lat_2d_array (numpy.ndarray) – 2D latitude array of the spectral image

  • lon_2d_array (numpy.ndarray) – 2D longitude array of the spectral image

  • py6s_dict (dict) – Dictionary containing the PY6S information for atmospheric correction

  • time_capture (datetime) – Time of the capture

  • srf (list) – Spectral response function for each of the 120 bands

Returns:

Return 3-channel surface reflectance spectral image

Return type:

numpy.ndarray