-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Discovered this when plotting TQU maps and saving them to file using enplot.write. The array itself remains unaffected, only the plot flips its x-parity.
from pixell import enmap, enplot, curvedsky, utils
import numpy as np
import healpy as hp
ls = np.arange(500)
ps = np.array([1.] + [1./l**2 for l in ls[1:]])
ps_tuple = (0*ps, 0*ps, 0*ps, ps)
alm = hp.synalm(ps_tuple)
box = np.array([[-5, 10], [5, -10]]) * utils.degree
shape, wcs = enmap.geometry(pos=box, res=0.5 * utils.arcmin, proj='car')
map = enmap.zeros((3,) + shape, wcs)
map = curvedsky.alm2map(alm, map)
for ip, p in enumerate("TQU"):
enplot.write(f"test_map_{p}", enplot.plot(map[ip], colorbar=True))
enplot.write(f"test_map_arr_{p}", enplot.plot(np.array(map)[ip], colorbar=True))
Resulting plots:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

