HyperspyUI for making ROIs in an EMD file and the quantification of the elements #289
Answered
by
ericpre
d1997Gautam
asked this question in
Q&A
|
Hello, |
Answered by
ericpre
Apr 5, 2025
Replies: 1 comment
|
This example should show you how to do that in the ipython console: To store a ROI parameters and restore the ROI: import hyperspy.api as hs
s = hs.data.two_gaussians()
roi = hs.roi.RectangularROI()
# Add ROI to signal
s.plot()
s_roi = roi.interactive(s, recompute_out_event=None, color='C1')
# Get roi parameters as dictionary
roi_parameters = roi.parameters
# Create new ROI using the dictionary of ROI parameters
roi2 = hs.roi.RectangularROI(**roi_parameters)
s_roi2 = roi2.interactive(s, recompute_out_event=None, color='C2') |
0 replies
Answer selected by
ericpre
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This example should show you how to do that in the ipython console:
https://hyperspy.org/hyperspy-doc/current/auto_examples/region_of_interest/ROI_navigator.html
To store a ROI parameters and restore the ROI: