phys_581.contexts#

Classes#

FPS

Enhanced FPS with display and movie capabilities.

Module Contents#

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

Bases: mmfutils.contexts.FPS

Enhanced FPS with display and movie capabilities.

Parameters:
  • display (Figure | None) –

    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.

  • fig (Figure, None) – 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.

  • filename (str) – Filename for movie. If provided, then a movie will be produced and saved here.

  • embed (bool) – 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.

  • fps (float) – Framerate. If provided, this will overload max_fps.

MovieWriter#
fig = None#
display = None#
embed = None#
filename = None#
metadata = None#
fps = None#
dpi = None#
_outfile()#
_writer(outfile)#
__iter__()#
_process(frame)#
_finish(outfile)#
VIDEO_TAG = Multiline-String#
Show Value
"""<video {size} {options}>
<source type="video/mp4" src="data:video/mp4;base64,{video}">
Your browser does not support the video tag.
</video>"""
_get_video(outfile)#