From 3dc8ff8a9148b5a3bd9ba5b4df8bcf063bab2a23 Mon Sep 17 00:00:00 2001 From: Clare Shanahan Date: Wed, 11 Dec 2024 13:44:41 -0500 Subject: [PATCH] test --- .../plugins/subset_tools/tests/test_subset_tools.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/jdaviz/configs/default/plugins/subset_tools/tests/test_subset_tools.py b/jdaviz/configs/default/plugins/subset_tools/tests/test_subset_tools.py index 3a038613b8..44a41d03fe 100644 --- a/jdaviz/configs/default/plugins/subset_tools/tests/test_subset_tools.py +++ b/jdaviz/configs/default/plugins/subset_tools/tests/test_subset_tools.py @@ -290,12 +290,18 @@ def test_get_regions_composite(cubeviz_helper, spectrum1d_cube): cubeviz_helper.load_data(spectrum1d_cube) plg = cubeviz_helper.plugins['Subset Tools'] - # Outer circle + # For some reason, Subset 2 disappears after the third subset is applied + # when loaded this way. Uncomment to replace _apply_interactive_region. + # plg.import_region(CirclePixelRegion(center=PixCoord(x=96.0, y=96.0), + # radius=45.0), combination_mode='new') + # plg.import_region(CirclePixelRegion(center=PixCoord(x=95.0, y=95.0), + # radius=25.0), combination_mode='new') + + # apply two circular subsets cubeviz_helper._apply_interactive_region('bqplot:truecircle', (51, 51), (141, 141)) - # Inner circle cubeviz_helper._apply_interactive_region('bqplot:truecircle', (70, 70), (120, 120)) - # apply circular annulus + # apply ciomposite subset created from two existing circular subsets subset_groups = cubeviz_helper.app.data_collection.subset_groups new_subset = subset_groups[0].subset_state & ~subset_groups[1].subset_state cubeviz_helper.default_viewer._obj.apply_subset_state(new_subset)