I am extracting part of a bigger Healpy array with cartview like this:
cartmap = hp.cartview(map, lonra=lonra, latra=latra, return_projected_map=True, xsize=xsize, ysize=ysize)
print(ysize,xsize,cartmap.shape)
where I have specified lonra, latra, xsize and ysize before. If, xsize,ysize < 2000, everything is fine, the above code prints:
785 1131 (785, 1131)
If, however, they are bigger than 2000 I find this:
1571 2263 (1389, 2000)
So the size seems to be limited to 2000, but keeps the aspect ratio. Is there a way to force cartview() to use my xsize & ysize, i.e. to keep the image like the original on the pixel level?
PS: In the healpy source code at https://github.com/healpy/healpy/blob/master/healpy/visufunc.py I couldn't find anything about this arbitrary threshold of 2000, neither does the documentation say anything about it.
Is it possible that you are using and old version of healpy
?
It looks like there used to be a limit of 2000 pixels that was removed few months ago, see:
https://github.com/healpy/healpy/commit/2aaa5ba79db8d16aad036b387ff8771838d7768f