.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/loading_hyperspy.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_hyperspy.py: Loading Data with HyperSpy =========================== This example demonstrates how to load and visualize data using the HyperSpy library. .. GENERATED FROM PYTHON SOURCE LINES 7-17 .. code-block:: Python import hyperspy.api as hs from em_database.data import BilayerWS2 # Load a dataset using HyperSpy dataset = BilayerWS2() data_path = dataset.download() # Download the dataset if not already available data = hs.load(data_path) data .. rst-class:: sphx-glr-script-out .. code-block:: none 0%| | 0.00/12.5M [00:00 .. GENERATED FROM PYTHON SOURCE LINES 18-19 Display the dataset .. GENERATED FROM PYTHON SOURCE LINES 19-20 .. code-block:: Python data.plot() .. rst-class:: sphx-glr-horizontal * .. image-sg:: /examples/images/sphx_glr_loading_hyperspy_001.png :alt: smallPtychography Navigator :srcset: /examples/images/sphx_glr_loading_hyperspy_001.png :class: sphx-glr-multi-img * .. image-sg:: /examples/images/sphx_glr_loading_hyperspy_002.png :alt: smallPtychography Signal :srcset: /examples/images/sphx_glr_loading_hyperspy_002.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none WARNING | Hyperspy | Numba is not installed, falling back to non-accelerated implementation. (hyperspy.decorators:256) WARNING | Hyperspy | Numba is not installed, falling back to non-accelerated implementation. (hyperspy.decorators:256) WARNING | Hyperspy | Numba is not installed, falling back to non-accelerated implementation. (hyperspy.decorators:256) WARNING | Hyperspy | Numba is not installed, falling back to non-accelerated implementation. (hyperspy.decorators:256) WARNING | Hyperspy | Numba is not installed, falling back to non-accelerated implementation. (hyperspy.decorators:256) WARNING | Hyperspy | Numba is not installed, falling back to non-accelerated implementation. (hyperspy.decorators:256) WARNING | Hyperspy | Numba is not installed, falling back to non-accelerated implementation. (hyperspy.decorators:256) WARNING | Hyperspy | `signal_type='electron_diffraction'` not understood. See `hs.print_known_signal_types()` for a list of installed signal types or https://github.com/hyperspy/hyperspy-extensions-list for the list of all hyperspy extensions providing signals. (hyperspy.io:893) WARNING | Hyperspy | `signal_type='electron_diffraction'` not understood. See `hs.print_known_signal_types()` for a list of installed signal types or https://github.com/hyperspy/hyperspy-extensions-list for the list of all hyperspy extensions providing signals. (hyperspy.io:893) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 37.142 seconds) .. _sphx_glr_download_examples_loading_hyperspy.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: loading_hyperspy.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: loading_hyperspy.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: loading_hyperspy.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_