cds-astro / ipyaladin

An IPython Widget for Aladin Lite, the sky viewer.
https://cds-astro.github.io/ipyaladin/
BSD 3-Clause "New" or "Revised" License
126 stars 26 forks source link

Can I overlay images onto the widget with ipyaladin? #14

Closed havok2063 closed 2 months ago

havok2063 commented 5 years ago

I know the javascript version has the ability to overlay images. Can I do this with the ipyaladin version usable in Jupyter notebooks? Or can I do it via some hacking? If not, is it possible to directly access the Javascript version of AladinLite within Python so I can utilize the setOverlayImageLayer?

tboch commented 5 years ago

@havok2063 is this about overlaying another HiPS or overlaying a single FITS image?

havok2063 commented 5 years ago

@tboch This is about overlaying a single FITS image. Or generically an array of data with an associated WCS, e.g. when the image is stored in a non-standard way, e.g as a column in a binary table in a FITS extension.

havok2063 commented 5 years ago

@tboch Just touching base again on this issue? Is this something that is workable or hackable in the current state, or is there an example you can point me to? If not, that's ok. I can work on another solution.

tboch commented 5 years ago

hey @havok2063 : if your FITS images are available through public URLs, yes, that's a simple hack I can add for you in the coming days. What is the typical size of the images you want to display?

havok2063 commented 5 years ago

@tboch They won't be available through public URLs but they will be available through a remote service that can be called via Python, to grab and generate the FITS files. Are you looking for an example file?

Generally I have a smallish array of flux data, with some WCS info, that I want to overlay. However the data I want to overlay is not in a standard image extension of the FITS file. I'm working with TESS target pixel files, with a service that will allow for custom cutouts of the Full Frame Images into Target Pixel Files. So the sizes of these things can vary. The examples I have are about range from ~3 MB FITS files, with flux data in ~10x10 pixel array.

The javascript version of Aladin has the ability to add custom image overlays. Is that version of Aladin exposed somewhere inside the iPython Aladin widget?

tboch commented 5 years ago

@havok2063 : could you point me or send me some example data? Thanks!

havok2063 commented 5 years ago

@tboch I've emailed you an example FITS file.

bmatthieu3 commented 1 year ago

Linked to #21

bmatthieu3 commented 1 year ago

I like the idea to give a numpy array + wcs instead of an hdu, it is more generic

havok2063 commented 1 year ago

I would provide both. I like the idea of a numpy array + WCS as well, but I think for convenience it'd be good to also accept a FITS HDU directly. It's an extra conversion step a user doesn't have to do. If you wanted, your FITS method could use your numpy method under the hood.

ManonMarchand commented 1 year ago

You can now drag and drop FITS files from your system into the widget. The python function to do it from a cell will arrive soon

ManonMarchand commented 2 months ago

Fixed by #86 (this is still not released to the new version, but if you wanna test it around with your fits files and see if it works for you that'd be nice)

PS: You can install ipyaladin bleeding edge with pip install git+https://github.com/cds-astro/ipyaladin.git