Source code for the Hyperspectral Image Transects during Transient Events in Rivers (HITTER) framework developed to support a tracer experiment on the Missouri River near Lexington, MO, on May 11, 2024

This data release includes MATLAB source code associated with a manuscript titled "Hyperspectral Image Transects during Transient Events in Rivers (HITTER): Framework development and application to a tracer experiment on the Missouri River, USA" that was developed to support a tracer experiment performed on the Missouri River near Lexington, Missouri, on May 11, 2024. One of the primary goals of this study was to assess the feasibility of inferring concentrations of a visible dye (Rhodamine WT) in a large, highly turbid natural river channel using data from a Uncrewed Aircraft Systems (UAS)-based hyperspectral imaging system. Previous research on remote sensing of tracer dye concentrations demonstrated the ability to obtain moderately precise concentration estimates from standard red-green-blue (RGB) video and orthophotos and this experiment allowed us to evaluate the hypothesis that more detailed spectral information could enable concentrations to be inferred with greater accuracy and precision. The broader objective motivating tracer studies along the Missouri River is to gain insight regarding the dispersion processes that influence the movement and survival of endangered sturgeon larvae.
A total of eight *.m files are provided below to illustrate how the HITTER approach is implemented within the context of this particular case study on the Missouri River, and seven of the *.m files are general functions that could be applied to other, similar data sets with appropriate modifications of input parameters and file paths. More specifically, the following *.m files are included:
1. ProcessingLogNanoDye.m: a script intended to be run in sequence, with the various sections of the script corresponding to different steps in the HITTER framework by calling the remaining functions in this list.
2. nanoTrajectory.m: import trajectory information recorded during a UAS flight along with the frame index used to link trajectories to specific scan lines from the hyperspectral imaging system; 
3. getHoverCubes.m: interactively select hyperspectral data cubes for further processing;
4. projectLine.m: project individual pixels along hyperspectral scan lines into real-world spatial coordinates based on the trajectory information;
5. linkLine2cube.m: link data cubes to projected scan line spatial coordinates and resample the hyperspectral data to a reduced set of output times;
6. sonde4nano.m: link hyperspectral image transects to field measurements of dye concentration;
7. genObraLin.m: perform Optimal Band Ratio Analysis (OBRA) to establish an empirical relationship between dye concentration and spectral reflectance, using source code originally developed for estimating water depth following the approach summarized by Legleiter and Harrison (2019) and included in the Optimal River Bathymetry Toolkit (Legleiter, 2020; Legleiter, 2021); and
8. cube2dyeMap.m: create a map of estimated dye concentrations from a processed hyperspectral data cube using an OBRA relationship derived using genObraLin.m, with a custom colormap from the crameri.m file that can be obtained via the link provided below. 
The *.m files are thoroughly documented, with numerous comments to facilitate understanding of the code, but the user will need to update input parameters and file paths before attempting to use this code to apply the HITTER framework to a different data set. The code was developed in MATLAB R2024a (Version 24.1) with the Image Processing and Mapping Toolboxes (https://www.mathworks.com/products/matlab.html). Please note that the code is made available without warranty or support, as described in the distribution liability section of the metadata associated with this data release.

Tags: concentration, dispersion, hyperspectral, lexington, missouri, missouri-river, pallid-sturgeon, remote-sensing, rhodamine-dye, river, tracer-study, uncrewed-aircraft-systems-uas, usgs-66c49055d34e03388288c662
Organization: Department of the Interior