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

Fits images with positive CDELT1 value are not displayed #136

Closed
dsavchenko opened this issue Feb 29, 2024 · 6 comments
Closed

Fits images with positive CDELT1 value are not displayed #136

dsavchenko opened this issue Feb 29, 2024 · 6 comments
Labels

Comments

@dsavchenko
Copy link

dsavchenko commented Feb 29, 2024

Here is an example of the fits image that's not displayed.
It is created from scratch, using astropy. DS9 and fv read and display it properly.

The aladin-lite seems to recognise the WCS in the header (the view gets panned and zoomed to the proper sky region), but there is no image displayed regardless of the image settings (colormap etc.)
There isn't any unexpected output in the JS console.

Tried both https://aladin.cds.unistra.fr/AladinLite/ and an embedded instance.

@ManonMarchand
Copy link
Member

I can reproduce a strange behavior. The fits file does appear with these parameters though:

https://aladin.cds.unistra.fr/AladinLite/?target=17%2016%2002.275-15%2002%2022.48&fov=360.00&survey=CDS%2FP%2FDSS2%2Fcolor

Speculative thoughts:

  • that's a huge field of view (10°x10°) for a single source. Is there something strange with the WCS?
  • maybe something to do with the PV value at 45°? The default is 90° so maybe there's something to explore there on our side

@ManonMarchand
Copy link
Member

ManonMarchand commented Mar 6, 2024

May also be related to : #120
There are issues with reading fits images in Airy projection. If you make your fits image from scratch, can you try to convert it within astropy to one of the projection with no red crosses in the linked issue?

@dsavchenko
Copy link
Author

Thank you, @ManonMarchand, for your replies.

Seems that the problem isn't connected with WCS. Here is an example of another image that is created the same way but using a CAR projection, and aladin-lite either doesn't show it.

The point worth notice is that the value of the "max cut" in the layer settings is automatically set to 15 whereas the actual maximal value in the image is ~50. Probably, this somehow related to the datatype (however, I tried to save the same image with different dtypes, neither worked).

@ManonMarchand
Copy link
Member

Thanks for trying. Would you mind sharing the astropy snippet you wrote to create these fits images?

@bmatthieu3 : Tweaks on maxCut does not change the output

@dsavchenko
Copy link
Author

Got it! The images that aren't shown properly, the value of CDELT1 is positive. With negative value of it (so RA coordinate has conventional direction), everything works.

@ManonMarchand ManonMarchand changed the title Some fits images are not displayed Fits images with positive CDELT1 value are not displayed Mar 11, 2024
@bmatthieu3
Copy link
Collaborator

hi @dsavchenko - I fixed that, it was related to the webgl display method that do not draw triangles that are "backfacing" the view. I am using this culling backfacing to detect when triangles are crossing the view for specific allsky projections (aitoff, mercator) and hence I do not draw them.

I close this commit. The new beta/release versions that will be released will appear on this page: https://aladin.cds.unistra.fr/AladinLite/doc/release/

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

No branches or pull requests

3 participants