CMBDat: CMBDat class

Description Usage Arguments Value Examples

View source: R/CMBDat.R

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

1
CMBDat(filename, mmap = FALSE, spix)

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)

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Ensure you have a FITS file with the correct path
## before running the example:
## download a FITS file and use real data
# downloadCMBMap()
# cmbdat <- CMBDat("CMB_map_smica1024.fits", mmap = TRUE)
# class(cmbdat)
# str(cmbdat)

## View metadata
# cmbdat$header1
# cmbdat$header2
# cmbdat$resoln
# cmbdat$method
# cmbdat$coordsys
# cmbdat$nside
# cmbdat$hdr

rcosmo documentation built on Dec. 11, 2021, 9:29 a.m.