geoArea.HPDataFrame: Geodesic area covered by a 'HPDataFrame'

Description Usage Arguments Value Examples

View source: R/HPDataFrame.R

Description

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

Usage

1
2
## S3 method for class 'HPDataFrame'
geoArea(x)

Arguments

x

A HPDataFrame.

Value

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

Examples

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

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