-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b508e2
commit d0182aa
Showing
424 changed files
with
10,237 additions
and
2,697 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 8fc0022a04022d208c9f7eec51d04bd9 | ||
config: 50c4115e39bd2203a736e3f92cb0f75e | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+7.99 KB
(120%)
current/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip
Binary file not shown.
32 changes: 32 additions & 0 deletions
32
current/_downloads/1385e6594be55eee03c3bc687fbb7ef8/map_signal.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" | ||
Create Map from ROI in signal space | ||
=================================== | ||
Use the :func:`~.api.plot.plot_roi_map` function to create interactive maps defined | ||
from ROIs in signal space. | ||
""" | ||
|
||
import hyperspy.api as hs | ||
|
||
#%% | ||
# Create a signal: | ||
s = hs.data.two_gaussians() | ||
|
||
#%% | ||
# Add 2 ROIs in signal space and map the corresponding signal using :func:`~.api.plot.plot_roi_map` | ||
# The ROIs are added to the plot of the signal: | ||
s.plot() | ||
roi = hs.plot.plot_roi_map(s, rois=2) | ||
|
||
#%% | ||
# Same as above, but plotting the maps in a single figure: | ||
s.plot() | ||
roi = hs.plot.plot_roi_map(s, rois=2, single_figure=True) | ||
# Choose this figure as gallery thumbnail: | ||
# sphinx_gallery_thumbnail_number = 7 | ||
|
||
#%% | ||
# Same as in previous step, but additionally specifying ``cmap`` and ``colors``: | ||
s.plot() | ||
roi = hs.plot.plot_roi_map(s, rois=2, color=["r", "b"], cmap="gray", single_figure=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 115 additions & 0 deletions
115
current/_downloads/1becff7a610aee42b57e8b026cbe1fd8/map_signal.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"\n# Create Map from ROI in signal space\n\nUse the :func:`~.api.plot.plot_roi_map` function to create interactive maps defined\nfrom ROIs in signal space.\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import hyperspy.api as hs" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Create a signal:\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"s = hs.data.two_gaussians()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Add 2 ROIs in signal space and map the corresponding signal using :func:`~.api.plot.plot_roi_map`\nThe ROIs are added to the plot of the signal:\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"s.plot()\nroi = hs.plot.plot_roi_map(s, rois=2)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Same as above, but plotting the maps in a single figure:\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"s.plot()\nroi = hs.plot.plot_roi_map(s, rois=2, single_figure=True)\n# Choose this figure as gallery thumbnail:\n# sphinx_gallery_thumbnail_number = 7" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Same as in previous step, but additionally specifying ``cmap`` and ``colors``:\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"s.plot()\nroi = hs.plot.plot_roi_map(s, rois=2, color=[\"r\", \"b\"], cmap=\"gray\", single_figure=True)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.9" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
97 changes: 97 additions & 0 deletions
97
current/_downloads/1fe9a7b6d4e2c4b4682a04f3d6a365b0/map_signal_circleROI.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"\n# Create Map from CircleROI in signal space\n\nUse the :func:`~.api.plot.plot_roi_map` function to create interactive maps defined\nfrom a :class:`~.api.roi.CircleROI` in signal space.\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import hyperspy.api as hs\nimport numpy as np" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Create a signal:\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"rng = np.random.default_rng(0)\ndata = rng.random(size=(100, 100, 50, 50))\ns = hs.signals.Signal2D(data)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Add 2 ROIs in signal space and map the corresponding signal using :func:`~.api.plot.plot_roi_map`.\nThe ROIs are added to the plot of the signal and by default a\n:class:`~.api.roi.RectangularROI` is used\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"s.plot()\nroi = hs.plot.plot_roi_map(s, rois=2)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Same as above but with using :class:`~.api.roi.CircleROI` with predefined position:\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"roi1 = hs.roi.CircleROI(cx=25, cy=25, r=5)\nroi2 = hs.roi.CircleROI(cx=25, cy=25, r=15, r_inner=10)\ns.plot()\nroi = hs.plot.plot_roi_map(s, rois=[roi1, roi2])\n# Choose this figure as gallery thumbnail:\n# sphinx_gallery_thumbnail_number = 6" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.9" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.