honeybee_plus.radiance.sky.sunmatrix module¶
-
class
honeybee_plus.radiance.sky.sunmatrix.
SunMatrix
(location, solar_values, sun_up_hours, hoys)[source]¶ Bases:
honeybee_plus.radiance.sky._skyBase.RadianceSky
Radiance direct sun matrix.
This class generates a sky matrix similar to gendaymtx -5 with the difference that unlike gendaymtx that uses the approximate position of the sun it uses the exact sun position for each timestep.
A SunMatrix is climate-based and is generated based on radiation values from wea or epw file.
It is useful to calculate accurate direct sunlight for an annual study and is usually used in combination with Analemma. See usage for a sample use case.
- Parameters
wea – An instance of ladybug Wea.
north – An angle in degrees between 0-360 to indicate north direction (Default: 0).
hoys – The list of hours for generating the sky matrix (Default: 0..8759)
output_type – Specify 0 for visible radiation, 1 for total solar radiation.
suffix – An optional suffix for sky name. The suffix will be added at the end of the standard name. Use this input to customize the new and avoid sky being overwritten by other skymatrix components.
-
solar_values
¶ A list of radiance values for each sun_up_hour. These values can be visible or total solar radiation based on output_type input.
-
sun_up_hours
¶ List of sun up hours as hours of the year. Values will be between 0..8759.
Usage:
from honeybee_plus.radiance.sky.sunmatrix import SunMatrix working_dir = “.” epwfile = r”./USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw” sunmtx = sun_matrix.from_epw_file(epwfile, north=20) # write SunMatrix file sunmtx.execute(working_dir)
analemma = sun_matrix.analemma(north=20) # write analemma analemma.execute(working_dir) …
-
analemma
(north=0, is_leap_year=False)[source]¶ Get an Analemma based on this SunMatrix.
Analemma is a static representation of SunMatrix. You can use Analemma to generate two files which works hand in hand with SunMatrix for annual simulation.
-
execute
(working_dir)[source]¶ Generate sun matrix.
- Parameters
working_dir – Folder to execute and write the output.
- Returns
Full path to sun_matrix.
-
classmethod
from_epw_file
(epw_file, north=0, hoys=None, output_type=0)[source]¶ Create sun matrix from an epw file.
-
classmethod
from_wea
(wea, north=0, hoys=None, output_type=0, is_leap_year=False)[source]¶ Create sun matrix.
- Parameters
wea – An instance of ladybug Wea.
north – An angle in degrees between 0-360 to indicate north direction (Default: 0).
hoys – The list of hours for generating the sky matrix (Default: 0..8759)
output_type – Specify 0 for visible radiation, 1 for total solar radiation.
-
property
hoys
¶ List of all hours in SunMatrix as hours of the year.
-
property
isSunMatrix
¶ Return True.
-
property
is_climate_based
¶ Return True if the sky is generated from values from weather file.
-
property
location
¶ SunMatrix location.
-
property
output_header
¶ Sun matrix file header output.
-
property
solar_values
¶ List of radiance values for each sun_up_hour.
These values can be visible or total solar radiation based on output_type input.
-
property
sun_up_hours
¶ List of sun up hours as hours of the year.
-
property
sunmtx_file
¶ Sun matrix file.