isofit.radiative_transfer.engines.six_s

Attributes

Logger

eps

SIXS_TEMPLATE

Classes

SixSRT

A model of photon transport including the atmosphere.

Functions

get_exe(→ str)

Retrieves the 6S executable from a given path

Module Contents

Logger[source]
eps = 1e-05[source]
SIXS_TEMPLATE = Multiline-String[source]
Show Value
"""0 (User defined)
{solzen} {solaz} {viewzen} {viewaz} {month} {day}
8  (User defined H2O, O3)
{H2OSTR}, {O3}{CO2}
{aermodel}
0
{AOT550}
-{elev:.2f} (target level)
-{alt:.2f} (sensor level)
-{H2OSTR}, -{O3}
{AOT550}
-2
{wlinf}
{wlsup}
0 Homogeneous surface
0 (no directional effects)
0
0
0
-1 No atm. corrections selected
"""
class SixSRT(engine_config: RadiativeTransferEngineConfig, modtran_emulation=False, **kwargs)[source]

Bases: isofit.radiative_transfer.radiative_transfer_engine.RadiativeTransferEngine

A model of photon transport including the atmosphere.

modtran_emulation = False[source]
wl[source]
fwhm[source]
engine_base_dir[source]
exe[source]
co2_mode = False[source]
preSim()[source]

Add the 6S executable in the LUT attributes

makeSim(point: numpy.array)[source]

Perform 6S simulations

Parameters:

point (np.array) – Point to process

readSim(point: numpy.array)[source]

Parses a 6S output simulation file for a given point

Parameters:

point (np.array) – Point to process

Returns:

data – Simulated data results. These keys correspond with the expected keys of ISOFIT’s LUT files

Return type:

dict

postSim()[source]

Update solar_irr after simulations

rebuild_cmd(point, wlinf, wlsup) str[source]

Build the simulation command file.

Parameters:
  • point (np.array) – conditions to alter in simulation

  • wlinf (float) – shortest wavelength to run simulation for

  • wlsup – (float): longest wavelength to run simulation for

Returns:

execution command

Return type:

str

load_esd()[source]

Loads the earth-sun distance file

static parse_file(file, wl, multipart_transmittance=False, wl_size=0) dict[source]

Parses a 6S sim file

Parameters:
  • file (str) – Path to simulation file to parse

  • wl (np.array) – Simulation wavelengths

  • multipart_transmittance (bool) – Flag to tell program to parse up-down split transmittances

  • wl_size (int, default=0) – Size of the wavelengths dim, will trim data to this size. If zero, does no trimming

Returns:

data – Simulated data results. These keys correspond with the expected keys of ISOFIT’s LUT files

Return type:

dict

Examples

>>> from isofit.data import env
>>> from isofit.radiative_transfer.engines import SixSRT
>>> SixSRT.parse_file(f'{env.examples}/20151026_SantaMonica/lut/AOT550-0.0000_H2OSTR-0.5000', wl_size=3)
{'sphalb': array([0.3116, 0.3057, 0.2999]),
 'rhoatm': array([0.2009, 0.1963, 0.1916]),
 'transm_down_dif': array([0.53211358, 0.53993346, 0.54736113]),
 'solzen': 55.21,
 'coszen': 0.5705702414191993}
get_exe(path: str = None, version: bool = False) str[source]

Retrieves the 6S executable from a given path

Parameters:
  • path (str, default=None) – 6S directory path. If None, defaults to the ini sixs path

  • version (bool, default=False) – Returns the 6S version instead

Returns:

Either the 6S executable as a pathlib object or the string 6S version

Return type:

pathlib.Path | str