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

Access pixel values in the current view #208

Open
ivan-katkov opened this issue Nov 15, 2024 · 6 comments
Open

Access pixel values in the current view #208

ivan-katkov opened this issue Nov 15, 2024 · 6 comments

Comments

@ivan-katkov
Copy link

It might be useful to provide a method for retrieving pixel values of the displayed HiPS layer for the current view at a given zoom level.

One usecase, particularly valuable for FITS HiPS maps of physical parameters, is generating histograms to assist with dynamic image cuts. This could be easily implemented if healpix values were accessible in the layer objects.

@skybber
Copy link

skybber commented Dec 4, 2024

It would be great to have this option available. It was possible in version 2, and we're currently using it in our application: CzSky - Comet K23A030 . I'm now trying to port this functionality to version 3 and are looking for a way to do it.

@tboch
Copy link
Collaborator

tboch commented Dec 5, 2024

Hi @skybber . Can you specify what functions/API were available in v2, and no longer in v3? Thanks.

@skybber
Copy link

skybber commented Dec 5, 2024

I've found, that nearly all API from v2 is working on v3, there are alternatives for missing ones :

aladin.setZoom() -> aladin.view.setZoom()

pixels from canvas are accessible using :

ctx.drawImage(aladin.view.imageCanvas, 0, 0)

@tboch
Copy link
Collaborator

tboch commented Dec 6, 2024

aladin.setZoom() is now aladin.setFoV()

As for access to pixels, we will propose something a bit less messy than direct access to aladin.view.imageCanvas which might not be available in future versions.

@skybber
Copy link

skybber commented Dec 6, 2024

I've also noticed that aladin.gotoRaDec(..) does not instantly update the imageCanvas. Is there any mechanism to force an update immediately after gotoRaDec() ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants