How display a mollview projection of CAMB output fits file ?

In summary, the conversation discusses the issue of displaying a Mollview projection of a FITS file from the CAMB program using IDL. The speaker has tried various methods, such as using the mollview function and the mapview and skyviewer programs, but has encountered errors. They suspect that the data in the FITS file may not be a map, but rather a power spectrum. The expert suggests using the Healpix synfast program to generate a map from the power spectrum and then using a program like map2tga or mollview to display it.
  • #1
fab13
312
6
hi,

i want to display into IDL a mollview projection of the output fits file ('test_scalCls.fits') of CAMB program (Code for Anisotropies in the Microwave Background) but can't get it.

I have IDL ASTRO, Healpix_2.11c and WMAP librairies and i tried several things:

1*/

HIDL> mollview, 'test_scalCls.fits', /silent

returns :

% VEC2PIX_RING: Invalid Nside -1
% Execution halted at: VEC2PIX_RING 71 /usr/local/Healpix_2.11c/src/idl/toolkit/vec2pix_ring.pro
% DATA2MOLL 242 /usr/local/Healpix_2.11c/src/idl/visu/data2moll.pro
% MOLLVIEW 492 /usr/local/Healpix_2.11c/src/idl/visu/mollview.pro
% $MAIN$

2*/

read_fits_map, 'test_scalCls.fits', map, hdr, xhdr, NSIDE=nside

It seems i get the data in the "map" array but i don't know how to use these data in order to display a mollview projection.

3*/

I found this thread: https://www.physicsforums.com/showthread.php?t=279764, so i did :

fits_reproj_healpix, 'test_scalCls.fits', 'moll_last.fits', size=1, proj='Mol'

returns :

% FITS_REPROJ_HEALPIX: WARNING - SKYCOORD keyword not found in header
% FITS_REPROJ_HEALPIX: WARNING - Native Galactic coordinates assumed
% GET_HEAL_LUT: Reading the look-up table mollweide_h10s_lut.fits
We do not support the selected resolution...
Number of input pixels: 2001
N_Pixels, Resolution: 2001 -1
% FITS_REPROJ_HEALPIX: Map resolution too high or low for the current look-up tables...
% Execution halted at: FITS_REPROJ_HEALPIX 106 /home/fab/WMAP/pro/fits_reproj_healpix.pro
% FITS_REPROJ_HEALPIX 106 /home/fab/WMAP/pro/fits_reproj_healpix.pro
% $MAIN$

---------------------------------------------------------------------------------------------------------------------------------------

4*/ I tried to display it with mapview but it fails :

HIDL> mapview
% Compiled module: MAPVIEW.
MAPVIEW v1.3 (07 Jul 2004) -- WMAP project HEALPix map viewer
% Compiled module: XREGISTERED.
% Compiled module: NPIX2NSIDE.
Waiting for file name to be input
% Compiled module: LOADCT.
% Compiled module: FILEPATH.
% LOADCT: Loading table RAINBOW
% Compiled module: FSC_FILESELECT.
% Compiled module: CW_BGROUP.
% Compiled module: EULER_MATRIX_NEW.
% Compiled module: HEALPIX_TO_IMAGE.
% Compiled module: GET_HEAL_LUT.
% Compiled module: CONCAT_DIR.
% Compiled module: READFITS.
% Compiled module: SXPAR.
% Compiled module: GETTOK.
% Compiled module: VALID_NUM.
% Compiled module: GET_HEAL_RES.
% Compiled module: XMANAGER.
HIDL>
% Compiled module: VEC2ANG.
% Compiled module: ANG2PIX_NEST.
% Compiled module: NSIDE2NPIX.
% Compiled module: INIT_XY2PIX.
HIDL>
Reading /home/fab/test_scalCls.fits
% Compiled module: FITS_OPEN.
% Compiled module: SXDELPAR.
% Compiled module: FITS_READ.
% Compiled module: FITS_CLOSE.
% Compiled module: TBINFO.
% Compiled module: FXPAR.
0
% Compiled module: TBGET.
% Compiled module: TAG_EXIST.
% Compiled module: LOADCT_012.
% LOADCT: Loading table RAINBOW
We do not support the selected resolution...
Number of input pixels: 2001
Map resolution too high or low for the current look-up tables...
N_Pixels, Resolution: 2001 -1
% Stop encountered: HEALPIX_TO_IMAGE 111 /home/fab/WMAP/pro/healpix_to_image.pro

------------------------------------------------------------------------------------------------------------------------------------

5*/ i tried with skyviewer and ds9 too, in vain.


Thanks for your help !
 
Space news on Phys.org
  • #2
So, it's looking like the data you stored in the "map" file isn't actually a map. With npixels = 2001, I'm willing to bet that this is the power spectrum, not a map (which would make sense, as this is CAMB's primary task).

If you want to display a typical map that you would get from this power spectrum, then you need to do the following:

1. Read in the power spectrum as a power spectrum (not a Healpix map).
2. Generate a random set of alm's from that power spectrum.
3. Perform a spherical harmonic transform to produce the map that is represented by the generated alm's.
4. Display the map.

Now, I don't personally use IDL for these tasks. I instead use the command-line tools offered by Healpix. For example, I would make use of the Healpix synfast program to perform steps 1-3 (you can use the interactive mode or use a parameter file). This will output a Healpix map in .fits format, which can then be displayed. Usually I use the map2tga program that comes with the Healpix C++ code, though map2gif will work just as well, as will the mollview code you have above.
 

Related to How display a mollview projection of CAMB output fits file ?

1. What is a mollview projection?

A mollview projection is a type of map projection commonly used in astronomy and cosmology to display data from spherical objects, such as the Earth or the cosmic microwave background radiation. It presents a view of the entire sphere in an oval shape, with the center corresponding to the poles and the edges corresponding to the equator.

2. What is a CAMB output fits file?

A CAMB output fits file is a data file generated by the computer code CAMB (Code for Anisotropies in the Microwave Background), which is used to calculate the evolution of the universe and the power spectrum of cosmic microwave background radiation. The fits file contains the results of these calculations, such as the temperature and polarization maps of the cosmic microwave background.

3. How do I display a mollview projection of a CAMB output fits file?

To display a mollview projection of a CAMB output fits file, you will need to use a specialized software for data visualization, such as HEALPix or DS9. These programs allow you to open the fits file and choose the type of projection you want to display, including the mollview projection. You can then adjust the settings and save the image as a file or export it for further analysis.

4. What are the advantages of using a mollview projection for CAMB output?

One of the main advantages of using a mollview projection for CAMB output is that it provides a global view of the entire sky, making it easier to identify patterns and structures in the data. It also preserves the relative sizes and shapes of the features, which can be distorted in other types of map projections. Additionally, the mollview projection is conformal, meaning that it preserves the angles between different points on the map, which is useful for accurately representing data on a spherical surface.

5. Can a mollview projection be used for other types of data besides CAMB output?

Yes, a mollview projection can be used for any type of data that is spherical in nature. This includes data from other astrophysical sources, such as galaxies or star clusters, as well as data from other fields, such as geology or meteorology. However, it is important to note that the mollview projection is most commonly used for displaying data from the cosmic microwave background, as it is well suited for this type of data.

Back
Top