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

Exploring reimplementation using bqplot #72

Open
michiboo opened this issue Mar 2, 2019 · 8 comments
Open

Exploring reimplementation using bqplot #72

michiboo opened this issue Mar 2, 2019 · 8 comments
Labels
backend: bqplot enhancement New feature or request

Comments

@michiboo
Copy link

michiboo commented Mar 2, 2019

Today I spend some time to explore the possibility of using bqplot for implementation, image from FITS has to be convert to other standard format such as PNG, JPEG for it to work, my question is there better to convert FITS to these format?

My current way of converting it is using pillow.

@pllim
Copy link
Member

pllim commented Mar 4, 2019

I think @mwcraig or @astrofrog would have to advise on the bqplot side. I think they use Qt mainly, but I am not sure. In the meantime, we ask for your patience.

@mwcraig
Copy link
Member

mwcraig commented Mar 7, 2019

The bqplot implementation would probably use https://github.com/glue-viz/ipyastroimage as the Mark on the bqplot plot. That can take a numpy array, so I think we can avoid the conversion to another image format. I haven't had a chance to experiment much with https://github.com/glue-viz/ipyastroimage

I have a rough draft implementation of a really basic image viewer based on bqplot somewhere, will try to dig it up tomorrow.

@pllim pllim added the enhancement New feature or request label Mar 7, 2019
@michiboo
Copy link
Author

michiboo commented Mar 9, 2019

Hi, have you digged up the draft implementation? I would like to have a look! :)

@mwcraig
Copy link
Member

mwcraig commented Mar 11, 2019

Found it, will upload soon (it had zero comments and didn't actually quite work 😮)

@mwcraig
Copy link
Member

mwcraig commented Mar 11, 2019

Look in this, don't judge the code too harshly 😀

https://gist.github.com/mwcraig/303cfb6e3e970d137e91789245ff259d

You will need to change the image you are using, let me know if you need me to send an image.

@pllim
Copy link
Member

pllim commented Mar 11, 2019

@mwcraig , what is the overlap with https://github.com/glue-viz/glue-jupyter ? Maarten seems to be involved in that too.

@mwcraig
Copy link
Member

mwcraig commented Mar 12, 2019

@pllim -- not too much from what I understand.

Maarten developed ipyastroimage as a more astronomy-centric replacement for the Image mark in bqplot because they needed that for the jupyter version of glue. He released as a separate package so that we could use it also.

When I asked Tom R. about the api for astrowidgets his response was that glue didn't really have an API for images like that.

I don't think it makes much sense to do a ton of work on making new selection tools or trying to generate images with a bunch of linked plots, since glue is focusing on that.

I could see adding a glue-based image widget in the future and/or replacing whatever bqplot-based widget developed this summer with something from glue down the road. But my impression is that we would still need to do a fair bit of wrapping because the API here is so much different than what glue provides.

@pllim
Copy link
Member

pllim commented Jan 29, 2021

Looks like they renamed ipyastroimage to bqplot-image-gl. I kinda went a slightly different route at #121 mainly because I forgot about this issue.

@mwcraig , I see that in your gist above, you had to do some Event hacking to get the cursor info. Do you think that will work inside the ImageWidget class or it has to be done inside the notebook itself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: bqplot enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants