- act.qc.fft_shading_test(ds, variable='diffuse_hemisp_narrowband_filter4', fft_window=30, shad_freq_lower=[0.008, 0.017], shad_freq_upper=[0.0105, 0.0195], ratio_thresh=[3.15, 1.2], time_interval=None, smooth_window=5, shading_thresh=0.4)#
Function to test shadowband radiometer (MFRSR, RSS, etc) instruments for shading related problems. Program was adapted by Adam Theisen from the method defined in Alexandrov et al 2007 to process on a point by point basis using a window of data around that point for the FFT analysis.
For ARM data, testing has found that this works the best on narrowband filter4 for MFRSR data.
Function has been tested and is in use by the ARM DQ Office for problem detection. It is know to have some false positives at times.
Need to run ds.clean.cleanup() ahead of time to ensure proper addition to QC variable
ds (xarray.Dataset) – Xarray dataset
variable (string) – Name of variable to process
fft_window (int) – Number of samples to use in the FFT window. Default is +- 30 samples Note: this is +- so the full window will be double
shad_freq_lower (list) – Lower frequency over which to look for peaks in FFT
shad_freq_upper (list) – Upper frequency over which to look for peaks in FFT
ratio_thresh (list) – Threshold for each freq window to flag data. I.e. if the peak is 3.15 times greater than the surrounding area
time_interval (float) – Sampling rate of the instrument
smooth_window (int) – Number of samples to use in smoothing FFTs before analysis
shading_thresh (float) – After smoothing, the value over which is considered a shading signal
ds (xarray.Dataset) – Xarray dataset tested for shading problems
Alexandrov, Mikhail & Kiedron, Peter & Michalsky, Joseph & Hodges, Gary & Flynn, Connor & Lacis, Andrew. (2007). Optical depth measurements by shadow-band radiometers and their uncertainties. Applied optics. 46. 8027-38. 10.1364/AO.46.008027.