rcosmo (version 1.1.2)

downloadCMBPS: Download CMB Power Spectra from Planck Legacy Archive.

Description

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

Usage

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).

Value

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

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).

References

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

Examples

Run this code
# NOT RUN {
## 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,")")))


# }

Run the code above in your browser using DataLab