Question

Gnomview allows to visualize the gnomonic projection of a spherical map. How can I store the projection in a 2-dimensional numpy.ndarray? What's the healpy's equivalent of the map_out option of IDL's gnomview?

Was it helpful?

Solution

this was not supported in healpy, so I implemented it, you can check the development version of healpy from the github repository, then:

In [14]: hp.gnomview(np.arange(12), return_projected_map=True)
Out[14]: 
masked_array(data =
 [[ 4.  4.  4. ...,  4.  4.  4.]
 [ 4.  4.  4. ...,  4.  4.  4.]
 [ 4.  4.  4. ...,  4.  4.  4.]
 ..., 
 [ 4.  4.  4. ...,  4.  4.  4.]
 [ 4.  4.  4. ...,  4.  4.  4.]
 [ 4.  4.  4. ...,  4.  4.  4.]],
         mask = False,
   fill_value = -1.6375e+30)

the returned projected map is a 2d masked numpy array. This will be available in the next healpy version.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top