Learn R Programming

rcaiman (version 2.0.1)

cie_image: 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)

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.

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.

Examples

Run this code
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))

Run the code above in your browser using DataLab