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

Cubeviz Collapse and Moment Maps Plugins: Spectral bounds do not match Region selection #268

Closed
PatrickOgle opened this issue Sep 5, 2020 · 9 comments
Labels
bug Something isn't working cubeviz

Comments

@PatrickOgle
Copy link
Contributor

When spectral region is selected in Collapse Plugin, the upper and lower spectral bounds
should change to match those of the region, but do not. It is not clear in this case which
bounds are being used to compute the collapse.

@PatrickOgle PatrickOgle changed the title Cubeviz Collapse Plugin Spectral bounds do not match Region selection Cubeviz Collapse and Moment Maps Plugins: Spectral bounds do not match Region selection Sep 5, 2020
@PatrickOgle
Copy link
Contributor Author

The same bug exists in the Moment Maps Plugin.

@PatrickOgle PatrickOgle added bug Something isn't working cubeviz labels Sep 5, 2020
@rosteen
Copy link
Collaborator

rosteen commented Sep 8, 2020

It works for me. Could you post a screenshot of the behavior you're seeing?

Screen Shot 2020-09-08 at 8 43 15 AM

@PatrickOgle
Copy link
Contributor Author

Hmm... It is working now. Maybe I got into an error state from something else and didn't realize it.

@PatrickOgle
Copy link
Contributor Author

A different bug--If I try to do a second collapse with the same region, but with resized bounds: change to Region=None, resize the region, then reselect Region 1, the region bounds are correct.
However, if I apply Collapse again, it errors out and the image viewer that contained the intial collapse goes blank.
Is collapse trying to overwrite the same output product name?

The error message is very long and repetitive, but starts and ends with:

IndexError Traceback (most recent call last)
~/miniconda3/envs/jdaviz19/lib/python3.8/site-packages/ipywidgets/widgets/widget.py in _handle_msg(self, msg)
674 if 'buffer_paths' in data:
675 _put_buffers(state, data['buffer_paths'], msg['buffers'])
--> 676 self.set_state(state)
677
678 # Handle a state request.

~/miniconda3/envs/jdaviz19/lib/python3.8/site-packages/ipywidgets/widgets/widget.py in set_state(self, sync_data)
543 from_json = self.trait_metadata(name, 'from_json',
544 self._trait_from_json)
--> 545 self.set_trait(name, from_json(sync_data[name], self))
546
547 def send(self, content, buffers=None):

~/miniconda3/envs/jdaviz19/lib/python3.8/site-packages/glue_jupyter/state_traitlets_helpers.py in update_state_from_json(self, json, widget)
149 self._block_on_state_change = True
150 try:
--> 151 update_state_from_dict(state, json)
152 finally:
153 self._block_on_state_change = False

~/miniconda3/envs/jdaviz19/lib/python3.8/site-packages/glue_jupyter/state_traitlets_helpers.py in update_state_from_dict(state, changes)
49 update_state_from_dict(callback_list[i], changes[name][i])
50 else:
---> 51 if (changes[name][i] != MAGIC_IGNORE and
52 callback_list[i] != changes[name][i]):
53 callback_list[i] = changes[name][i]

IndexError: list index out of range

.....


IndexError Traceback (most recent call last)
~/miniconda3/envs/jdaviz19/lib/python3.8/site-packages/ipywidgets/widgets/widget.py in _handle_msg(self, msg)
674 if 'buffer_paths' in data:
675 _put_buffers(state, data['buffer_paths'], msg['buffers'])
--> 676 self.set_state(state)
677
678 # Handle a state request.

~/miniconda3/envs/jdaviz19/lib/python3.8/site-packages/ipywidgets/widgets/widget.py in set_state(self, sync_data)
543 from_json = self.trait_metadata(name, 'from_json',
544 self._trait_from_json)
--> 545 self.set_trait(name, from_json(sync_data[name], self))
546
547 def send(self, content, buffers=None):

~/miniconda3/envs/jdaviz19/lib/python3.8/site-packages/glue_jupyter/state_traitlets_helpers.py in update_state_from_json(self, json, widget)
149 self._block_on_state_change = True
150 try:
--> 151 update_state_from_dict(state, json)
152 finally:
153 self._block_on_state_change = False

~/miniconda3/envs/jdaviz19/lib/python3.8/site-packages/glue_jupyter/state_traitlets_helpers.py in update_state_from_dict(state, changes)
49 update_state_from_dict(callback_list[i], changes[name][i])
50 else:
---> 51 if (changes[name][i] != MAGIC_IGNORE and
52 callback_list[i] != changes[name][i]):
53 callback_list[i] = changes[name][i]

IndexError: list index out of range

@rosteen
Copy link
Collaborator

rosteen commented Sep 8, 2020

Ah, it is using the same label for subsequent collapses - if desired I can update it to iterate an integer and have the labels be something like Collapsed 1. Collapsed 2, etc.

That MAGIC_IGNORE error has showed up in a few different contexts and seems to be related to either traitlets, the "data loaded" snackbar messages, or a combination of the two. If there's not already an issue to look into that, there should be (although there's a good chance it's a glue-jupyter bug).

@maartenbreddels
Copy link
Collaborator

@mariobuikhuizen my guess is this last error should be fixed by #456 right?

@mariobuikhuizen
Copy link
Collaborator

Yes, and possibly glue-viz/glue-jupyter#211 is also needed.

@maartenbreddels
Copy link
Collaborator

I did manage to reproduce the original issue.

@rosteen
Copy link
Collaborator

rosteen commented Nov 1, 2022

This has been resolved - both the original issue, and collapsing again with the same label, which now makes clear that you'll be overwriting unless you change the label.

@rosteen rosteen closed this as completed Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cubeviz
Projects
None yet
Development

No branches or pull requests

4 participants