rcosmo (version 1.1.2)

pix.CMBDataFrame: HEALPix pixel indices from CMBDataFrame

Description

If new.pix is unspecified then this function returns the vector of HEALPix pixel indices from a CMBDataFrame. If new.pix is specified then this function returns a new CMBDataFrame with the same number of rows as cmbdf, but with pix attribute new.pix. Thus, new.pix must have length equal to nrow(cmbdf).

Usage

# S3 method for CMBDataFrame
pix(x, new.pix, ...)

Arguments

x

A CMBDataFrame.

new.pix

Optional vector of pixel indices with length equal to nrow(x).

...

Unused arguments.

Value

The vector of HEALPix pixel indices or, if new.pix is specified, a new CMBDataFrame.

Examples

Run this code
# NOT RUN {
## First download the map
# downloadCMBMap(foreground = "smica", nside = 1024)
# df <- CMBDataFrame("CMB_map_smica1024.fits", sample.size = 800000)
# pix(df)

df <- CMBDataFrame(nside = 16, sample.size = 10, ordering = "nested")
pix(df)

# }

Run the code above in your browser using DataLab