.. 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_track_anim.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_track_anim.py: Track animation =============== Run in a terminal this script, which allow to watch eddy evolution. You could use also *EddyAnim* script to display/save animation. .. GENERATED FROM PYTHON SOURCE LINES 10-15 .. code-block:: Python import py_eddy_tracker_sample from py_eddy_tracker.appli.gui import Anim from py_eddy_tracker.observations.tracking import TrackEddiesObservations .. GENERATED FROM PYTHON SOURCE LINES 16-17 Load experimental atlas, and we select one eddy .. GENERATED FROM PYTHON SOURCE LINES 17-25 .. code-block:: Python a = TrackEddiesObservations.load_file( py_eddy_tracker_sample.get_demo_path( "eddies_med_adt_allsat_dt2018/Anticyclonic.zarr" ) ) # We get only 300 first step to save time of documentation builder eddy = a.extract_ids([9672]).index(slice(0, 300)) .. GENERATED FROM PYTHON SOURCE LINES 26-34 Run animation Key shortcut : * Escape => exit * SpaceBar => pause * left arrow => t - 1 * right arrow => t + 1 * \+ => speed increase of 10 % * \- => speed decrease of 10 % .. GENERATED FROM PYTHON SOURCE LINES 34-39 .. code-block:: Python a = Anim(eddy, sleep_event=1e-10, intern=True, figsize=(8, 3.5), cmap="viridis") a.txt.set_position((17, 34.6)) a.ax.set_xlim(16.5, 23) a.ax.set_ylim(34.5, 37) a.show(infinity_loop=False) .. image-sg:: /python_module/08_tracking_manipulation/images/sphx_glr_pet_track_anim_001.png :alt: 23363.0 -> 23662.0 :srcset: /python_module/08_tracking_manipulation/images/sphx_glr_pet_track_anim_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 4.644 seconds) .. _sphx_glr_download_python_module_08_tracking_manipulation_pet_track_anim.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_track_anim.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: pet_track_anim.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: pet_track_anim.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: pet_track_anim.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_