healpy

Healpy map2alm and alm2map inconsistency?

旧时模样 提交于 2019-12-06 11:05:57
问题 I'm just starting to work with Healpy and have noticed that if I use a map to get alm's and then use those alm's to generate a new map, I do not get the map I started with. Here's what I'm looking at: import numpy as np import healpy as hp nside = 2 # healpix nside parameter m = np.arange(hp.nside2npix(nside)) # create a map to test alm = hp.map2alm(m) # compute alm's new_map = hp.alm2map(alm, nside) # create new map from computed alm's # Let's look at two maps print(m) [ 0 1 2 3 4 5 6 7 8 9

mollview: use matplotlib colormaps and change background color

眉间皱痕 提交于 2019-12-05 14:20:17
I'm trying to use others colormaps on healpy.mollview I succeded with this code from healpy import mollview from pylab import arange, show, cm m = arange(768) mollview(m, cmap=cm.bwr) show() but I get an unexpected blue background and there is no way I can set it to white healpy seems to make a modification to its default colormap to change what happens when the color is out of range. So, we need to do the same before we give cm.bwr to healpy . We can do this with cmap.set_under('w') to set the color to white. This seems like a bug in healpy to me, since this will affect most colormaps you try

Healpy map2alm and alm2map inconsistency?

此生再无相见时 提交于 2019-12-04 16:11:15
I'm just starting to work with Healpy and have noticed that if I use a map to get alm's and then use those alm's to generate a new map, I do not get the map I started with. Here's what I'm looking at: import numpy as np import healpy as hp nside = 2 # healpix nside parameter m = np.arange(hp.nside2npix(nside)) # create a map to test alm = hp.map2alm(m) # compute alm's new_map = hp.alm2map(alm, nside) # create new map from computed alm's # Let's look at two maps print(m) [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43