.. note::
    :class: sphx-glr-download-link-note

    Click :ref:`here <sphx_glr_download_source_auto_examples_plot_processing.py>` to download the full example code
.. rst-class:: sphx-glr-example-title

.. _sphx_glr_source_auto_examples_plot_processing.py:


=============================================================
Example on processing moments from ARM Doppler Lidar ACF data
=============================================================



.. image:: /source/auto_examples/images/sphx_glr_plot_processing_001.png
    :class: sphx-glr-single-img


.. rst-class:: sphx-glr-script-out

 Out:

 .. code-block:: none

    /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_processing.py:20: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
      plt.show()
    /home/rjackson/HighIQ/examples/plot_processing.py:26: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
      plt.show()






|


.. code-block:: default


    import highiq
    import matplotlib.pyplot as plt

    # Load the data. This uses a module in the Atmospheric Community
    # Toolkit to ensure that the input acf data are always
    # entered into a 3D array of (time, nsamples, complex)

    my_ds = highiq.io.load_arm_netcdf(highiq.testing.TEST_FILE)
    my_ds_processed = highiq.calc.get_psd(my_ds)

    # For plotting the spectra, simply use xarray's built in functionality
    #
    my_ds_processed.power_spectra_normed_interp.sel(range=400, method='nearest').plot()
    plt.show()

    # To retrieve the lidar moments, we can simply do this in one line
    my_ds_processed = highiq.calc.get_lidar_moments(my_ds_processed)

    my_ds_processed.intensity.plot()
    plt.show()

    my_ds_processed.close()
    my_ds.close()



.. rst-class:: sphx-glr-timing

   **Total running time of the script:** ( 0 minutes  0.840 seconds)


.. _sphx_glr_download_source_auto_examples_plot_processing.py:


.. only :: html

 .. container:: sphx-glr-footer
    :class: sphx-glr-footer-example



  .. container:: sphx-glr-download

     :download:`Download Python source code: plot_processing.py <plot_processing.py>`



  .. container:: sphx-glr-download

     :download:`Download Jupyter notebook: plot_processing.ipynb <plot_processing.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
