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

Grid structure in large mosaics #133

Open
intheobservingzone opened this issue Oct 23, 2018 · 1 comment
Open

Grid structure in large mosaics #133

intheobservingzone opened this issue Oct 23, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@intheobservingzone
Copy link

intheobservingzone commented Oct 23, 2018

Hola, hola,

I've trying to build large plots based on DeCAPS color images available at Aladin and the displayed plots show an unwanted grid-diamond structure. The code is very plain, based in a "hips" example:

from astropy.coordinates import SkyCoord
from hips import WCSGeometry, make_sky_image
# Compute the sky image
geometry = WCSGeometry.create(
    skydir=SkyCoord(330., 3.000, unit='deg', frame='galactic'),
    width=2000, height=2000, fov="2.0 deg",
    coordsys='galactic', projection='AIT',
)
hips_survey = 'CDS/P/DECaPS/DR1/color'
result = make_sky_image(geometry=geometry, hips_survey=hips_survey,
                precise='yes', tile_format='png')

# Draw the sky image
import matplotlib.pyplot as plt
ax = plt.subplot(projection=geometry.wcs)
ax.imshow(result.image, origin='lower')
ax.set_xlabel("Gal. longitude [deg]")
ax.set_ylabel("Gal. latitude [deg]")
plt.savefig('zzz.png', dpi=600)

plt.show()

The image result is attached. Depending of the resolution of the image or the size, the grid is not the same, even changing color from white to red, etc. The diamonds look like healpix tesselation. I've added the "precise=yes" in make_sky_image, without improvements. I'm using Python 3.6 with fresh Anaconda3-5.3, in Mac Mojave. Thank you very much in advance. All the best.

image

@adl1995
Copy link
Member

adl1995 commented Nov 3, 2018

The grid structure you observe is not actually HEALPix tessellation, but a bug in our drawing algorithm. Currently, we sum up all the tiles which leads to bright lines around the edges.

@cdeil - If you have time, we can continue the discussion in (#79) and I will try to get this fixed.

@cdeil cdeil self-assigned this Dec 13, 2018
@cdeil cdeil added the bug label Dec 13, 2018
@cdeil cdeil added this to the 0.3 milestone Dec 13, 2018
@cdeil cdeil assigned adl1995 and unassigned cdeil Dec 13, 2018
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