Skip to content

Instantly share code, notes, and snippets.

@robintw
Created July 10, 2016 20:07
Show Gist options
  • Save robintw/990ec9cbdf17d8dbc9bc981af8f827f4 to your computer and use it in GitHub Desktop.
Save robintw/990ec9cbdf17d8dbc9bc981af8f827f4 to your computer and use it in GitHub Desktop.
from Py6S import *
s = SixS()
s.altitudes.set_sensor_satellite_level()
s.altitudes.set_target_sea_level()
s.atmos_profile = AtmosProfile.UserWaterAndOzone(3.6, 0.9)
s.aot550 = 0.5
s.wavelength = Wavelength(0.940)
s.atmos_corr = AtmosCorr.AtmosCorrLambertianFromRadiance(100)
wvs, res = SixSHelpers.Wavelengths.run_vnir(s)
xas = SixSHelpers.Wavelengths.extract_output(res, 'coef_xa')
xbs = SixSHelpers.Wavelengths.extract_output(res, 'coef_xb')
xcs = SixSHelpers.Wavelengths.extract_output(res, 'coef_xc')
figure(figsize=(10, 6))
plot(wvs, xas, label='a')
plot(wvs, xbs, label='b')
plot(wvs, xcs, label='c')
ylim(0,0.6)
xlabel('Wavelength ($\mu$m)')
ylabel('Coefficient value')
legend(loc='best')
#savefig('AtmosCorr_Coefs.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment