def main(): """Main""" handler = logging.StreamHandler(sys.stderr) handler.setLevel(logging.DEBUG) formatter = logging.Formatter(fmt=_DEFAULT_LOG_FORMAT, datefmt=_DEFAULT_TIME_FORMAT) handler.setFormatter(formatter) logging.getLogger('').addHandler(handler) logging.getLogger('').setLevel(logging.DEBUG) modis = RelativeSpectralResponse('EOS-Aqua', 'modis') modis.read(channel='20', scale=0.001) solar_irr = SolarIrradianceSpectrum(TOTAL_IRRADIANCE_SPECTRUM_2000ASTM, dlambda=0.005) solar_irr.read() # Calculate the solar-flux: sflux = solar_irr.solar_flux_over_band(modis.rsr) print("Solar flux over Band: ", sflux) from pyspectral.nir_reflectance import Calculator #refl37 = Calculator(modis.rsr, solar_flux=sflux) refl37 = Calculator(modis.rsr) sunz = 80. tb3 = 290 tb4 = 282 refl = refl37.reflectance_from_tbs(sunz, tb3, tb4) print refl refl37.make_tb2rad_lut('./modis_EOS-Aqua_band20_tb2rad_lut.npz')
def main(): """Main""" handler = logging.StreamHandler(sys.stderr) handler.setLevel(logging.DEBUG) formatter = logging.Formatter(fmt=_DEFAULT_LOG_FORMAT, datefmt=_DEFAULT_TIME_FORMAT) handler.setFormatter(formatter) logging.getLogger("").addHandler(handler) logging.getLogger("").setLevel(logging.DEBUG) modis = RelativeSpectralResponse("EOS-Aqua", "modis") modis.read(channel="20", scale=0.001) solar_irr = SolarIrradianceSpectrum(TOTAL_IRRADIANCE_SPECTRUM_2000ASTM, dlambda=0.005) solar_irr.read() # Calculate the solar-flux: sflux = solar_irr.solar_flux_over_band(modis.rsr) print ("Solar flux over Band: ", sflux) from pyspectral.nir_reflectance import Calculator # refl37 = Calculator(modis.rsr, solar_flux=sflux) refl37 = Calculator(modis.rsr) sunz = 80.0 tb3 = 290 tb4 = 282 refl = refl37.reflectance_from_tbs(sunz, tb3, tb4) print refl refl37.make_tb2rad_lut("./modis_EOS-Aqua_band20_tb2rad_lut.npz")
handler.setLevel(logging.DEBUG) formatter = logging.Formatter(fmt=_DEFAULT_LOG_FORMAT, datefmt=_DEFAULT_TIME_FORMAT) handler.setFormatter(formatter) logging.getLogger('').addHandler(handler) logging.getLogger('').setLevel(logging.DEBUG) LOG = logging.getLogger('example') modis = RelativeSpectralResponse('eos', 2, 'modis') modis.read(channel='20', scale=0.001) solar_irr = SolarIrradianceSpectrum(TOTAL_IRRADIANCE_SPECTRUM_2000ASTM, dlambda=0.005) solar_irr.read() # Calculate the solar-flux: sflux = solar_irr.solar_flux_over_band(modis.rsr) print("Solar flux over Band: ", sflux) from pyspectral.nir_reflectance import Calculator #refl37 = Calculator(modis.rsr, solar_flux=sflux) refl37 = Calculator(modis.rsr) SUNZ = 80. TB3 = 290 TB4 = 282 REFL = refl37.reflectance_from_tbs(SUNZ, TB3, TB4) print REFL
handler = logging.StreamHandler(sys.stderr) handler.setLevel(logging.DEBUG) formatter = logging.Formatter(fmt=_DEFAULT_LOG_FORMAT, datefmt=_DEFAULT_TIME_FORMAT) handler.setFormatter(formatter) logging.getLogger('').addHandler(handler) logging.getLogger('').setLevel(logging.DEBUG) LOG = logging.getLogger('example') modis = RelativeSpectralResponse('eos', 2, 'modis') modis.read(channel='20', scale=0.001) solar_irr = SolarIrradianceSpectrum(TOTAL_IRRADIANCE_SPECTRUM_2000ASTM, dlambda=0.005) solar_irr.read() # Calculate the solar-flux: sflux = solar_irr.solar_flux_over_band(modis.rsr) print("Solar flux over Band: ", sflux) from pyspectral.nir_reflectance import Calculator #refl37 = Calculator(modis.rsr, solar_flux=sflux) refl37 = Calculator(modis.rsr) SUNZ = 80. TB3 = 290 TB4 = 282 REFL = refl37.reflectance_from_tbs(SUNZ, TB3, TB4) print REFL