.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples\plot_ref.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_ref.py: Plot a Reference CCF ==================== .. GENERATED FROM PYTHON SOURCE LINES 7-49 .. rst-class:: sphx-glr-script-out .. code-block:: pytb Traceback (most recent call last): File "D:\PythonForSource\MSNoise_Stack\MSNoise\examples\plot_ref.py", line 13, in os.chdir(r"C:\tmp\MSNOISE_DOC") FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\tmp\\MSNOISE_DOC' | .. code-block:: default # The following two lines are only needed for building this documentation # Delete them and run the code in your project folder. import os if "SPHINX_DOC_BUILD" in os.environ or 1: os.chdir(r"C:\tmp\MSNOISE_DOC") import matplotlib matplotlib.use("agg") import matplotlib.pyplot as plt import numpy as np import pandas as pd from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() plt.style.use("ggplot") from msnoise.api import connect, get_results, build_movstack_datelist, get_params, get_t_axis, xr_get_ref # connect to the database db = connect() # Obtain a list of dates between ``start_date`` and ``enddate`` start, end, datelist = build_movstack_datelist(db) # Get the list of parameters from the DB: params = get_params(db) # Get the time axis for plotting the CCF: taxis = get_t_axis(db) # Get the results for two station, filter id=1, ZZ component, mov_stack=("1d","1d") and stack the results: ccf = xr_get_ref("PF.FJS.00", "PF.FOR.00", "ZZ", 1, taxis) ccf.plot(figsize=(8,8)) #EOF .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.005 seconds) .. _sphx_glr_download_auto_examples_plot_ref.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_ref.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_ref.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_