The Cosmic Microwave Background (CMB) is remnant electromagnetic radiation from the epoch of recombination. It is the most ancient important source of data about the early universe and the key to unlocking the mysteries of the Big Bang and the structure of time and space. Spurred on by a wealth of satellite data, intensive investigations in the past few years have resulted in many physical and mathematical results to characterize CMB radiation. An advanced R programming toolkit is needed to help statisticians perform CMB data analytics.
rcosmo
addresses various data processing and statistical analysis needs for the present generation of CMB experiments. These needs fall into the following broad categories:
- Importing and transforming HEALPix data in convenient CMBDataFrames
- Geometric tools
- Statistical tools
- Visualisation
The current version of rcosmo
includes the following functionality:
- Generation of a comprehensive data frame of CMB observations, which include HEALPix indices, metadata, CMB intensities and their corresponding spherical and/or cartesian coordinates, as well as polarization data
- Window subsetting tools for investigating circular, convex and non-convex polygonal sub-regions on the sphere
- Fast empirical covariance and variogram estimation
- Implementation and analysis of spherical harmonics, spherical wavelets, etc
- Various methods for CMB map visualization, such as interactive 3D full sky maps rendered with OpenGL, Mollweide projection and HEALPix boundary plotting
- Spherical geometry tools such as shortest distance between two points, calculate spherical angles, shortest distance between a point and a region, etc
First install the devtools package:
install.packages("devtools")
Then, if using Microsoft Windows, install the latest RTools from CRAN at this link here if it is not already installed on your device. Then use devtools to install rcosmo:
devtools::install_github("frycast/rcosmo")
If you did not install RTools and are using RStudio then you will be prompted to install RTools. After installing RTools you should run devtools::install_github("frycast/rcosmo")
again.
install.packages("devtools")
library(devtools)
find_rtools()
source("https://raw.githubusercontent.com/r-lib/remotes/master/install-github.R")$value("r-lib/remotes")
remotes::install_github("frycast/rcosmo")
- Kriging (e.g. for equatorial region)
- 2D projection Mollweide view
- Provide common intensity unit conversions (K_CMB <-> K_RJ <-> MJy/sr). See here.
- official plank colourmap
- style guide plots
- Source of maps.
- All Sky Maps are in HEALPix format, with Nside 1024 or 2048, in Galactic coordinates, and NESTED ordering. Source.
- Signal given in units of Kcmb for 30-353 GHz (microwave is in this band).
- Unpolarized maps have 2 planes: I_Stokes (intensity) and TMASK.
- Polarized maps have 5 planes: I_Stokes (intensity), Q_Stokes and U_Stokes (linear polarization), PMASK and TMASK.
- File names look like:
- COM_CMB_IQU-smica_1024_R2.02_full.fits
- COM_CMB_IQU-smica-field-Int_2048_R2.01_full.fits
'R2.02' indicates Nside 1024, at 10 arcmin resolution, with polarisation.
'R2.01' indicates Nside 2048, at 5 arcmin resolution, with intensity only.
'SMICA' indicates SMICA pipeline (others: COMMANDER, NILC, SEVEM).
- FITS Standard
- Data analysis methods for CMB
- How to make maps from CMB data without losing information
- CMB and astrophysical component maps wiki
- NASA Planck knowledge base
- Original paper and discussion.
- An important errata and notes on original paper
- License info
- Information page
- NASA information page
- healpy (python) documentation page
- C++ documentation
- Installing HEALPix (NASA)
- C subroutines
- See more details on all the following packages here
- S4 Generics in 15 Pages, More or Less
- Rcpp, Advanced R, book by Hadley Wickham
- Making R packages, book by Hadley Wickham
- Rcpp Gallery
- Adding Rcpp to a package that uses roxygen2
- Installing package from private GitHub repo using PAT
- R startup, Renviron details, Efficient R book
- Great R packages tutorial which includes python and C++
- Astropy, editing FITS and more.
- rpython, run python code from R
- rpy2-R in Python
- Jupyter with the IR Kernel: Using R with Jupyter Notebooks