downloadCMBPS: Download CMB Power Spectra from Planck Legacy Archive.

Description Usage Arguments Details Value References Examples

View source: R/Downloaders.R

Description

The function downloadCMBPS downloads CMB power spectra components from http://pla.esac.esa.int/pla/#cosmology.

Usage

1
downloadCMBPS(link = 1, destfile, save = TRUE)

Arguments

link

The link code (an integer from 1 to 6) for the URL to download the file. See code details in this help file.

destfile

A character string with the file name for the downloaded file to be saved. Tilde-expansion is performed.

save

A boolean indicating whether to save or not (since the downloaded data is returned anyway).

Details

link = 1: Best-fit LCDM CMB power spectra from the baseline Planck TT, TE, EE+lowE+lensing (2 <= ell <= 2508).

link = 2: Baseline high-ell Planck TT power spectra (2 <= ell <= 2508).

link = 3: Baseline high-ell Planck EE power spectra (2 <= ell <= 1996).

link = 4: Baseline high-ell Planck TE power spectra (2 <= ell <= 1996).

link = 5: Low-ell Planck EB power spectra (2 <= ell <= 29).

link = 6: Low-ell Planck BB power spectra (2 <= ell <= 29).

Value

The Data Frame with CMB Power Spectra and, if save = TRUE a txt file is saved in destfile

References

Planck Legacy Archive http://pla.esac.esa.int/pla/#cosmology

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Download the Low-ell Planck BB power spectra (2 <= ell <= 29) and
## save it to C:/PW.txt
# downloadCMBPS(link=6, destfile="C:/PW.txt")

## Download the Best-fit LCDM CMB power spectra
## and plot it
# CMBPS <- downloadCMBPS(link=1, save = FALSE)
# plot(CMBPS$L,CMBPS$TT, type="o",col="red",cex=0.3,
#      main="CMB Angular Power Spectra",xlab=expression(l),
#      ylab=expression(paste(D[l],"(",mu,K^2,")")))

rcosmo documentation built on Feb. 14, 2020, 5:06 p.m.