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

[BUG] Spectrum-at-spaxel tool raises JSON warnings in uncertainy viewer #3362

Open
rosteen opened this issue Dec 17, 2024 · 2 comments · May be fixed by #3368
Open

[BUG] Spectrum-at-spaxel tool raises JSON warnings in uncertainy viewer #3362

rosteen opened this issue Dec 17, 2024 · 2 comments · May be fixed by #3368
Labels
bug Something isn't working cubeviz
Milestone

Comments

@rosteen
Copy link
Collaborator

rosteen commented Dec 17, 2024

Jdaviz component

Cubeviz

Description

I was doing some testing with the updated MaNGA cube (https://stsci.box.com/shared/static/gts87zqt5265msuwi4w5u003b6typ6h0.gz) and noticed that when using the spectrum-at-spaxel tool in the uncertainty viewer, every mouse move resulted in a warning:

/Users/rosteen/opt/anaconda3/envs/viz_dev/lib/python3.12/site-packages/jupyter_client/session.py:721: UserWarning: Message serialization failed with:
Out of range float values are not JSON compliant: inf
Supporting this message is deprecated in jupyter-client 7, please make sure your message is JSON-compliant
  content = self.pack(content)

We should figure out how to handle this case better - there are infs in the uncertainty because we convert a 0 inverse variance to inf stddev, but it's all in masked locations.

How to Reproduce

Load linked file in Cubeviz, use the tool.

Expected behavior

No response

Browser

No response

Jupyter

No response

Software versions

No response

🐱

@rosteen rosteen added bug Something isn't working cubeviz needs-triage Issue opened via template and needs triaging labels Dec 17, 2024
@rosteen rosteen added this to the 4.1 milestone Dec 17, 2024
@pllim
Copy link
Contributor

pllim commented Dec 17, 2024

I bet it is here:

def json_safe(column, item):

But how do you want to serialize a NaN to JSON? None, "nan", or ...?

@kecnry
Copy link
Member

kecnry commented Dec 17, 2024

That's to add to a table, the bug mentioned above is for mouseover which shouldn't go through table.... but we likely need a generalized solution that works for both since the same issue would likely occur if using the markers plugin.

@pllim pllim removed the needs-triage Issue opened via template and needs triaging label Dec 19, 2024
@pllim pllim linked a pull request Dec 19, 2024 that will close this issue
9 tasks
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

Successfully merging a pull request may close this issue.

3 participants