Example: Atmospheric correction of the GOES-16 ABI visible bands with Pyspectral

In [1]:
from pyspectral import rayleigh
In [2]:
import numpy as np
In [3]:
sunz = np.array([[50., 60.], [50., 60.]])
In [4]:
satz = np.array([[40., 50.], [40., 50.]])
In [5]:
azidiff = np.array([[160, 160], [20, 20]])

Using default atmosphere and aerosol load: midlatitude summer and marine-clean aerosols

In [6]:
corr = rayleigh.Rayleigh('GOES-16', 'abi')
In [7]:
print corr.get_reflectance(sunz, satz, azidiff, 'ch1')
[[  7.66551598  11.84851174]
 [ 12.30975667  17.83044933]]
In [8]:
print corr.get_reflectance(sunz, satz, azidiff, 'ch2')
[[ 2.01927932  3.20415785]
 [ 3.52058364  5.18308456]]
In [9]:
print corr.get_reflectance(sunz, satz, azidiff, 'ch3')
[[ 0.  0.]
 [ 0.  0.]]
No handlers could be found for logger "pyspectral.rayleigh"

Select atmosphere and aerosol load

In [12]:
corr = rayleigh.Rayleigh('GOES-16', 'abi', atmosphere='midlatitude summer', aerosol_type='rural_aerosol')
In [13]:
print corr.get_reflectance(sunz, satz, azidiff, 'ch1')
[[ 11.25806044  19.05767067]
 [ 14.21482674  20.60287676]]