isofit.radiative_transfer.modtran

class ModtranRT(engine_config, full_config)[source]

Bases: isofit.radiative_transfer.look_up_tables.TabularRT

A model of photon transport including the atmosphere.

find_basedir(config)[source]

Seek out a modtran base directory.

load_tp6(infile)[source]

Load a ‘.tp6’ file. This contains the solar geometry. We Return cosine of mean solar zenith.

load_chn(infile, coszen)[source]

Load a ‘.chn’ output file and parse critical coefficient vectors.

These are:
  • wl - wavelength vector
  • sol_irr - solar irradiance
  • sphalb - spherical sky albedo at surface
  • transm - diffuse and direct irradiance along the
    sun-ground-sensor path
  • transup - transmission along the ground-sensor path only

Be careful with these! They are to be used only by the modtran_tir functions because MODTRAN must be run with a reflectivity of 1 for them to be used in the RTM defined in radiative_transfer.py.

  • thermal_upwelling - atmospheric path radiance
  • thermal_downwelling - sky-integrated thermal path radiance
    reflected off the ground and back into the sensor.

We parse them one wavelength at a time.

ext550_to_vis(ext550)[source]

.

modtran_driver(overrides)[source]

Write a MODTRAN 6.0 input file.

build_lut(rebuild=False)[source]

Each LUT is associated with a source directory.

We build a lookup table by:
  1. defining the LUT dimensions, state vector names, and the grid of values;
  2. running modtran if needed, with each MODTRAN run defining a different point in the LUT; and
  3. loading the LUTs, one per key atmospheric coefficient vector, into memory as VectorInterpolator objects.
rebuild_cmd(point, fn)[source]

.

required_results_exist(fn)[source]
load_rt(fn)[source]

.

get(x_RT, geom)[source]
get_L_atm(x_RT, geom)[source]
get_L_atm_vswir(x_RT, geom)[source]
get_L_atm_tir(x_RT, geom)[source]
get_L_down_transmitted(x_RT, geom)[source]
get_L_down_transmitted_vswir(x_RT, geom)[source]
get_L_down_transmitted_tir(x_RT, geom)[source]

thermal_downwelling already includes the transmission factor. Also assume there is no multiple scattering for TIR.

wl2flt(wls, fwhms, outfile)[source]

Helper function to generate Gaussian distributions around the center wavelengths.