Learn R Programming

rcosmo (version 1.1.6)

downloadCMBMap: Download CMB Maps from Planck Public Data Release.

Description

The function downloadCMBMap downloads CMB maps from https://irsa.ipac.caltech.edu/data/Planck/release_2/all-sky-maps/matrix_cmb.html.

Usage

downloadCMBMap(foreground = "smica", nside = 1024, destfile, release = 2)

Value

The integer status code from utils::download.file, returned invisibly (0 indicates success). The FITS map is saved to destfile and can be read with CMBDataFrame.

Arguments

foreground

A string naming the foreground separation method pipeline. Please choose one of "COMMANDER", "NILC", "SEVEM" or "SMICA" (not case sensitive).

nside

An integer. The nside parameter (resolution) required. The available options are 1024 or 2048.

destfile

A required character string with an explicit path and file name for the downloaded file. No default destination is used. Tilde-expansion is performed.

release

An integer. Indicates the Planck map release to download. Currently only 2 and 3 are supported.

Details

CMB maps have been produced by the COMMANDER, NILC, SEVEM, and SMICA pipelines, respectively.

For each pipeline, the intensity maps are provided at Nside = 2048, at 5 arcmin resolution, and the polarization maps are provided at Nside = 1024 at 10 arcmin resolution.

References

Planck Public Data Release 2 Maps https://irsa.ipac.caltech.edu/data/Planck/release_2/all-sky-maps/matrix_cmb.html

Other fits maps can also be downloaded using the general command download.file.

Examples

Run this code
## Requires internet access and downloads a large FITS file.
if (interactive()) {
  dest <- tempfile(fileext = ".fits")
  downloadCMBMap(foreground = "smica", nside = 1024, destfile = dest)
  sky <- CMBDataFrame(dest, spix = 1:10)
  unlink(dest)
}

Run the code above in your browser using DataLab