Smile
- hyperquest.smile.smile_metric(path_to_data, rotate, mask_waterbodies=True)
This is an exact remake of the MATLAB method smileMetric(), https://www.mathworks.com/help/images/ref/smilemetric.html.
This is based from the work presented in Dadon et al. (2010),
Dadon, A., Ben-Dor, E., & Karnieli, A. (2010). Use of derivative calculations and minimum noise fraction transformfor detecting and correcting the spectral curvature effect (smile) in Hyperion images. IEEE Transactions on Geoscience and Remote Sensing, 48(6), 2603-2612.
- Parameters:
- Returns:
o2_mean, co2_mean, o2_std, co2_std
- Return type:
1d array of cross-track mean do2, mean dco2, std do2, std dco2
- hyperquest.smile.nodd_o2a(path_to_data, rotate, path_to_rtm_output_csv, ncpus=1, rho_s=0.15, mask_waterbodies=True)
Similar to method in Felde et al. (2003) to solve for nm shift at O2-A across-track. Requires radiative transfer model run.
NODD stands for Normalized Optical Depth Derivative, and was introduced in Felde et al. (2003). It is a method that is largely insensitive to surface reflectance and the molecular column density. The actual equations for NODD are present in nodd_sse_min() in the optimization file, and are copied here for reference.
# gradient of negative natural log (gets at transmittance) dtau_obs = np.gradient(-np.log(l), w_sensor) dtau_model = np.gradient(-np.log(l_toa_model), w_sensor)
# offset mean dtau_obs -= np.mean(dtau_obs) dtau_model -= np.mean(dtau_model)
# normalize by RMS nodd_obs = dtau_obs / np.sqrt(np.mean(dtau_obs**2)) nodd_model = dtau_model / np.sqrt(np.mean(dtau_model**2))
# compute residual and SSE residual = nodd_model - nodd_obs sse = np.sum(residual**2)
- Parameters:
path_to_data (str) – Path to the .hdr or .nc
rotate (int) – rotate counter clockwise, either 0, 90, 180, or 270.
path_to_rtm_output_csv (str) – Path to output from radiative transfer.
ncpus (int, optional) – Number of CPUs for parallel processing. Default is 1.
rho_s (float) – value from 0-1. As stated, this does not influence nodd method very much and 0.15 is common in literature.
mask_waterbodies (bool, optional) – Whether to mask water bodies based on NDWI threshold of 0.25. Default is True.
- Returns:
cwl_opt, fwhm_opt, sensor_band_near_760, fwhm_near_760
- Return type:
1d array of cross-track CWL, 1d array of cross-track FWHM, band near 760, fwhm near 760