-
-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
The docs state
def get_interp_val(m, theta, phi, nest=False, lonlat=False):
"""
Drop-in replacement for healpy `~healpy.pixelfunc.get_interp_val`.
"""
Here is a MWE showing differences between the two when using phi from -pi to pi:
import numpy as np
import healpy as hpy
from astropy_healpix import healpy as hpx
import matplotlib.pyplot as plt
step_deg = 1
grid_azimuth, grid_polar = np.meshgrid(
np.deg2rad(np.arange(-180., 180 + 0.1, step_deg)),
np.deg2rad(np.arange(0.0, 180 + 0.1, step_deg)),
)
polar, azimuth = grid_polar.ravel(), grid_azimuth.ravel()
npix = 192
m = np.arange(npix)
grid_hpx = hpx.get_interp_val(m, polar, azimuth).reshape(*grid_azimuth.shape)
grid_hpy = hpy.get_interp_val(m, polar, azimuth).reshape(*grid_azimuth.shape)
Results:
np.any(np.isnan(grid_hpx)), np.any(np.isnan(grid_hpy)) # (True, False)
Metadata
Metadata
Assignees
Labels
No labels