6. Accessing and Visualizing HyTES data#

6.1. BioSCape Data Skills Workshop: From the Field to the Image#

Bioscape

BioSCape, the Biodiversity Survey of the Cape, is NASA’s first biodiversity-focused airborne and field campaign that was conducted in South Africa in 2023. BioSCape’s primary objective is to study the structure, function, and composition of the region’s ecosystems, and how and why they are changing.

BioSCape’s airborne dataset is unprecedented, with AVIRIS-NG, PRISM, and HyTES imaging spectrometers capturing spectral data across the UV, visible and infrared at high resolution and LVIS acquiring coincident full-waveform lidar. BioSCape’s field dataset is equally impressive, with 18 PI-led projects collecting data ranging from the diversity and phylogeny of plants, kelp and phytoplankton, eDNA, landscape acoustics, plant traits, blue carbon accounting, and more

This workshop will equip participants with the skills to find, subset, and visualize the various BioSCape field and airborne (imaging spectroscopy and full-waveform lidar) data sets. Participants will learn data skills through worked examples in terrestrial and aquatic ecosystems, including: wrangling lidar data, performing band math calculations, calculating spectral diversity metrics, machine learning and image classification, and mapping functional traits using partial least squares regression. The workshop format is a mix of expert talks and interactive coding notebooks and will be run through the BioSCape Cloud computing environment.

Date: October 9 - 11, 2024 Cape Town, South Africa

Host: NASA’s Oak Ridge National Laboratory Distributed Active Archive Center (ORNL DAAC), in close collaboration with BioSCape, the South African Environmental Observation Network (SAEON), the University of Wisconsin Madison (Phil Townsend), The Nature Conservancy (Glenn Moncrieff), the University of California Merced (Erin Hestir), the University of Cape Town (Jasper Slingsby), Jet Propulsion Laboratory (Kerry Cawse-Nicholson), and UNESCO.

Instructors:

  • In-person contributors: Anabelle Cardoso, Erin Hestir, Phil Townsend, Henry Frye, Glenn Moncrieff, Jasper Slingsby, Michele Thornton, Rupesh Shrestha

  • Virtual contributors: Kerry Cawse-Nicholson, Nico Stork, Kyle Kovach

Audience: This training is primarily intended for government natural resource management agency representatives and field technicians in South Africa, as well as local academics and students, especially those connected to the BioSCape Team.

6.2. Overview#

In this tutorial, we will access and visualize the airborne Hyperspectral Thermal Emission Spectrometer (HyTES) data for a flight line

The Hyperspectral Thermal Emission Spectrometer (HyTES) is an airborne imaging spectrometer with 256 spectral channels between 7.5 and 12 micrometers in the thermal infrared (TIR) part of the electromagnetic spectrum and 512 pixels cross-track.

  • HyTES provides high spatial and high spectral resolution data on surface temperature and emissivity

  • HyTES acquires data in the thermal infrared (TIR)

    • TIR data are used to measure land surface temperature (LST), which informs models of water flux from land surface through processes such as evapotranspiration

6.2.1. Load Python Modules#

import xarray as xr
import hvplot.xarray
from os import path
import geopandas as gpd
from glob import glob

6.2.2. HyTES Flights#

A GeoJSON of the HyTES flight lines for the BioSCape project is available at the shared directory. Let’s plot the Hytes dataset here.

hytes_dir = "/shared/users/bioscape_ZA24workshop_data/RS_data/HyTES/"
hytes_flight = "HyTES.json"
hytes_gdf = gpd.read_file(path.join(hytes_dir, hytes_flight))
hytes_gdf.explore()
Make this Notebook Trusted to load map: File -> Trust Notebook

6.2.3. HyTES Download#

At the time of the workshop, selected HyTES flights are available for download from the JPL HyTES Website.

We placed an order and downloaded the HyTES data for a flight line at Table Mountain Box1ZA for 2023-11-13. They are at the shared folder as shown below:

hytes_orderid = "20231113t102619_TableMountainBox1ZA"
hytes_dir = path.join(hytes_dir, hytes_orderid)
hytes_dir
'/shared/users/bioscape_ZA24workshop_data/RS_data/HyTES/20231113t102619_TableMountainBox1ZA'
# find all hytes L1/L2 files
hytes_f = sorted(glob(path.join(hytes_dir, "*.hdf5")))
# print
for f in hytes_f:
    print(path.basename(f))
20231113t102619_TableMountainBox1ZA_L1_B110_V03.hdf5
20231113t102619_TableMountainBox1ZA_L2_B200_V04.hdf5

As we see above, there are two levels of HyTES products currently available for download.

  • Level 1 (L1) product provides calibrated HyTES data in radiance units of W/m^2/µm/sr. The product also contain locational metadata from the instruments NGDCS, and per-pixel geolocation information, namely latitude, longitude, height, and number of steps taken during ray-casting

  • Level 2 (L2) product contains following data:

    • Emissivity (L2_Emissivity: HyTES emissivity spectral data from 8-11.5 µm

    • PC Regression Emissivity (L2_Emissivity_PC): HyTES emissivity data from 7.4-12 µm. L2_Emissivity_PC uses a Principal Component (PC) eigenvector regression approach to produce emissivity for all HyTES channels.

    • Land Surface Temperature (L2_LST): HyTES Land Surface Temperature (LST) data in units of Kelvin. Derived from atmospherically corrected level-1 radiance data using the TES algorithm.

6.2.4. HyTES L1 product#

Let’s open the Level 1 file and plot the radiance band.

hytes_l1 = [f for f in hytes_f if "_L1" in f][0]
# open dataset
ds_l1 = xr.open_dataset(path.join(hytes_dir, hytes_l1), engine="h5netcdf", phony_dims='access')
# renaming dimensions to sensible names
ds_l1 = ds_l1.rename({'phony_dim_0': 'y','phony_dim_1': 'x', 'phony_dim_2': 'bands'})
ds_l1
<xarray.Dataset> Size: 5GB
Dimensions:               (y: 4226, x: 512, bands: 256)
Dimensions without coordinates: y, x, bands
Data variables: (12/14)
    altitude              (y, x) float32 9MB ...
    latitude              (y, x) float32 9MB ...
    longitude             (y, x) float32 9MB ...
    max_geolocation_line  int32 4B ...
    min_geolocation_line  int32 4B ...
    radiance_data         (y, x, bands) float32 2GB ...
    ...                    ...
    sun_azimuth           (y, x) float32 9MB ...
    sun_distance          (y, x) float32 9MB ...
    sun_zenith            (y, x) float32 9MB ...
    view_azimuth          (y, x) float32 9MB ...
    view_zenith           (y, x) float32 9MB ...
    wave_matrix           (x, bands) float32 524kB ...
Attributes:
    HDF5_Version:       1.10.6
    acquisition_time:   2023-11-13 10:20:01
    description:        HyTES Level 1 Data: radiance and locational informati...
    file_name:          NGDCS20231113t102001_raw
    h5py_version:       3.7.0
    modification_time:  2024-08-10 05:44:26
    product_version:    1.0
    wave_matrix_path:   /home/hytes/gerardo/New_HyTES_code_29Mar2024/wavematr...

6.2.5. Plotting L1 Radiance#

Let’s plot one of the radiance bands.

ds_l1.sel(bands=60).radiance_data.hvplot.image(width=300, height=600, cmap='viridis',
                                              clim = (5, 18)).opts(invert_yaxis=True)

6.2.6. HyTES L2 product#

Let’s open the L2 file.

hytes_l2 = [f for f in hytes_f if "_L2" in f][0]
# open dataset
ds_l2 = xr.open_dataset(path.join(hytes_dir, hytes_l2), engine="h5netcdf", phony_dims='access')
# renaming dimensions to sensible names
ds_l2 = ds_l2.rename({'phony_dim_0': 'bands','phony_dim_1': 'y', 
                      'phony_dim_2': 'x', 'phony_dim_3': 'bands_emis'})
ds_l2
<xarray.Dataset> Size: 4GB
Dimensions:                       (bands: 256, y: 4226, x: 512, bands_emis: 164)
Dimensions without coordinates: bands, y, x, bands_emis
Data variables:
    ISAC_Path_Rad                 (bands) float32 1kB ...
    ISAC_Skydown_Rad              (bands) float32 1kB ...
    L2_Emissivity                 (y, x, bands_emis) float32 1GB ...
    L2_Emissivity_PC              (y, x, bands) float32 2GB ...
    L2_Emissivity_PC_Wavelengths  (bands) float32 1kB ...
    L2_Emissivity_Wavelengths     (bands_emis) float32 656B ...
    L2_LST                        (y, x) float32 9MB ...
    Transmission                  (bands) float32 1kB ...
Attributes: (12/21)
    HDF5_Version:             1.8.17
    ISAC_type:                ASTER
    L1_build_version:         B110_V03
    L2_build_version:         B200_V04
    acquisition_time:         2023-11-13T10:26:19.0z
    atmos_type:               ISAC
    ...                       ...
    modification_time:        2024-09-19 00:57:09
    product_version:          1.1
    sample_clip:              50:450
    software_version:         2.1.16
    software_version_date:    2024-07-29
    water_emis_optimization:  on

6.2.7. Plotting L2 Land Surface Temperature#

Plot the variables Land Surface Temperature (LST).

ds_l2.L2_LST.hvplot.image(width=300, height=600,cmap='seismic',
             clim = (250, 350)).opts(invert_yaxis=True)