.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/general/opening_data.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_general_opening_data.py: Opening Data: ------------- This example demonstrates how to open and visualize data using the SpyDE application. We will start by opening the SpyDE main window as shown below. .. GENERATED FROM PYTHON SOURCE LINES 9-12 .. code-block:: Python :dedent: 1 .. image-sg:: /examples/general/images/sphx_glr_opening_data_001.png :alt: opening data :srcset: /examples/general/images/sphx_glr_opening_data_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none CPU Count: 3 [startup] Plot update worker thread start completed in 0.0 ms [startup] Plot control dock creation completed in 10.4 ms [startup] Inst. control dock creation completed in 40.1 ms Starting Dask LocalCluster with 1 workers, and 1 threads per worker .. GENERATED FROM PYTHON SOURCE LINES 35-40 Here we have the SpyDE main window opened! Now, let's open some example data. We can do this by navigating to the "File" menu and selecting "Open". SpyDe can open all the file formats supported by HyperSpy. That being said, files which support `distributed` loading will work much better. If there is a specific file format that you would like to see supported, please open an issue on the RosettaSciIo GitHub page. .. GENERATED FROM PYTHON SOURCE LINES 40-42 .. code-block:: Python :dedent: 1 .. image-sg:: /examples/general/images/sphx_glr_opening_data_002.png :alt: opening data :srcset: /examples/general/images/sphx_glr_opening_data_002.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 123-124 Now we can see the opened data in the SpyDE application! .. GENERATED FROM PYTHON SOURCE LINES 124-127 .. code-block:: Python :dedent: 1 .. image-sg:: /examples/general/images/sphx_glr_opening_data_003.png :alt: opening data :srcset: /examples/general/images/sphx_glr_opening_data_003.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Emitting Future, write_shared_array-a3af8dda0b24f09bd985bdebf343cace for plot: Read shared array in 0.03 ms Emitting Future, finalize-hlgfinalizecompute-f035477fc02845b5ba1b82281eecc107 for plot: Transferred Future over TCP in 2.55 ms Updating Plot from worker signal... Setting image data with img [[0.74432183 0.6325225 0.7493633 ... 0.03410073 0.77640999 0.89044296] [0.29414328 0.73027308 0.10093151 ... 0.95131195 0.10743438 0.17023182] [0.97448146 0.53891391 0.54407824 ... 0.35836436 0.77254874 0.98809062] ... [0.75282424 0.32024453 0.81422023 ... 0.79755846 0.3718993 0.10648215] [0.73897944 0.3522312 0.68877525 ... 0.13174099 0.30278926 0.23853144] [0.49496252 0.52097277 0.13448287 ... 0.14393519 0.17246608 0.91782443]] setImage took 0.06ms Updating Plot from worker signal... Setting levels: (0.0004934051210775392, 0.9999460260860547) percentiles: (np.float64(0.1708984375), 100.0) on plot: .. GENERATED FROM PYTHON SOURCE LINES 137-138 We can now explore and visualize the data using SpyDE's powerful tools and features! .. GENERATED FROM PYTHON SOURCE LINES 138-140 .. code-block:: Python :dedent: 1 .. rst-class:: sphx-glr-script-out .. code-block:: none Shutting down Dask cluster and client... .. GENERATED FROM PYTHON SOURCE LINES 144-145 sphinx_gallery_thumbnail_number = 2 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 5.102 seconds) .. _sphx_glr_download_examples_general_opening_data.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: opening_data.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: opening_data.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: opening_data.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_