phys_581.contexts
=================

.. py:module:: phys_581.contexts


Classes
-------

.. autoapisummary::

   phys_581.contexts.FPS


Module Contents
---------------

.. py:class:: FPS(*v, fig=None, display=None, embed=None, filename=None, dpi=None, fps=None, metadata=None, **kw)

   Bases: :py:obj:`mmfutils.contexts.FPS`


   Enhanced FPS with display and movie capabilities.

   :param display:
                   If this is provided, then after each iteration, we will call:

                       IPython.display.display(self.display)
                       IPython.display.clear_output(wait=True)

                   If provided, then this will also be used for `fig`.
   :type display: Figure | None
   :param fig: Must be provided if any sort of movie is going to be produced.  If `display` is
               provided, then it will be used as `fig` if `fig` is None.
   :type fig: Figure, None
   :param filename: Filename for movie.  If provided, then a movie will be produced and saved here.
   :type filename: str
   :param embed: If `True`, then a movie will be embedded and displayed with
                 `IPython.display.display`.  If `filename` is provided, then the movie will be
                 generated there, otherwise, it will be placed in a tempdir.
   :type embed: bool
   :param fps: Framerate.  If provided, this will overload max_fps.
   :type fps: float


   .. py:attribute:: MovieWriter


   .. py:attribute:: fig
      :value: None



   .. py:attribute:: display
      :value: None



   .. py:attribute:: embed
      :value: None



   .. py:attribute:: filename
      :value: None



   .. py:attribute:: metadata
      :value: None



   .. py:attribute:: fps
      :value: None



   .. py:attribute:: dpi
      :value: None



   .. py:method:: _outfile()


   .. py:method:: _writer(outfile)


   .. py:method:: __iter__()


   .. py:method:: _process(frame)


   .. py:method:: _finish(outfile)


   .. py:attribute:: VIDEO_TAG
      :value: Multiline-String

      .. raw:: html

         <details><summary>Show Value</summary>

      .. code-block:: python

         """<video {size} {options}>
         <source type="video/mp4" src="data:video/mp4;base64,{video}">
         Your browser does not support the video tag.
         </video>"""

      .. raw:: html

         </details>




   .. py:method:: _get_video(outfile)


