Commit 0b2cfa0a authored by Niklas Uwe Langner's avatar Niklas Uwe Langner
Browse files

[healpytools] allow rotation_axis shape of (3,) in rotate_map

parent 0026b4e7
Pipeline #216586 passed with stages
in 4 minutes and 33 seconds
......@@ -270,6 +270,7 @@ def rotate_map(healpy_map, rotation_axis, rotation_angle):
:param rotation_angle: rotation angle in radians, either float or array size n
:return: rotated healpy map, same shape as input healpy map or shape (n, npix)
"""
rotation_axis = coord.atleast_kd(rotation_axis, 2)
nside, npix = hp.get_nside(healpy_map), len(healpy_map)
n_ang, n_ax = np.size(rotation_angle), np.shape(rotation_axis)[-1]
assert (n_ang == n_ax) or (np.min([n_ang, n_ax]) == 1), "Rotation axes and angles dimensions not compatible."
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment