Skip to content

Commit

Permalink
Update docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 8, 2024
1 parent 7b508e2 commit d0182aa
Show file tree
Hide file tree
Showing 424 changed files with 10,237 additions and 2,697 deletions.
2 changes: 1 addition & 1 deletion current/.buildinfo
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
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
32 changes: 32 additions & 0 deletions current/_downloads/1385e6594be55eee03c3bc687fbb7ef8/map_signal.py
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)
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
115 changes: 115 additions & 0 deletions current/_downloads/1becff7a610aee42b57e8b026cbe1fd8/map_signal.ipynb
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
}
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
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit d0182aa

Please sign in to comment.