Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default values for ROIs #2341

Merged
merged 24 commits into from Feb 2, 2021
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bea1f58
ROIs can be instantiated with None values
thomasaarholt Mar 24, 2020
082de07
found a bug -> top < bottom
thomasaarholt Mar 24, 2020
3c92e23
clean up using rel-units
thomasaarholt Jan 29, 2021
1c4a694
clean up docstring which was too wide
thomasaarholt Jan 29, 2021
3a0478a
add repr methods that support undefined, and tests
thomasaarholt Jan 29, 2021
b2b60cd
get _repr_ string from _get_attributes(), and reorder indexed output …
thomasaarholt Jan 29, 2021
967c3f7
fix top > bot
thomasaarholt Jan 29, 2021
8b2e38a
revert Rectangular indexing change
thomasaarholt Jan 29, 2021
f461510
add checks for calling with undefined
thomasaarholt Jan 29, 2021
0a40cf9
one more test
thomasaarholt Jan 29, 2021
6db3286
remove old draft function
thomasaarholt Jan 29, 2021
89dde0e
fixed setting r = r_inner on CircleRoi)
thomasaarholt Jan 29, 2021
edad998
Update hyperspy/roi.py
thomasaarholt Jan 30, 2021
5eaee15
take into account eric's change
thomasaarholt Jan 30, 2021
4be41ff
ericpre comments
thomasaarholt Jan 31, 2021
a7184d0
set circle r_inner=0 by default, remove raiseerror method
thomasaarholt Jan 31, 2021
e91f461
remove/fix old/failing tests
thomasaarholt Jan 31, 2021
5e193f2
move util function to new file -> hyperspy.utils.axes
thomasaarholt Jan 31, 2021
fa66847
actually include new file
thomasaarholt Jan 31, 2021
226e894
simplify logic assuming r_inner cannot be Undefined
thomasaarholt Jan 31, 2021
5126a3e
updated ericpre suggestions
thomasaarholt Jan 31, 2021
94c000e
move and privatize get_central
thomasaarholt Feb 2, 2021
ad7be7a
fix behaviour on set_defaults and add test
thomasaarholt Feb 2, 2021
320371e
fix failing test and moving interactive test to right class
thomasaarholt Feb 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/user_guide/interactive_operations_ROIs.rst
Expand Up @@ -116,6 +116,11 @@ added before calling :py:meth:`~.roi.BaseInteractiveROI.interactive`.
Typically, using a 4K resolution with a small scaling factor (<150 %), setting
the pick tolerance to 15 instead of 7.5 makes the widgets easier to manipulate.

If instantiated without arguments, (i.e. ``rect = RectangularROI()`` the roi
will automatically determine sensible values to center it when
interactively adding it to a signal. This provides a conventient starting point
to further manipulate the ROI, either by hand or using the gui (i.e. ``rect.gui``).

Notably, since ROIs are independent from the signals they sub-select, the widget
can be plotted on a different signal altogether.

Expand Down