pix2coords: Convert pixel indices to cartesian/spherical coordinates

Description Usage Arguments Value Examples

View source: R/Conversion.R

Description

Convert HEALPix pixel indices to cartesian or spherical coordinates

Usage

1
pix2coords(nside, coords = "cartesian", ordering = "nested", spix)

Arguments

nside

the nside parameter (integer number 2^k)

coords

'cartesian' or 'spherical' coordinates

ordering

'ring' or 'nested' ordering

spix

optional integer or vector of sample pixel indices

Value

a data.frame with columns 'x', 'y', 'z' (cartesian) or 'theta', 'phi' (spherical)

Examples

1
2
pix2coords(nside=1, spix=c(2,5))
pix2coords(nside=1,  coords = "spherical", spix=c(2,5))

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