astrofrog / astrofrog/cube-viewer

Failure when loading ALMA cube

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

This looks like a failure to drop stokes to me, but I had trouble reproducing it yesterday. This happened using cube-viewer as a glue plugin

```
Traceback (most recent call last):
File "/Users/adam/repos/glue/glue/qt/widgets/glue_mdi_area.py", line 62, in dropEvent
new_layer(layer)
File "/Users/adam/repos/glue/glue/qt/widgets/glue_mdi_area.py", line 52, in new_layer
self._application.choose_new_data_viewer(layer)
File "/Users/adam/repos/glue/glue/qt/glue_application.py", line 673, in choose_new_data_viewer
return self.do(cmd)
File "/Users/adam/repos/glue/glue/core/application_base.py", line 147, in do
self._cmds.do(command)
File "/Users/adam/repos/glue/glue/core/command.py", line 125, in do
result = cmd.do(self._session)
File "/Users/adam/repos/glue/glue/core/command.py", line 215, in do
v = session.application.new_data_viewer(self.viewer, self.data)
File "/Users/adam/repos/glue/glue/qt/widgets/mpl_widget.py", line 38, in wrapper
result = func(*args, **kwargs)
File "/Users/adam/repos/glue/glue/core/application_base.py", line 75, in new_data_viewer
if data and not c.add_data(data):
File "/Users/adam/repos/cube-viewer/cube_viewer/glue_viewer.py", line 19, in add_data
self._vtk_widget.set_data(data['PRIMARY'])
File "/Users/adam/repos/cube-viewer/cube_viewer/vtk_widget.py", line 42, in set_data
self.nz, self.ny, self.nx = data.shape
ValueError: too many values to unpack
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in cube_viewer/glue_viewer.py at add_data and cube_viewer/vtk_widget.py at set_data, where the traceback reports the failure. Inspect the ALMA data shape passed through the cube-viewer Glue plugin and compare it with the three values expected by set_data; done means the ALMA cube loads without the unpacking error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.