A small example code (that can swap with_extent True/False, and then zoom could be toggled True/False):
import numpy as np
import healpy as hp
import matplotlib.pyplot as plt
import skyproj
nside = 64
hpmap = np.arange(0, hp.nside2npix(nside), 1)
# mask some part of the sky for 'zoom' (otherwise zoom=True crashes)
ra, dec = hp.pix2ang(nside, hpmap, lonlat=True)
hpmap = hpmap.astype(float)
hpmap[np.where(dec > 60)] = hp.UNSEEN
with_extent = True
fig, ax = plt.subplots()
min_lat = np.degrees(np.arccos(np.finfo(float).resolution))
if with_extent:
sp = skyproj.LaeaSkyproj(ax=ax, lon_0=0, lat_0=-min_lat, extent = [0, 360, -min_lat, 85])
else:
sp = skyproj.LaeaSkyproj(ax=ax, lon_0=0, lat_0=-min_lat)
im, lon_raster, lat_raster, values_raster = sp.draw_hpxmap(hpmap, zoom=False)
This is with skyproj 2.0.3.
Trying to create a LaeaSkyproj plot I find that
extent, then:* using
zoom=Truein draw_hpxmap only shows half of the sky* using
zoom=Falsein draw_hpxmap results in a blank plotextent, then:* using
zoom=Trueshows half the sky, if extent covers less than the full sky.* using
zoom=Falseworks as expected.If
extentcovers the full sky, then this results in a "ValueError: Axis limits cannot be NaN or Inf". when callingdraw_hpxmap.A small example code (that can swap with_extent True/False, and then zoom could be toggled True/False):
I might also be missing axes labels?
This is with skyproj 2.0.3.