glue-viz / bqplot-image-gl

Jupyter widget for displaying images with a focus on astronomy
MIT License
19 stars 13 forks source link

ImageGLView.data is a Float64Array which WebGL does not support #63

Open pllim opened 3 years ago

pllim commented 3 years ago

Loading an astronomical image into Imviz in Jdaviz triggers this, as noticed by @rosteen . Not sure where the fix should be.

https://github.com/glue-viz/bqplot-image-gl/blob/bd7bac12f548d20b7f2b632fb9b1cbdbc0233497/js/lib/imagegl.js#L286-L289

pllim commented 3 years ago

Maybe here? 🤷

https://github.com/glue-viz/glue/blob/ad14432229255dc31c5756434cc18bf14657c92b/glue/core/component.py#L143

mwcraig commented 3 years ago

I think the fix is to convert the data to float32 on the python side before sending the data to glue and friends...

mwcraig commented 3 years ago

Actually, maybe that isn't it....I see this if I create an image mark without any data. Setting the data later doesn't seem to generate a complaint.