.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/loading_quantem.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_loading_quantem.py: Loading Data into the quantem Package ===================================== This example demonstrates how to load data into the quantem package. .. GENERATED FROM PYTHON SOURCE LINES 7-17 .. code-block:: Python from quantem.core.io.file_readers import read_4dstem from em_database.data import BilayerWS2 # Ensure the dataset is downloaded dataset = BilayerWS2() file_path = dataset.download() # Load the data using quantem data = read_4dstem(file_path) print(data) .. rst-class:: sphx-glr-script-out .. code-block:: none quantem Dataset named '4D-STEM dataset' shape: (246, 246, 8, 8) dtype: float32 device: cpu origin: [-17.22 -17.22 -16.66 -16.66] sampling: [0.14 0.14 4.165 4.165] units: ['A^-1', 'A^-1', 'mrad', 'mrad'] signal units: 'arb. units' .. GENERATED FROM PYTHON SOURCE LINES 18-19 Display the data using quantem's built-in visualization .. GENERATED FROM PYTHON SOURCE LINES 19-19 .. code-block:: Python data.show() .. image-sg:: /examples/images/sphx_glr_loading_quantem_001.png :alt: 4D-STEM dataset(0, 0, slice(None, None, None), slice(None, None, None)) :srcset: /examples/images/sphx_glr_loading_quantem_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none (
, ) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.993 seconds) .. _sphx_glr_download_examples_loading_quantem.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: loading_quantem.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: loading_quantem.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: loading_quantem.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_