isofit.utils.apply_oe

apply_oe(args)[source]

This is a helper script to apply OE over a flightline using the MODTRAN radiative transfer engine.

The goal is to run isofit in a fairly ‘standard’ way, accounting for the types of variation that might be considered typical. For instance, we use the observation (obs) and location (loc) files to determine appropriate MODTRAN view-angle geometry look up tables, and provide a heuristic means of determing atmospheric water ranges.

This code also proivdes the capicity for speedup through the empirical line solution.

Parameters:
  • input_radiance (str) – radiance data cube [expected ENVI format]

  • input_loc (str) – location data cube, (Lon, Lat, Elevation) [expected ENVI format]

  • input_obs (str) – observation data cube, (path length, to-sensor azimuth, to-sensor zenith, to-sun azimuth, to-sun zenith, phase, slope, aspect, cosine i, UTC time) [expected ENVI format]

  • working_directory (str) – directory to stage multiple outputs, will contain subdirectories

  • sensor (str) – the sensor used for acquisition, will be used to set noise and datetime settings. choices are: [ang, avcl, neon, prism]

  • copy_input_files (Optional, int) – flag to choose to copy input_radiance, input_loc, and input_obs locally into the working_directory. 0 for no, 1 for yes. Default 0

  • modtran_path (Optional, str) – Location of MODTRAN utility, alternately set with MODTRAN_DIR environment variable

  • wavelength_path (Optional, str) – Location to get wavelength information from, if not specified the radiance header will be used

  • surface_category (Optional, str) – The type of isofit surface priors to use. Default is multicomponent_surface

  • aerosol_climatology_path (Optional, str) – Specific aerosol climatology information to use in MODTRAN, default None

  • rdn_factors_path (Optional, str) – Specify a radiometric correction factor, if desired. default None

  • surface_path (Optional, str) – Path to surface model - required if surface is multicomponent_surface (default above). Alternately set with ISOFIT_SURFACE_MODEL environment variable. default None

  • channelized_uncertainty_path (Optional, str) – path to a channelized uncertainty file. default None

  • lut_config_file (Optional, str) – Path to a look up table configuration file, which will override defaults chocies. default None

  • logging_level (Optional, str) – Logging level with which to run isofit. Default INFO

  • log_file (Optional, str) – File path to write isofit logs to. Default None

  • n_cores (Optional, int) – Number of cores to run isofit with. Substantial parallelism is available, and full runs will be very slow in serial. Suggested to max this out on the available system. Default 1

  • presolve (Optional, int) – Flag to use a presolve mode to estimate the available atmospheric water range. Runs a preliminary inversion over the image with a 1-D LUT of water vapor, and uses the resulting range (slightly expanded) to bound determine the full LUT. Advisable to only use with small cubes or in concert with the empirical_line setting, or a significant speed penalty will be incurred. Choices - 0 off, 1 on. Default 0

  • empirical_line (Optional, int) – Use an empirical line interpolation to run full inversions over only a subset of pixels, determined using a SLIC superpixel segmentation, and use a KDTREE Of local solutions to interpolate radiance->reflectance. Generally a good option if not trying to analyze the atmospheric state at fine scale resolution. Choices - 0 off, 1 on. Default 0

  • ray_temp_dir (Optional, str) – Location of temporary directory for ray parallelization engine. Default is ‘/tmp/ray’

  • emulator_base (Optional, str) – Location of emulator base path. Point this at the model folder (or h5 file) of sRTMnet to use the emulator instead of MODTRAN. An additional file with the same basename and the extention _aux.npz must accompany (e.g. /path/to/emulator.h5 /path/to/emulator_aux.npz)

  • segmentation_size (Optional, int) – Size of segments to construct for empirical line (if used).

  • num_neighbors (Optional, int) – Forced number of neighbors for empirical line extrapolation - overides default set from segmentation_size parameter.

  • pressure_elevation (Optional, bool) – If set, retrieves elevation.

  • prebuilt_lut (Optional, str) –

    Use this pres-constructed look up table for all retrievals.

    Reference: D.R. Thompson, A. Braverman,P.G. Brodrick, A. Candela, N. Carbon, R.N. Clark,D. Connelly, R.O. Green, R.F. Kokaly, L. Li, N. Mahowald, R.L. Miller, G.S. Okin, T.H.Painter, G.A. Swayze, M. Turmon, J. Susilouto, and D.S. Wettergreen. Quantifying Uncertainty for Remote Spectroscopy of Surface Composition. Remote Sensing of Environment, 2020. doi: https://doi.org/10.1016/j.rse.2020.111898.

    Emulator reference: P.G. Brodrick, D.R. Thompson, J.E. Fahlen, M.L. Eastwood, C.M. Sarture, S.R. Lundeen, W. Olson-Duvall, N. Carmon, and R.O. Green. Generalized radiative transfer emulation for imaging spectroscopy reflectance retrievals. Remote Sensing of Environment, 261:112476, 2021.doi: 10.1016/j.rse.2021.112476.

Returns: