Skip to content

incorrect image statistics after a region is deleted where there are multiple statistics widget configured explicitly to display image region statistics #1855

@kswang1029

Description

@kswang1029

Describe the bug
When there are two statistics widgets configured explicitly to display image region statistics, for example, one for image01 and region1 and the other for image02 and region1. Region1 is the only region created in CARTA. If we delete region1, the statistics widget for image01 shows the correct full image statistics as expected. But the other widget for image02 displays incorrect statistics. Based on the ICD message flow, it seems the frontend does not set the requirement properly in this case. Please refer to the video as a demo of the issue.

UPDATE: after few more tests, histogram widget has the same issue. Spatial profiler has the issue. Spectral profiler does not have the issue.

To Reproduce
Steps to reproduce the behavior:

  1. download the test images at https://drive.google.com/file/d/1uv2f-quEVsf1r9Imt_SwNS6EFv1NvHmO/view?usp=sharing
  2. load image01.fits and image02.fits and match them spatially
  3. load the region file polygon.crtf
  4. load two statistics widget
  5. configure one to show image01.fits and the region explicitly and configure the other one to show image02.fits and the region explicitly too
  6. delete the region
  7. the NumPixel count should be ~10^8 but one of the widget did not update correctly and still shows the region stat.

Expected behavior
statistics requirement is set correctly after a region is deleted so that the two statistics can display correct full image statistics for image01 and image02 respectively.

Screenshots or videos

Screen.Recording.2022-05-17.at.12.35.15.mov

Platform info (please complete the following information):

  • OS [e.g. macOS Monterey]: macOS Monterey
  • Browser [e.g. chrome, safari, electron app]: electron app
  • Browser version [e.g. 22]:
  • Backend branch [e.g. dev, v3b2 release]: v3b3
  • Frontend branch [e.g. dev, v3b2 release]: v3b3

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions