Note
Click here to download the full example code
Example on deriving lidar moments from raw IQ data¶
Out:
/home/rjackson/.conda/envs/spectra_env/lib/python3.7/site-packages/xarray/core/computation.py:609: RuntimeWarning: divide by zero encountered in log10
result_data = func(*input_data)
/home/rjackson/HighIQ/examples/plot_power_spectra.py:22: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
plt.show()
import highiq
import matplotlib.pyplot as plt
from datetime import datetime
# Load an example ARM compliant-file
test_file = highiq.io.load_arm_netcdf(highiq.testing.TEST_FILE)
# Get the particle size distributions
my_ds = highiq.calc.get_psd(test_file)
# Plot the power spectra for a given time and height
my_time = datetime(2017, 8, 4, 0, 40, 59)
fig, ax = plt.subplots(1, 2, figsize=(15, 5))
my_ds["power_spectra_normed_interp"].sel(time=my_time, range=350., method='nearest').plot(ax=ax[0])
my_ds["power_spectra_normed_interp"].sel(time=my_time, range=950., method='nearest').plot(ax=ax[1])
plt.show()
test_file.close()
Total running time of the script: ( 0 minutes 1.367 seconds)