.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/camera_live_view.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_camera_live_view.py: Camera live view ===================== This script gives a _very_ rudimentary live viewer for a camera. .. GENERATED FROM PYTHON SOURCE LINES 6-29 .. code-block:: Python import astropy.units as u import matplotlib.pyplot as plt from openwfs.devices import Camera # Adjust these parameters to your setup # The camera driver file path camera_driver_path = R"C:\Program Files\Basler\pylon 7\Runtime\x64\ProducerU3V.cti" cam = Camera(camera_driver_path) cam.exposure = 16.666 * u.ms frame = 0 plt.figure() im = plt.imshow(cam.read()) plt.colorbar() plt.show(block=False) while True: im.set_data(cam.read()) plt.title(f"frame: {frame}") plt.show(block=False) plt.pause(0.001) frame += 1 .. _sphx_glr_download_auto_examples_camera_live_view.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: camera_live_view.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: camera_live_view.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: camera_live_view.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_