SixS#
- class geowombat.radiometry.SixS[source]#
-
A class to handle loading, downloading and interpolating of LUTs (look up tables) used by the 6S emulator.
- Parameters:
sensor (str) – The sensor to adjust.
rad_scale (Optional[float]) – The radiance scale factor. Scaled values should be in the range [0,1000].
angle_factor (Optional[float]) – The angle scale factor.
Example
>>> sixs = SixS('l5', verbose=1) >>> >>> with gw.config.update(sensor='l7'): >>> with gw.open('image.tif') as src, gw.open('solar_za') as sza: >>> sixs.rad_to_sr(src, 'blue', sza, doy, h2o=1.0, o3=0.4, aot=0.3)
Methods
rad_to_sr
(data, sensor, wavelength, sza, doy)Converts radiance to surface reflectance using a 6S radiative transfer model lookup table.
toar_to_sr
(data, sensor, wavelength, sza, doy)Converts top of atmosphere reflectance to surface reflectance using 6S outputs.
get_mean_altitude
prepare_coeff
Methods Documentation
- rad_to_sr(data, sensor, wavelength, sza, doy, src_nodata=-32768, dst_nodata=-32768, angle_factor=0.01, interp_method='fast', h2o=1.0, o3=0.4, aot=0.3, altitude=0.0, n_jobs=1)[source]#
Converts radiance to surface reflectance using a 6S radiative transfer model lookup table.
- Parameters:
data (DataArray) – The data to correct, in radiance.
sensor (str) – The sensor name.
wavelength (str) – The band wavelength to process.
sza (float | DataArray) – The solar zenith angle.
doy (int) – The day of year.
src_nodata (Optional[int or float]) – The input ‘no data’ value.
dst_nodata (Optional[int or float]) – The output ‘no data’ value.
angle_factor (Optional[float]) – The scale factor for angles.
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 withscipy.interpolate.LinearNDInterpolator
.h2o (Optional[float]) – The water vapor (g/m^2). [0,8.5].
o3 (Optional[float]) – The ozone (cm-atm). [0,8].
aot (Optional[float | DataArray]) – The aerosol optical thickness (unitless). [0,3].
altitude (Optional[float]) – The altitude over the sensor acquisition location.
n_jobs (Optional[int]) – The number of parallel jobs for
dask.compute
.
- Returns:
Data range: 0-1
- Return type:
xarray.DataArray
- toar_to_sr(data, sensor, wavelength, sza, doy, src_nodata=-32768, dst_nodata=-32768, angle_factor=0.01, interp_method='fast', h2o=1.0, o3=0.4, aot=0.3, altitude=0.0, n_jobs=1)[source]#
Converts top of atmosphere reflectance to surface reflectance using 6S outputs.
- Parameters:
data (DataArray) – The top of atmosphere reflectance.
sensor (str) – The sensor name.
wavelength (str) – The band wavelength to process.
sza (float | DataArray) – The solar zenith angle.
doy (int) – The day of year.
src_nodata (Optional[int or float]) – The input ‘no data’ value.
dst_nodata (Optional[int or float]) – The output ‘no data’ value.
angle_factor (Optional[float]) – The scale factor for angles.
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 withscipy.interpolate.LinearNDInterpolator
.h2o (Optional[float]) – The water vapor (g/m^2). [0,8.5].
o3 (Optional[float]) – The ozone (cm-atm). [0,8].
aot (Optional[float | DataArray]) – The aerosol optical thickness (unitless). [0,3].
altitude (Optional[float]) – The altitude over the sensor acquisition location.
n_jobs (Optional[int]) – The number of parallel jobs for
dask.compute
.
- 6S model outputs:
- t_g (float): The total gaseous transmission of the atmosphere.
s.run() –> s.outputs.total_gaseous_transmittance
- p_alpha (float): The atmospheric reflectance.
s.run() –> s.outputs.atmospheric_intrinsic_reflectance
- s (float): The spherical albedo of the atmosphere.
s.run() –> s.outputs.spherical_albedo
- t_s (float): The atmospheric transmittance from sun to target.
s.run() –> s.outputs.transmittance_total_scattering.downward
- t_v (float): The atmospheric transmittance from target to satellite.
s.run() –> s.outputs.transmittance_total_scattering.upward
- rad_to_sr(data, sensor, wavelength, sza, doy, src_nodata=-32768, dst_nodata=-32768, angle_factor=0.01, interp_method='fast', h2o=1.0, o3=0.4, aot=0.3, altitude=0.0, n_jobs=1)[source]#
Converts radiance to surface reflectance using a 6S radiative transfer model lookup table.
- Parameters:
data (DataArray) – The data to correct, in radiance.
sensor (str) – The sensor name.
wavelength (str) – The band wavelength to process.
sza (float | DataArray) – The solar zenith angle.
doy (int) – The day of year.
src_nodata (Optional[int or float]) – The input ‘no data’ value.
dst_nodata (Optional[int or float]) – The output ‘no data’ value.
angle_factor (Optional[float]) – The scale factor for angles.
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 withscipy.interpolate.LinearNDInterpolator
.h2o (Optional[float]) – The water vapor (g/m^2). [0,8.5].
o3 (Optional[float]) – The ozone (cm-atm). [0,8].
aot (Optional[float | DataArray]) – The aerosol optical thickness (unitless). [0,3].
altitude (Optional[float]) – The altitude over the sensor acquisition location.
n_jobs (Optional[int]) – The number of parallel jobs for
dask.compute
.
- Returns:
Data range: 0-1
- Return type:
xarray.DataArray
- toar_to_sr(data, sensor, wavelength, sza, doy, src_nodata=-32768, dst_nodata=-32768, angle_factor=0.01, interp_method='fast', h2o=1.0, o3=0.4, aot=0.3, altitude=0.0, n_jobs=1)[source]#
Converts top of atmosphere reflectance to surface reflectance using 6S outputs.
- Parameters:
data (DataArray) – The top of atmosphere reflectance.
sensor (str) – The sensor name.
wavelength (str) – The band wavelength to process.
sza (float | DataArray) – The solar zenith angle.
doy (int) – The day of year.
src_nodata (Optional[int or float]) – The input ‘no data’ value.
dst_nodata (Optional[int or float]) – The output ‘no data’ value.
angle_factor (Optional[float]) – The scale factor for angles.
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 withscipy.interpolate.LinearNDInterpolator
.h2o (Optional[float]) – The water vapor (g/m^2). [0,8.5].
o3 (Optional[float]) – The ozone (cm-atm). [0,8].
aot (Optional[float | DataArray]) – The aerosol optical thickness (unitless). [0,3].
altitude (Optional[float]) – The altitude over the sensor acquisition location.
n_jobs (Optional[int]) – The number of parallel jobs for
dask.compute
.
- 6S model outputs:
- t_g (float): The total gaseous transmission of the atmosphere.
s.run() –> s.outputs.total_gaseous_transmittance
- p_alpha (float): The atmospheric reflectance.
s.run() –> s.outputs.atmospheric_intrinsic_reflectance
- s (float): The spherical albedo of the atmosphere.
s.run() –> s.outputs.spherical_albedo
- t_s (float): The atmospheric transmittance from sun to target.
s.run() –> s.outputs.transmittance_total_scattering.downward
- t_v (float): The atmospheric transmittance from target to satellite.
s.run() –> s.outputs.transmittance_total_scattering.upward