Questions tagged [healpy]

Healpy provides a python package to manipulate healpix maps. It is based on the standard numeric and visualisation tools for Python, Numpy and matplotlib.

Healpy provides a python package to manipulate healpix maps. It is based on the standard numeric and visualization tools for Python, Numpy, and matplotlib.

The documentation can be found at https://healpy.readthedocs.io/, tutorial at https://healpy.readthedocs.io/en/latest/tutorial.html.

147 questions
2
votes
1 answer

Can Healpy compute a bispectrum to study non-gaussianity of the CMB map?

Hell everyone, Can Healpy compute a bispectrum of the CMB map? It looks like there is no such built-in function in Healpy library. Thanks! All the best,
Han
  • 21
  • 1
2
votes
1 answer

How to turn healpy region into 2d array?

Basically all I want is the functionally of hp.cartview, but I don't want my machine to waste memory plotting the actual map every single time I call the cartview function. How can I obtain a cartesian projection in healpy in the form of a 2d array…
Jsn
  • 107
  • 6
2
votes
1 answer

Healpy query_polygon RuntimeError: Unknown exception

I'm using healpy.query_polygon to get a list of healpix indexes inside a polygon. According to the documentation: vertices: Vertex array containing the vertices of the polygon, shape (N, 3). But when I try to get all indexes from the following…
2
votes
2 answers

How does anafast take care of masking in healpy?

I am trying to compute angular power spectrum from a masked map using anafast in healpy. How does the python version of anafast take care of the effects of masking, compared to e.g., the F90 version, which explicitly takes the mask file as an…
Erwin Lau
  • 21
  • 2
2
votes
1 answer

Cls for fields generated with synalm disagree with input Cls and Cls for fields generated using synfast

I am generating random healpix maps from an input angular power spectrum Cl. If I use healpy.synalm, then healpy.alm2map, and finally test the map by running healpy.anafast on the generated map, the output and input power spectra do not agree,…
2
votes
0 answers

How can I write a healpix map?

I am trying to write a FITS file in the HEALPix format, using healpy and the following script: import healpy as hp fname = 'COM_CMB_IQU-100-fgsub-sevem_2048_R3.00_full.fits' map1 = hp.read_map(fname, field=[0], nest=True) map2 = hp.read_map(fname,…
2
votes
1 answer

Get coordinates for specific value on healpy mollview

Is it possible to find the coordinates for a specific value of a hitmap from a healpy mollview plot? For example: If I have a smoothed out hitmap and want to use the mask: mask = (hitmap > 2.054) & (hitmap < 2.056) to find the required values on of…
ML-Nielsen
  • 170
  • 6
2
votes
1 answer

healpy: Formatting subplots

I want to plot many subplots in one figure using healpy. How to: Set the position of the colorbar? Set the tick and ticklabel of colorbar? Set the position and size of the subplots? I want to generate a plot such as figure 1, which is…
2
votes
0 answers

Second derivatives of Healpy map

Is there a way in Healpy to get the second derivatives in theta and phi of a Healpy map? (ideally both the mixed derivative theta phi and the derivatives theta theta, phi phi) Something like the optional output der2 of the alm2map_der function…
johnhenry
  • 1,293
  • 5
  • 21
  • 43
2
votes
2 answers

Healpy - spin-2 map from random coefficients

I need to generate a Healpyx map (using Healpy) from random $a_{\ell m}$, for a spin-2 function. Schematically, this should look like that: import healpy as hp nside = 16 # for example for el in range(1, L+1): #loop over ell mode for m in…
johnhenry
  • 1,293
  • 5
  • 21
  • 43
2
votes
1 answer

Biased spectrum from increased lmax in function synfast of healpy

I played recently with the function synfast from healpy using python. More particularly I played with its parameter lmax which sets the maximum mode to be computed (default: lmax = 3*nside-1). I also used the ud_grade function as you will see. I…
2
votes
1 answer

How to convert and save healpy map to different coordinate system?

I have a healpix map with galactic coordinate. I would like to convert that map into equatorial coordinate system. I know that I could plot map in equatorial coordinate using mollview() function. Do you have any way to save such transformed map?…
vinu
  • 457
  • 4
  • 11
2
votes
1 answer

anaconda2 can not find GOMP_4.0

I am trying to use healpy the python implementation of HEALPiX. I'm on Ubuntu, using anaconda2. I pip install healpy==1.9.1 and check with conda list that it is installed, and that it is using the conda pip, not system. When I 'import healpy' I…
ben thorne
  • 61
  • 5
2
votes
0 answers

Strange patterns obtained with healpy mollweide projection

I am trying to plot 3 numpy arrays with healpy. Two of them correspond to angular positions theta and phi, and the other one is a temperature. I have used the information from this previous answer: Plotting a numpy array in healpy to do it, and I…
Darivadi
  • 23
  • 6
2
votes
0 answers

Scatter-plot using markers in heaply?

I am recently using healpy. I made the following scattered plot using 'projplot' and I have used markersize to define the size. Here is the plot: here the size of the circles are arrording tothe value Now I want to make the same figure with the…
Firstrain
  • 35
  • 5
1
2
3
9 10