From b0f43d49e99c9099ac13548fdbed14743cea6e29 Mon Sep 17 00:00:00 2001 From: brentwilder Date: Fri, 20 Mar 2026 13:05:48 -0500 Subject: [PATCH 1/2] Add block on more details of input_radiance, input_loc, and input_obs --- docs/notebooks/apply_oe.ipynb | 58 ++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/docs/notebooks/apply_oe.ipynb b/docs/notebooks/apply_oe.ipynb index 1b92228..95628db 100644 --- a/docs/notebooks/apply_oe.ipynb +++ b/docs/notebooks/apply_oe.ipynb @@ -39,7 +39,63 @@ "\n", "`INPUT_RADIANCE` `INPUT_LOC` `INPUT_OBS` `WORKING_DIRECTORY` `SENSOR` and `--surface_path`.\n", "\n", - "which must be entered in the specified order (except `--surface_path` which can be added at any point but still required). Descriptions of each are found in the docstring printed above. It is important to note that the `INPUT_RADIANCE`, `INPUT_LOC`, and `INPUT_OBS` are ENVI raster data formats that must be at the same row-column dimensions. The `--surface_path` points Isofit torwards the constructed prior distribution file for surface reflectance. Optional arguments are denoted by the '--' in their name, e.g. `--modtran_path`, `--pressure_elevation`. It is important to note that the default radiative transfer engine (RTE) is currently set to Modtran. You must specify an `--emulator_path` without a Modtran installation." + "which must be entered in the specified order (except `--surface_path` which can be added at any point but still required). Descriptions of each are found in the docstring printed above. It is important to note that the `INPUT_RADIANCE`, `INPUT_LOC`, and `INPUT_OBS` are ENVI raster data formats that must be at the same row-column dimensions. The `--surface_path` points Isofit towards the constructed prior distribution file for surface reflectance. Optional arguments are denoted by the '--' in their name, e.g. `--modtran_path`, `--pressure_elevation`. It is important to note that the default radiative transfer engine (RTE) is currently set to sRTMnet, set via `--emulator_path`.\n", + "\n", + "\n", + "#### `INPUT_RADIANCE`\n", + "The data is at-sensor radiance in units of $\\mu W \\, cm^{-2} \\, nm^{-1} \\, sr^{-1} $. You may leverage **[isofit.core.units](https://isofit.github.io/isofit/latest/api/isofit/core/units/#isofit.core.units)** module which offers many common conversions. The .hdr file should be used to store the wavelength and fwhm. \n", + "\n", + "\n", + "#### `INPUT_LOC`\n", + "\n", + "1. **Longitude [degrees]**\n", + " - Range is -180 to 180\n", + "\n", + "2. **Latitude [degrees]**\n", + " - Range is -90 to 90\n", + "\n", + "3. **Elevation [meters]**\n", + " - Above mean sea level \n", + "\n", + "\n", + "\n", + "#### `INPUT_OBS`\n", + "\n", + "Note: the names of the keys do not need to match exactly, only the order matters.\n", + "\n", + "1. **Path length [meters]**\n", + " - Defined as the slant path from the sensor to the surface\n", + "\n", + "2. **To-sensor azimuth, $\\phi_v$ [degrees]**\n", + " - Ranges from 0-360, measured clockwise from north\n", + "\n", + "3. **To-sensor zenith, $\\theta_v$ [degrees]**\n", + " - Ranges from 0-90, measured from zenith\n", + "\n", + "4. **To-sun azimuth, $\\phi_s$ [degrees]**\n", + " - Ranges from 0-360, measured clockwise from north\n", + "\n", + "5. **To-sun zenith, $\\theta_s$ [degrees]**\n", + " - Ranges from 0-90, measured from zenith\n", + "\n", + "6. **Phase angle, $\\xi$ [degrees]**\n", + " - $cos(\\xi) = cos(\\theta_s) \\, cos(\\theta_v) \\, + \\, sin(\\theta_s) \\, sin(\\theta_v) \\, cos(\\phi_s - \\phi_v)$\n", + " - $\\xi = arccos(cos(\\xi))$\n", + "\n", + "7. **Slope, $S$ [degrees]**\n", + " - Ranges from 0-90\n", + "\n", + "8. **Aspect, $A$ [degrees]**\n", + " - Ranges from 0-360, measured clockwise from north\n", + "\n", + "9. **Cosine of the local solar illumination angle, $cos(i)$ [unitless]**\n", + " - $cos(i) = cos(\\theta_s) \\, cos(S) \\, + \\, sin(\\theta_s) \\, sin(S) \\, cos(\\phi_s - A) $\n", + "\n", + "10. **UTC time [decimal]**\n", + " - Ranges from 0 - 24\n", + "\n", + "11. **Earth-sun distance [AU]**\n", + " - Astronomical Unit as a function of day of year" ] }, { From 71b6d2f739d38e8ea22614ef0f6a5838735aaf13 Mon Sep 17 00:00:00 2001 From: brentwilder Date: Mon, 23 Mar 2026 16:12:09 -0500 Subject: [PATCH 2/2] Update all configs for single RT engine --- .../run/prm20151026t173213_D8W_6s.json | 34 +++++------ .../run/prm20151026t173213_D8p5W_6s.json | 34 +++++------ .../run/prm20151026t173213_D9W_6s.json | 34 +++++------ .../run/prm20151026t173213_D9p5W_6s.json | 34 +++++------ ...0171108t184227_beckmanlawn-libradtran.json | 16 +++-- .../modtran/ang20171108t173546_darklot.json | 16 +++-- .../modtran/ang20171108t173546_horse.json | 16 +++-- .../ang20171108t184227_astrogreen.json | 16 +++-- .../modtran/ang20171108t184227_astrored.json | 16 +++-- ...71108t184227_beckmanlawn-multimodtran.json | 18 +++--- ...71108t184227_beckmanlawn-oversmoothed.json | 16 +++-- ...1108t184227_beckmanlawn-undersmoothed.json | 16 +++-- .../ang20171108t184227_beckmanlawn.json | 16 +++-- ...227_beckmanlawn-multimodtran-topoflux.json | 18 +++--- ...m20231110t071521_multi_surface_isofit.json | 38 ++++++------ ...20231110t071521_single_surface_isofit.json | 38 ++++++------ .../AV320250308t200738_wltest_isofit.json | 40 ++++++------- ...50308t200738_wltest_isofit_swir_shift.json | 40 ++++++------- ...0308t200738_wltest_isofit_swir_spline.json | 42 +++++++------- dev_scripts/test_6S.py | 2 +- dev_scripts/test_modtran.py | 2 +- dev_scripts/test_sRTMnet.py | 2 +- docs/notebooks/apply_oe.ipynb | 58 +------------------ 23 files changed, 234 insertions(+), 328 deletions(-) diff --git a/20151026_SantaMonica/templates/run/prm20151026t173213_D8W_6s.json b/20151026_SantaMonica/templates/run/prm20151026t173213_D8W_6s.json index 5fc9ebf..005266e 100644 --- a/20151026_SantaMonica/templates/run/prm20151026t173213_D8W_6s.json +++ b/20151026_SantaMonica/templates/run/prm20151026t173213_D8W_6s.json @@ -52,24 +52,22 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", - "earth_sun_distance_file": "{data}/earth_sun_distance.txt", - "engine_base_dir": "{sixs}", - "engine_name": "6s", - "solzen": 55.21, - "solaz": 141.70, - "elev": 0.0, - "alt": 20.0, - "viewaz": 202.89063, - "viewzen": 1.08, - "month": 10, - "day": 26, - "sim_path": "{examples}/20151026_SantaMonica/lut/", - "lut_path": "{examples}/20151026_SantaMonica/lut/lut.nc", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", + "earth_sun_distance_file": "{data}/earth_sun_distance.txt", + "engine_base_dir": "{sixs}", + "engine_name": "6s", + "solzen": 55.21, + "solaz": 141.70, + "elev": 0.0, + "alt": 20.0, + "viewaz": 202.89063, + "viewzen": 1.08, + "month": 10, + "day": 26, + "sim_path": "{examples}/20151026_SantaMonica/lut/", + "lut_path": "{examples}/20151026_SantaMonica/lut/lut.nc", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20151026_SantaMonica/templates/run/prm20151026t173213_D8p5W_6s.json b/20151026_SantaMonica/templates/run/prm20151026t173213_D8p5W_6s.json index a1318d6..ae7bddc 100644 --- a/20151026_SantaMonica/templates/run/prm20151026t173213_D8p5W_6s.json +++ b/20151026_SantaMonica/templates/run/prm20151026t173213_D8p5W_6s.json @@ -53,24 +53,22 @@ "H2OSTR": [1.4, 3.56], "AOT550": [0.7003, 0.9001] }, - "radiative_transfer_engines": { - "vswir": { - "engine_name": "6s", - "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", - "earth_sun_distance_file": "{data}/earth_sun_distance.txt", - "engine_base_dir": "{sixs}", - "solzen": 55.21, - "solaz": 141.70, - "elev": 0.0, - "alt": 20.0, - "viewaz": 202.89063, - "viewzen": 1.08, - "month": 10, - "day": 26, - "sim_path": "{examples}/20151026_SantaMonica/lut/", - "lut_path": "{examples}/20151026_SantaMonica/lut/lut.nc", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "engine_name": "6s", + "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", + "earth_sun_distance_file": "{data}/earth_sun_distance.txt", + "engine_base_dir": "{sixs}", + "solzen": 55.21, + "solaz": 141.70, + "elev": 0.0, + "alt": 20.0, + "viewaz": 202.89063, + "viewzen": 1.08, + "month": 10, + "day": 26, + "sim_path": "{examples}/20151026_SantaMonica/lut/", + "lut_path": "{examples}/20151026_SantaMonica/lut/lut.nc", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20151026_SantaMonica/templates/run/prm20151026t173213_D9W_6s.json b/20151026_SantaMonica/templates/run/prm20151026t173213_D9W_6s.json index 9d6dd5c..687a3ea 100644 --- a/20151026_SantaMonica/templates/run/prm20151026t173213_D9W_6s.json +++ b/20151026_SantaMonica/templates/run/prm20151026t173213_D9W_6s.json @@ -53,24 +53,22 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", - "earth_sun_distance_file": "{data}/earth_sun_distance.txt", - "engine_base_dir": "{sixs}", - "engine_name": "6s", - "solzen": 55.21, - "solaz": 141.70, - "elev": 0.0, - "alt": 20.0, - "viewaz": 202.89063, - "viewzen": 1.08, - "month": 10, - "day": 26, - "sim_path": "{examples}/20151026_SantaMonica/lut/", - "lut_path": "{examples}/20151026_SantaMonica/lut/lut.nc", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", + "earth_sun_distance_file": "{data}/earth_sun_distance.txt", + "engine_base_dir": "{sixs}", + "engine_name": "6s", + "solzen": 55.21, + "solaz": 141.70, + "elev": 0.0, + "alt": 20.0, + "viewaz": 202.89063, + "viewzen": 1.08, + "month": 10, + "day": 26, + "sim_path": "{examples}/20151026_SantaMonica/lut/", + "lut_path": "{examples}/20151026_SantaMonica/lut/lut.nc", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20151026_SantaMonica/templates/run/prm20151026t173213_D9p5W_6s.json b/20151026_SantaMonica/templates/run/prm20151026t173213_D9p5W_6s.json index 71b5e07..ff8f6f6 100644 --- a/20151026_SantaMonica/templates/run/prm20151026t173213_D9p5W_6s.json +++ b/20151026_SantaMonica/templates/run/prm20151026t173213_D9p5W_6s.json @@ -53,24 +53,22 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", - "earth_sun_distance_file": "{data}/earth_sun_distance.txt", - "engine_base_dir": "{sixs}", - "engine_name": "6s", - "solzen": 55.21, - "solaz": 141.70, - "elev": 0.0, - "alt": 20.0, - "viewaz": 202.89063, - "viewzen": 1.08, - "month": 10, - "day": 26, - "sim_path": "{examples}/20151026_SantaMonica/lut/", - "lut_path": "{examples}/20151026_SantaMonica/lut/lut.nc", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", + "earth_sun_distance_file": "{data}/earth_sun_distance.txt", + "engine_base_dir": "{sixs}", + "engine_name": "6s", + "solzen": 55.21, + "solaz": 141.70, + "elev": 0.0, + "alt": 20.0, + "viewaz": 202.89063, + "viewzen": 1.08, + "month": 10, + "day": 26, + "sim_path": "{examples}/20151026_SantaMonica/lut/", + "lut_path": "{examples}/20151026_SantaMonica/lut/lut.nc", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20171108_Pasadena/templates/libradtran/and20171108t184227_beckmanlawn-libradtran.json b/20171108_Pasadena/templates/libradtran/and20171108t184227_beckmanlawn-libradtran.json index 02929a9..b1fbb8c 100644 --- a/20171108_Pasadena/templates/libradtran/and20171108t184227_beckmanlawn-libradtran.json +++ b/20171108_Pasadena/templates/libradtran/and20171108t184227_beckmanlawn-libradtran.json @@ -55,15 +55,13 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "engine_name": "LibRadTran", - "wavelength_range": [370, 2505], - "sim_path": "{examples}/20171108_Pasadena/lut/", - "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184227_libradtran.nc", - "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_libradtran.inp", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "engine_name": "LibRadTran", + "wavelength_range": [370, 2505], + "sim_path": "{examples}/20171108_Pasadena/lut/", + "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184227_libradtran.nc", + "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_libradtran.inp", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20171108_Pasadena/templates/modtran/ang20171108t173546_darklot.json b/20171108_Pasadena/templates/modtran/ang20171108t173546_darklot.json index b704fc2..cee460a 100644 --- a/20171108_Pasadena/templates/modtran/ang20171108t173546_darklot.json +++ b/20171108_Pasadena/templates/modtran/ang20171108t173546_darklot.json @@ -55,15 +55,13 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "engine_name": "modtran", - "wavelength_range":[370,2505], - "sim_path": "{examples}/20171108_Pasadena/lut/", - "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184829_post_v2p11_darklot.nc", - "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "engine_name": "modtran", + "wavelength_range":[370,2505], + "sim_path": "{examples}/20171108_Pasadena/lut/", + "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184829_post_v2p11_darklot.nc", + "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20171108_Pasadena/templates/modtran/ang20171108t173546_horse.json b/20171108_Pasadena/templates/modtran/ang20171108t173546_horse.json index b8a882d..c7f24ea 100644 --- a/20171108_Pasadena/templates/modtran/ang20171108t173546_horse.json +++ b/20171108_Pasadena/templates/modtran/ang20171108t173546_horse.json @@ -55,15 +55,13 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "engine_name": "modtran", - "wavelength_range":[370,2505], - "sim_path": "{examples}/20171108_Pasadena/lut/", - "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184829_post_v2p11_horse.nc", - "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "engine_name": "modtran", + "wavelength_range":[370,2505], + "sim_path": "{examples}/20171108_Pasadena/lut/", + "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184829_post_v2p11_horse.nc", + "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20171108_Pasadena/templates/modtran/ang20171108t184227_astrogreen.json b/20171108_Pasadena/templates/modtran/ang20171108t184227_astrogreen.json index d1deb86..d9e98cd 100644 --- a/20171108_Pasadena/templates/modtran/ang20171108t184227_astrogreen.json +++ b/20171108_Pasadena/templates/modtran/ang20171108t184227_astrogreen.json @@ -55,15 +55,13 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "engine_name": "modtran", - "wavelength_range":[370,2505], - "sim_path": "{examples}/20171108_Pasadena/lut/", - "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184227_post_v2p11_AstroGreenBaseball.nc", - "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "engine_name": "modtran", + "wavelength_range":[370,2505], + "sim_path": "{examples}/20171108_Pasadena/lut/", + "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184227_post_v2p11_AstroGreenBaseball.nc", + "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20171108_Pasadena/templates/modtran/ang20171108t184227_astrored.json b/20171108_Pasadena/templates/modtran/ang20171108t184227_astrored.json index 819a8c1..7e63227 100644 --- a/20171108_Pasadena/templates/modtran/ang20171108t184227_astrored.json +++ b/20171108_Pasadena/templates/modtran/ang20171108t184227_astrored.json @@ -55,15 +55,13 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "engine_name": "modtran", - "wavelength_range":[370,2505], - "sim_path": "{examples}/20171108_Pasadena/lut/", - "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184227_post_v2p11_AstroRedBaseball.nc", - "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "engine_name": "modtran", + "wavelength_range":[370,2505], + "sim_path": "{examples}/20171108_Pasadena/lut/", + "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184227_post_v2p11_AstroRedBaseball.nc", + "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn-multimodtran.json b/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn-multimodtran.json index 3088af8..23b882d 100644 --- a/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn-multimodtran.json +++ b/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn-multimodtran.json @@ -55,16 +55,14 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "engine_name": "modtran", - "multipart_transmittance": true, - "wavelength_range":[370,2505], - "sim_path": "{examples}/20171108_Pasadena/lut_multi/", - "lut_path": "{examples}/20171108_Pasadena/lut_multi/ang20171108t184227_uncert_v2p11_BeckmanLawn.nc", - "template_file": "{examples}/20171108_Pasadena/ang20171108t184227_multimodtran.json", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "engine_name": "modtran", + "multipart_transmittance": true, + "wavelength_range":[370,2505], + "sim_path": "{examples}/20171108_Pasadena/lut_multi/", + "lut_path": "{examples}/20171108_Pasadena/lut_multi/ang20171108t184227_uncert_v2p11_BeckmanLawn.nc", + "template_file": "{examples}/20171108_Pasadena/ang20171108t184227_multimodtran.json", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn-oversmoothed.json b/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn-oversmoothed.json index 8dc39bf..1092ab0 100644 --- a/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn-oversmoothed.json +++ b/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn-oversmoothed.json @@ -56,15 +56,13 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "engine_name": "modtran", - "wavelength_range":[370,2505], - "sim_path": "{examples}/20171108_Pasadena/lut/", - "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184227_post_v2p11_BeckmanLawn-oversmoothed.nc", - "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "engine_name": "modtran", + "wavelength_range":[370,2505], + "sim_path": "{examples}/20171108_Pasadena/lut/", + "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184227_post_v2p11_BeckmanLawn-oversmoothed.nc", + "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn-undersmoothed.json b/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn-undersmoothed.json index 0ab6a88..b715ee8 100644 --- a/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn-undersmoothed.json +++ b/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn-undersmoothed.json @@ -55,15 +55,13 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "engine_name": "modtran", - "wavelength_range":[370,2505], - "sim_path": "{examples}/20171108_Pasadena/lut/", - "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184227_post_v2p11_BeckmanLawn-undersmoothed.nc", - "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "engine_name": "modtran", + "wavelength_range":[370,2505], + "sim_path": "{examples}/20171108_Pasadena/lut/", + "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184227_post_v2p11_BeckmanLawn-undersmoothed.nc", + "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn.json b/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn.json index 622852d..8adc906 100644 --- a/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn.json +++ b/20171108_Pasadena/templates/modtran/ang20171108t184227_beckmanlawn.json @@ -55,15 +55,13 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "engine_name": "modtran", - "wavelength_range":[370,2505], - "sim_path": "{examples}/20171108_Pasadena/lut/", - "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184227_uncert_v2p11_BeckmanLawn.nc", - "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "engine_name": "modtran", + "wavelength_range":[370,2505], + "sim_path": "{examples}/20171108_Pasadena/lut/", + "lut_path": "{examples}/20171108_Pasadena/lut/ang20171108t184227_uncert_v2p11_BeckmanLawn.nc", + "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_modtran.json", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20171108_Pasadena/templates/topoflux/ang20171108t184227_beckmanlawn-multimodtran-topoflux.json b/20171108_Pasadena/templates/topoflux/ang20171108t184227_beckmanlawn-multimodtran-topoflux.json index 8a73080..737b7b0 100644 --- a/20171108_Pasadena/templates/topoflux/ang20171108t184227_beckmanlawn-multimodtran-topoflux.json +++ b/20171108_Pasadena/templates/topoflux/ang20171108t184227_beckmanlawn-multimodtran-topoflux.json @@ -56,16 +56,14 @@ "unknowns": { "H2O_ABSCO": 0.01 }, - "radiative_transfer_engines": { - "vswir": { - "engine_name": "modtran", - "multipart_transmittance": true, - "wavelength_range":[370,2505], - "sim_path": "{examples}/20171108_Pasadena/lut_multi/", - "lut_path": "{examples}/20171108_Pasadena/ang20171108t184227_uncert_v2p11_BeckmanLawn-multimodtran-topoflux.nc", - "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_multimodtran.json", - "lut_names": {"H2OSTR": null, "AOT550": null} - } + "engine": { + "engine_name": "modtran", + "multipart_transmittance": true, + "wavelength_range":[370,2505], + "sim_path": "{examples}/20171108_Pasadena/lut_multi/", + "lut_path": "{examples}/20171108_Pasadena/ang20171108t184227_uncert_v2p11_BeckmanLawn-multimodtran-topoflux.nc", + "template_file": "{examples}/20171108_Pasadena/configs/ang20171108t184227_multimodtran.json", + "lut_names": {"H2OSTR": null, "AOT550": null} } } }, diff --git a/20231110_Prism_Multisurface/templates/prm20231110t071521_multi_surface_isofit.json b/20231110_Prism_Multisurface/templates/prm20231110t071521_multi_surface_isofit.json index eecbaa0..ff0f995 100644 --- a/20231110_Prism_Multisurface/templates/prm20231110t071521_multi_surface_isofit.json +++ b/20231110_Prism_Multisurface/templates/prm20231110t071521_multi_surface_isofit.json @@ -29,26 +29,24 @@ 15.77750015258789 ] }, - "radiative_transfer_engines": { - "vswir": { - "aerosol_model_file": "{data}/aerosol_model.txt", - "aerosol_template_file": "{data}/aerosol_template.json", - "earth_sun_distance_file": "{data}/earth_sun_distance.txt", - "engine_name": "sRTMnet", - "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", - "lut_names": { - "AOT550": null, - "H2OSTR": null, - "observer_zenith": null - }, - "lut_path": "{examples}/20231110_Prism_Multisurface/lut/lut.nc", - "multipart_transmittance": true, - "statevector_names": [ - "H2OSTR", - "AOT550" - ], - "template_file": "{examples}/20231110_Prism_Multisurface/configs/prm20231110t071521_modtran_tpl.json" - } + "engine": { + "aerosol_model_file": "{data}/aerosol_model.txt", + "aerosol_template_file": "{data}/aerosol_template.json", + "earth_sun_distance_file": "{data}/earth_sun_distance.txt", + "engine_name": "sRTMnet", + "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", + "lut_names": { + "AOT550": null, + "H2OSTR": null, + "observer_zenith": null + }, + "lut_path": "{examples}/20231110_Prism_Multisurface/lut/lut.nc", + "multipart_transmittance": true, + "statevector_names": [ + "H2OSTR", + "AOT550" + ], + "template_file": "{examples}/20231110_Prism_Multisurface/configs/prm20231110t071521_modtran_tpl.json" }, "statevector": { "AOT550": { diff --git a/20231110_Prism_Multisurface/templates/prm20231110t071521_single_surface_isofit.json b/20231110_Prism_Multisurface/templates/prm20231110t071521_single_surface_isofit.json index 85e3e14..f31661b 100644 --- a/20231110_Prism_Multisurface/templates/prm20231110t071521_single_surface_isofit.json +++ b/20231110_Prism_Multisurface/templates/prm20231110t071521_single_surface_isofit.json @@ -29,26 +29,24 @@ 15.77750015258789 ] }, - "radiative_transfer_engines": { - "vswir": { - "aerosol_model_file": "{data}/aerosol_model.txt", - "aerosol_template_file": "{data}/aerosol_template.json", - "earth_sun_distance_file": "{data}/earth_sun_distance.txt", - "engine_name": "sRTMnet", - "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", - "lut_names": { - "AOT550": null, - "H2OSTR": null, - "observer_zenith": null - }, - "lut_path": "{examples}/20231110_Prism_Multisurface/lut/lut.nc", - "multipart_transmittance": true, - "statevector_names": [ - "H2OSTR", - "AOT550" - ], - "template_file": "{examples}/20231110_Prism_Multisurface/configs/prm20231110t071521_modtran_tpl.json" - } + "engine": { + "aerosol_model_file": "{data}/aerosol_model.txt", + "aerosol_template_file": "{data}/aerosol_template.json", + "earth_sun_distance_file": "{data}/earth_sun_distance.txt", + "engine_name": "sRTMnet", + "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", + "lut_names": { + "AOT550": null, + "H2OSTR": null, + "observer_zenith": null + }, + "lut_path": "{examples}/20231110_Prism_Multisurface/lut/lut.nc", + "multipart_transmittance": true, + "statevector_names": [ + "H2OSTR", + "AOT550" + ], + "template_file": "{examples}/20231110_Prism_Multisurface/configs/prm20231110t071521_modtran_tpl.json" }, "statevector": { "AOT550": { diff --git a/20250308_AV3Cal_wltest/templates/AV320250308t200738_wltest_isofit.json b/20250308_AV3Cal_wltest/templates/AV320250308t200738_wltest_isofit.json index 066fa82..f66667a 100644 --- a/20250308_AV3Cal_wltest/templates/AV320250308t200738_wltest_isofit.json +++ b/20250308_AV3Cal_wltest/templates/AV320250308t200738_wltest_isofit.json @@ -19,27 +19,25 @@ 2.2775 ] }, - "radiative_transfer_engines": { - "vswir": { - "aerosol_model_file": "{data}/aerosol_model.txt", - "aerosol_template_file": "{data}/aerosol_template.json", - "earth_sun_distance_file": "{data}/earth_sun_distance.txt", - "wavelength_file": "{examples}/20250308_AV3Cal_wltest/remote/wavelengths_highres.txt", - "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", - "engine_name": "sRTMnet", - "lut_names": { - "AOT550": null, - "H2OSTR": null - }, - "lut_path": "{examples}/20250308_AV3Cal_wltest/lut_full/test_lut.nc", - "multipart_transmittance": false, - "sim_path": "{examples}/20250308_AV3Cal_wltest/lut_full", - "statevector_names": [ - "AOT550", - "H2OSTR" - ], - "template_file": "{examples}/20250308_AV3Cal_wltest/configs/AV320250308t200738_modtran_tpl.json" - } + "engine": { + "aerosol_model_file": "{data}/aerosol_model.txt", + "aerosol_template_file": "{data}/aerosol_template.json", + "earth_sun_distance_file": "{data}/earth_sun_distance.txt", + "wavelength_file": "{examples}/20250308_AV3Cal_wltest/remote/wavelengths_highres.txt", + "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", + "engine_name": "sRTMnet", + "lut_names": { + "AOT550": null, + "H2OSTR": null + }, + "lut_path": "{examples}/20250308_AV3Cal_wltest/lut_full/test_lut.nc", + "multipart_transmittance": false, + "sim_path": "{examples}/20250308_AV3Cal_wltest/lut_full", + "statevector_names": [ + "AOT550", + "H2OSTR" + ], + "template_file": "{examples}/20250308_AV3Cal_wltest/configs/AV320250308t200738_modtran_tpl.json" }, "statevector": { "AOT550": { diff --git a/20250308_AV3Cal_wltest/templates/AV320250308t200738_wltest_isofit_swir_shift.json b/20250308_AV3Cal_wltest/templates/AV320250308t200738_wltest_isofit_swir_shift.json index 54f4a9c..f22e5a3 100644 --- a/20250308_AV3Cal_wltest/templates/AV320250308t200738_wltest_isofit_swir_shift.json +++ b/20250308_AV3Cal_wltest/templates/AV320250308t200738_wltest_isofit_swir_shift.json @@ -42,27 +42,25 @@ 2.2775 ] }, - "radiative_transfer_engines": { - "vswir": { - "aerosol_model_file": "{data}/aerosol_model.txt", - "aerosol_template_file": "{data}/aerosol_template.json", - "earth_sun_distance_file": "{data}/earth_sun_distance.txt", - "wavelength_file": "{examples}/20250308_AV3Cal_wltest/remote/wavelengths_highres.txt", - "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", - "engine_name": "sRTMnet", - "lut_names": { - "AOT550": null, - "H2OSTR": null - }, - "lut_path": "{examples}/20250308_AV3Cal_wltest/lut_full/test_lut.nc", - "multipart_transmittance": false, - "sim_path": "{examples}/20250308_AV3Cal_wltest/lut_full", - "statevector_names": [ - "AOT550", - "H2OSTR" - ], - "template_file": "{examples}/20250308_AV3Cal_wltest/configs/AV320250308t200738_modtran_tpl.json" - } + "engine": { + "aerosol_model_file": "{data}/aerosol_model.txt", + "aerosol_template_file": "{data}/aerosol_template.json", + "earth_sun_distance_file": "{data}/earth_sun_distance.txt", + "wavelength_file": "{examples}/20250308_AV3Cal_wltest/remote/wavelengths_highres.txt", + "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", + "engine_name": "sRTMnet", + "lut_names": { + "AOT550": null, + "H2OSTR": null + }, + "lut_path": "{examples}/20250308_AV3Cal_wltest/lut_full/test_lut.nc", + "multipart_transmittance": false, + "sim_path": "{examples}/20250308_AV3Cal_wltest/lut_full", + "statevector_names": [ + "AOT550", + "H2OSTR" + ], + "template_file": "{examples}/20250308_AV3Cal_wltest/configs/AV320250308t200738_modtran_tpl.json" }, "statevector": { "AOT550": { diff --git a/20250308_AV3Cal_wltest/templates/AV320250308t200738_wltest_isofit_swir_spline.json b/20250308_AV3Cal_wltest/templates/AV320250308t200738_wltest_isofit_swir_spline.json index 11c88d1..f118fa6 100644 --- a/20250308_AV3Cal_wltest/templates/AV320250308t200738_wltest_isofit_swir_spline.json +++ b/20250308_AV3Cal_wltest/templates/AV320250308t200738_wltest_isofit_swir_spline.json @@ -72,28 +72,26 @@ 2.2775 ] }, - "radiative_transfer_engines": { - "vswir": { - "aerosol_model_file": "{data}/aerosol_model.txt", - "aerosol_template_file": "{data}/aerosol_template.json", - "earth_sun_distance_file": "{data}/earth_sun_distance.txt", - "wavelength_file": "{examples}/20250308_AV3Cal_wltest/remote/wavelengths_highres.txt", - "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", - "engine_name": "sRTMnet", - "glint_model": false, - "lut_names": { - "AOT550": null, - "H2OSTR": null - }, - "lut_path": "{examples}/20250308_AV3Cal_wltest/lut_full/test_lut.nc", - "multipart_transmittance": false, - "sim_path": "{examples}/20250308_AV3Cal_wltest/lut_full", - "statevector_names": [ - "AOT550", - "H2OSTR" - ], - "template_file": "{examples}/20250308_AV3Cal_wltest/configs/AV320250308t200738_modtran_tpl.json" - } + "engine": { + "aerosol_model_file": "{data}/aerosol_model.txt", + "aerosol_template_file": "{data}/aerosol_template.json", + "earth_sun_distance_file": "{data}/earth_sun_distance.txt", + "wavelength_file": "{examples}/20250308_AV3Cal_wltest/remote/wavelengths_highres.txt", + "irradiance_file": "{examples}/20151026_SantaMonica/data/prism_optimized_irr.dat", + "engine_name": "sRTMnet", + "glint_model": false, + "lut_names": { + "AOT550": null, + "H2OSTR": null + }, + "lut_path": "{examples}/20250308_AV3Cal_wltest/lut_full/test_lut.nc", + "multipart_transmittance": false, + "sim_path": "{examples}/20250308_AV3Cal_wltest/lut_full", + "statevector_names": [ + "AOT550", + "H2OSTR" + ], + "template_file": "{examples}/20250308_AV3Cal_wltest/configs/AV320250308t200738_modtran_tpl.json" }, "statevector": { "AOT550": { diff --git a/dev_scripts/test_6S.py b/dev_scripts/test_6S.py index 76f50c3..5d27dcd 100644 --- a/dev_scripts/test_6S.py +++ b/dev_scripts/test_6S.py @@ -20,7 +20,7 @@ # Initialize the config cf = env.path('examples', '20151026_SantaMonica', 'configs', 'run', 'prm20151026t173213_D9W_6s.json') fc = full_config = configs.create_new_config(cf) -ec = engine_config = fc.forward_model.radiative_transfer.radiative_transfer_engines[0] +ec = engine_config = fc.forward_model.radiative_transfer.engine lg = lut_grid = fc.forward_model.radiative_transfer.lut_grid # Update config for this test diff --git a/dev_scripts/test_modtran.py b/dev_scripts/test_modtran.py index 859f9b7..5218082 100644 --- a/dev_scripts/test_modtran.py +++ b/dev_scripts/test_modtran.py @@ -18,7 +18,7 @@ cf = env.path('examples', '20171108_Pasadena', 'configs', 'modtran', 'ang20171108t184227_beckmanlawn.json') fc = full_config = configs.create_new_config(cf) -ec = engine_config = fc.forward_model.radiative_transfer.radiative_transfer_engines[0] +ec = engine_config = fc.forward_model.radiative_transfer.engine lg = lut_grid = fc.forward_model.radiative_transfer.lut_grid # Update config for this test diff --git a/dev_scripts/test_sRTMnet.py b/dev_scripts/test_sRTMnet.py index a972002..82d41de 100644 --- a/dev_scripts/test_sRTMnet.py +++ b/dev_scripts/test_sRTMnet.py @@ -18,7 +18,7 @@ cf = env.path('examples', '20171108_Pasadena', 'configs', 'modtran', 'ang20171108t184227_beckmanlawn.json') fc = full_config = configs.create_new_config(cf) -ec = engine_config = fc.forward_model.radiative_transfer.radiative_transfer_engines[0] +ec = engine_config = fc.forward_model.radiative_transfer.engine lg = lut_grid = fc.forward_model.radiative_transfer.lut_grid #% Update config params for this test diff --git a/docs/notebooks/apply_oe.ipynb b/docs/notebooks/apply_oe.ipynb index 95628db..1b92228 100644 --- a/docs/notebooks/apply_oe.ipynb +++ b/docs/notebooks/apply_oe.ipynb @@ -39,63 +39,7 @@ "\n", "`INPUT_RADIANCE` `INPUT_LOC` `INPUT_OBS` `WORKING_DIRECTORY` `SENSOR` and `--surface_path`.\n", "\n", - "which must be entered in the specified order (except `--surface_path` which can be added at any point but still required). Descriptions of each are found in the docstring printed above. It is important to note that the `INPUT_RADIANCE`, `INPUT_LOC`, and `INPUT_OBS` are ENVI raster data formats that must be at the same row-column dimensions. The `--surface_path` points Isofit towards the constructed prior distribution file for surface reflectance. Optional arguments are denoted by the '--' in their name, e.g. `--modtran_path`, `--pressure_elevation`. It is important to note that the default radiative transfer engine (RTE) is currently set to sRTMnet, set via `--emulator_path`.\n", - "\n", - "\n", - "#### `INPUT_RADIANCE`\n", - "The data is at-sensor radiance in units of $\\mu W \\, cm^{-2} \\, nm^{-1} \\, sr^{-1} $. You may leverage **[isofit.core.units](https://isofit.github.io/isofit/latest/api/isofit/core/units/#isofit.core.units)** module which offers many common conversions. The .hdr file should be used to store the wavelength and fwhm. \n", - "\n", - "\n", - "#### `INPUT_LOC`\n", - "\n", - "1. **Longitude [degrees]**\n", - " - Range is -180 to 180\n", - "\n", - "2. **Latitude [degrees]**\n", - " - Range is -90 to 90\n", - "\n", - "3. **Elevation [meters]**\n", - " - Above mean sea level \n", - "\n", - "\n", - "\n", - "#### `INPUT_OBS`\n", - "\n", - "Note: the names of the keys do not need to match exactly, only the order matters.\n", - "\n", - "1. **Path length [meters]**\n", - " - Defined as the slant path from the sensor to the surface\n", - "\n", - "2. **To-sensor azimuth, $\\phi_v$ [degrees]**\n", - " - Ranges from 0-360, measured clockwise from north\n", - "\n", - "3. **To-sensor zenith, $\\theta_v$ [degrees]**\n", - " - Ranges from 0-90, measured from zenith\n", - "\n", - "4. **To-sun azimuth, $\\phi_s$ [degrees]**\n", - " - Ranges from 0-360, measured clockwise from north\n", - "\n", - "5. **To-sun zenith, $\\theta_s$ [degrees]**\n", - " - Ranges from 0-90, measured from zenith\n", - "\n", - "6. **Phase angle, $\\xi$ [degrees]**\n", - " - $cos(\\xi) = cos(\\theta_s) \\, cos(\\theta_v) \\, + \\, sin(\\theta_s) \\, sin(\\theta_v) \\, cos(\\phi_s - \\phi_v)$\n", - " - $\\xi = arccos(cos(\\xi))$\n", - "\n", - "7. **Slope, $S$ [degrees]**\n", - " - Ranges from 0-90\n", - "\n", - "8. **Aspect, $A$ [degrees]**\n", - " - Ranges from 0-360, measured clockwise from north\n", - "\n", - "9. **Cosine of the local solar illumination angle, $cos(i)$ [unitless]**\n", - " - $cos(i) = cos(\\theta_s) \\, cos(S) \\, + \\, sin(\\theta_s) \\, sin(S) \\, cos(\\phi_s - A) $\n", - "\n", - "10. **UTC time [decimal]**\n", - " - Ranges from 0 - 24\n", - "\n", - "11. **Earth-sun distance [AU]**\n", - " - Astronomical Unit as a function of day of year" + "which must be entered in the specified order (except `--surface_path` which can be added at any point but still required). Descriptions of each are found in the docstring printed above. It is important to note that the `INPUT_RADIANCE`, `INPUT_LOC`, and `INPUT_OBS` are ENVI raster data formats that must be at the same row-column dimensions. The `--surface_path` points Isofit torwards the constructed prior distribution file for surface reflectance. Optional arguments are denoted by the '--' in their name, e.g. `--modtran_path`, `--pressure_elevation`. It is important to note that the default radiative transfer engine (RTE) is currently set to Modtran. You must specify an `--emulator_path` without a Modtran installation." ] }, {