.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "python_module/08_tracking_manipulation/pet_one_track.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. or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_python_module_08_tracking_manipulation_pet_one_track.py: One Track =================== .. GENERATED FROM PYTHON SOURCE LINES 5-10 .. code-block:: Python from matplotlib import pyplot as plt import py_eddy_tracker_sample from py_eddy_tracker.observations.tracking import TrackEddiesObservations .. GENERATED FROM PYTHON SOURCE LINES 11-12 Load experimental atlas, and we select one eddy .. GENERATED FROM PYTHON SOURCE LINES 12-21 .. code-block:: Python a = TrackEddiesObservations.load_file( py_eddy_tracker_sample.get_demo_path( "eddies_med_adt_allsat_dt2018/Anticyclonic.zarr" ) ) eddy = a.extract_ids([9672]) eddy_f = a.extract_ids([9672]) eddy_f.position_filter(median_half_window=1, loess_half_window=5) .. GENERATED FROM PYTHON SOURCE LINES 22-23 plot .. GENERATED FROM PYTHON SOURCE LINES 23-32 .. code-block:: Python fig = plt.figure(figsize=(12, 5)) ax = fig.add_axes((0.05, 0.05, 0.9, 0.9)) ax.set_xlim(17.5, 22) ax.set_ylim(35, 36.5) ax.set_aspect("equal") ax.grid() eddy.plot(ax, color="r", lw=0.5) eddy_f.scatter(ax, "n", cmap="jet", s=80) .. image-sg:: /python_module/08_tracking_manipulation/images/sphx_glr_pet_one_track_001.png :alt: pet one track :srcset: /python_module/08_tracking_manipulation/images/sphx_glr_pet_one_track_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 33-44 .. code-block:: Python fig = plt.figure(figsize=(12, 5)) ax = fig.add_axes((0.05, 0.05, 0.9, 0.9)) ax.set_xlim(17, 23) ax.set_ylim(34.5, 37) ax.set_aspect("equal") ax.grid() eddy.plot(ax, color="r", lw=0.5, label="track") eddy.index(range(0, len(eddy), 40)).display( ax, intern_only=True, label="observations every 40 days" ) ax.legend() .. image-sg:: /python_module/08_tracking_manipulation/images/sphx_glr_pet_one_track_002.png :alt: pet one track :srcset: /python_module/08_tracking_manipulation/images/sphx_glr_pet_one_track_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.662 seconds) .. _sphx_glr_download_python_module_08_tracking_manipulation_pet_one_track.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/AntSimi/py-eddy-tracker/master?urlpath=lab/tree/notebooks/python_module/08_tracking_manipulation/pet_one_track.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: pet_one_track.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: pet_one_track.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: pet_one_track.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_