.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/setting_parameters/setting_up_stem.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_examples_setting_parameters_setting_up_stem.py: Setting up a STEM Experiment ============================= This script demonstrates how to set up a STEM experiment using the DE API. This script will: 1. Connect to the DE server 2. Set the hardware ROI to 256x256 3. Set the scan size to 256x256 4. Set the number of frames per second to 1000 5. Acquire a STEM image using a HAADF detector .. GENERATED FROM PYTHON SOURCE LINES 13-16 .. code-block:: Python from deapi import Client .. GENERATED FROM PYTHON SOURCE LINES 17-18 Connect to the DE server .. GENERATED FROM PYTHON SOURCE LINES 18-22 .. code-block:: Python client = Client() client.usingMmf = False client.connect(port=13241) # connect to the running DE Server .. GENERATED FROM PYTHON SOURCE LINES 23-26 Set the hardware ROI to 256x256 -------------------------------- In this case we just use the center 256 pixels of the 1024 pixel sensor. .. GENERATED FROM PYTHON SOURCE LINES 26-32 .. code-block:: Python client["Hardware ROI Size X"] = 256 client["Hardware ROI Size Y"] = 256 client["Hardware ROI Offset X"] = 256 client["Hardware ROI Offset Y"] = 256 .. GENERATED FROM PYTHON SOURCE LINES 33-34 Set the scan size to 256x256 .. GENERATED FROM PYTHON SOURCE LINES 34-36 .. code-block:: Python client.scan(size_x=256, size_y=256, enable="On") .. GENERATED FROM PYTHON SOURCE LINES 37-38 Set the number of frames per second to 1000 .. GENERATED FROM PYTHON SOURCE LINES 38-41 .. code-block:: Python client["Frames Per Second"] = 1000 .. GENERATED FROM PYTHON SOURCE LINES 42-43 Acquire a STEM image using a HAADF detector .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.053 seconds) .. _sphx_glr_download_examples_setting_parameters_setting_up_stem.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: setting_up_stem.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: setting_up_stem.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: setting_up_stem.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_