Learn R Programming

rcosmo (version 1.1.6)

CMBDat: CMBDat class

Description

The function CMBDat creates objects of class CMBDat. These are lists containing header information and other metadata as well as an element called data, whose columns may include, for example, the intensity (I), polarisation (Q, U), PMASK and TMASK. It also may contain an mmap object that points to the CMB map data table in the FITS file.

Usage

CMBDat(filename, mmap = FALSE, spix)

Value

A list containing header information and other metadata as well as an element called data where: If mmap = FALSE then a data.frame is included, named data, whose columns may include, for example, the intensity (I), polarisation (Q, U), PMASK and TMASK. If mmap = TRUE then a mmap object is returned that points to the CMB map data table in the FITS file.

Arguments

filename

The path to the fits file.

mmap

A boolean indicating whether to use memory mapping.

spix

The sample pixels (rows) to read from the FITS file binary data table (optional)

Examples

Run this code
filename <- system.file("extdata", "CMB_testmap.fits", package = "rcosmo")
cmbdat <- CMBDat(filename, spix = 1:10)
class(cmbdat)
cmbdat$nside
cmbdat$ordering
head(cmbdat$data)

Run the code above in your browser using DataLab