cie_image: CIE sky image

View source: R/cie_image.R

cie_imageR Documentation

CIE sky image

Description

Generate an image of relative radiance or luminance based on the CIE General Sky model.

Usage

cie_image(z, a, sun_angles, sky_coef)

Arguments

z

terra::SpatRaster generated with zenith_image().

a

terra::SpatRaster generated with azimuth_image().

sun_angles

named numeric vector of length two, with components z and a in degrees, e.g., c(z = 49.3, a = 123.1). See estimate_sun_angles() for details.

sky_coef

numeric vector of length five. Parameters of the CIE sky model.

Value

terra::SpatRaster with one layer whose pixel values represent relative luminance or radiance across the sky hemisphere, depending on whether the data used to obtain sky_coef was luminance or radiance.

Note

Coefficient sets and formulation are available in cie_table.

Examples

z <- zenith_image(50, lens())
a <- azimuth_image(z)
sky_coef <- cie_table[4,1:5] %>% as.numeric()
sun_angles <- c(z = 45, a = 0)
plot(cie_image(z, a, sun_angles, sky_coef))

rcaiman documentation built on Sept. 9, 2025, 5:42 p.m.