rcosmo (version 1.1.2)

geoArea.HPDataFrame: Geodesic area covered by a HPDataFrame

Description

Gives the surface on the unit sphere that is encompassed by all pixels in x.

Usage

# S3 method for HPDataFrame
geoArea(x)

Arguments

x

A HPDataFrame.

Value

The sum of the areas of all pixels (rows) in x.

Examples

Run this code
# NOT RUN {
## Generate random I for HPDataFrame
hp1 <- HPDataFrame(I=rnorm(5), nside = 1, spix = c(1,1,2,2,3))
pix(hp1)

## The total number of Healpix points at nside=1 equals 12. As hp1 has five
## I values at 3 Healpix points, then the occupied area is
## pi = 1/4*(surface area of unit sphere)

geoArea(hp1)
plot(hp1, size = 5, hp.boundaries = 1)

# }

Run the code above in your browser using DataLab