colored_sky
Generates a colored Perez sky and sun radiance definition for Radiance lighting simulations, supporting spectral or luminance modes and customizable solar position.
Instructions
Generate a colored Perez sky+sun Radiance definition.
mode 'spectra' (per-channel spectral scaling, runs gendaylit) or 'luminance' (Radiance -C built-in coloring, 3-channel only, pure emit). irrad_mode 'W' (direct+diffuse) or 'E' (global). diffuse_channels/direct_channels: 3 or 9 channel values (from spd_to_channels); ignored in luminance mode. lon is standard signed / EAST-positive (Seattle = -122.3, Athens = 23.73), matching raw EPW.
SOLAR POSITION. By default the sun is derived by gendaylit's own ephemeris from month/day/hour +
lat/lon/utc, and hour is read as a WALL-CLOCK instant. spectral_sky_from_epw's hour is a
different thing — an EPW hour-ENDING label, whose geometry is evaluated at the mid-interval
instant (hour - 0.5) because the row's DNI/DHI are averaged over the preceding hour. Passing the
same integer to both therefore puts the spectrum and the traced sky half an hour (7.5 deg of
diurnal arc) apart, with no error raised.
To keep them on one instant, pass that record's geometry through here VERBATIM:
sun_zenith_deg = record["geometry"]["zenith_deg"]
sun_azimuth_deg = record["geometry"]["azimuth_deg"]
Both are required together; supplied, they emit gendaylit's -ang form and make the record's
position authoritative for the traced geometry. Omitted, behaviour is unchanged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| day | No | ||
| lat | No | ||
| lon | No | ||
| run | No | ||
| utc | No | ||
| hour | No | ||
| mode | No | spectra | |
| name | No | sky | |
| globl | No | ||
| month | No | ||
| direct | No | ||
| diffuse | No | ||
| work_dir | No | ||
| irrad_mode | No | W | |
| channel_type | No | ||
| sun_zenith_deg | No | ||
| direct_channels | Yes | ||
| sun_azimuth_deg | No | ||
| diffuse_channels | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||