-
Notifications
You must be signed in to change notification settings - Fork 33
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
[api question] from_fits_image #167
Comments
How do you ensure that the resulting MOC covers the full pixels (not only pixels centers), regardless of the resolution you choose? But, to answer your specific question: among the 3 options, I tend to favor the last one, possibly degrading the MOC if Another solution may be to create a (Depending on the performances, a better option would be to use the footprint finder in #122 to get the STC-S footprint of the image and then compute the MOC from STC-S). |
We do not, I think it is a limitation indeed and maybe be we can add that to the doc. Something like, only pixels centers are unprojected and we assume a pixel roughly correspond to the healpix order in the sky. Your solution tackle the problem and is more accurate but indeed it may be a bit slow too (but the speed decrease can be acceptable, it is worth testing it I think in the future). |
There is also https://docs.astropy.org/en/stable/api/astropy.wcs.WCS.html#astropy.wcs.WCS.calc_footprint that could be useful? It gives the corners of the image in sky coordinates. |
Could it be an other example rather than a full feature? |
Holes in a MOC generated from an image is really not what a user would expect. Thus, I have a strong preference for a more accurate solution, even if detrimental to the overall speed. |
That could be an option, but you are then totally ignoring pixels with NaN values. |
This method creates a moc from a fits image. You have the possibility to pass a mask. With a mask, the algorithm will reproject to the sky only the pixels that are inside the mask. We then create the moc from all these skycoords (using from_lonlat/from_skycoord)
What order should we consider for the returning moc ?
What is currently done is the following:
The moc order is the min between the one given by the user and the healpix order corresponding to one pixel in the image. The last one is computed. I originally did that because if the user put an order of let's say 20, the resulting moc will have lots of holes around the small pixels i.e. the order is too precised for the image pixel size.
Other api options I see (I am sure there are other possibilities) would be:
The text was updated successfully, but these errors were encountered: