Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
cshanahan1 committed Dec 11, 2024
1 parent da2beb8 commit 3dc8ff8
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3dc8ff8

Please sign in to comment.