pix.CMBDataFrame: HEALPix pixel indices from 'CMBDataFrame'

Description Usage Arguments Value Examples

View source: R/CMBDataFrameGenerics.R

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

1
2
## S3 method for class '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

1
2
3
4
5
6
7
## 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)

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