honeybee_radiance.lightsource.sky.sunmatrix module

Generate a point-in-time climate-based sky.

class honeybee_radiance.lightsource.sky.sunmatrix.SunMatrix(wea, north=0)[source]

Bases: object

Annual Climate-based Sun matrix.

The output of SkyMatrix is similar to using command Radiance’s gendaymtx command with -n -D options. The options are available in Radiance 5.3 and after that. For more information see gendaymtx documentation.

https://www.radiance-online.org/learning/documentation/manual-pages/pdfs/gendaymtx.pdf

Parameters:
  • wea – A Ladybug wea object.

  • north – A number between -360 and 360 for the counterclockwise difference between the North and the positive Y-axis in degrees. 90 is West and 270 is East (Default: 0)

Properties:
  • wea

  • location

  • north

  • is_point_in_time

  • is_climate_based

classmethod from_dict(input_dict)[source]

Create the sky from a dictionary.

Parameters:

input_dict – A python dictionary in the following format

{
    'type': 'SunMatrix',
    'wea': {},
    'north': 0.0  # optional
}
north_from_vector(north_vector)[source]

Automatically set the north property using a Vector2D.

Parameters:

north_vector – A ladybug_geometry Vector2D for the north direction

to_dict()[source]

Translate this matrix to a dictionary.

to_file(folder, name=None, hoys=None, mkdir=False)[source]

Write matrix to a Radiance file.

This method also writes the wea information to a .wea file.

Parameters:
  • folder – Target folder.

  • name – File name.

  • hoys – Optional list of hoys to filter the hours of the wea. If None, this object’s wea will be used as-is. Note that you may not want to use this input if this object’s wea is not annual since an exception will be raised if a given hoy is not found in the wea. (Default: None).

  • mkdir – A boolean to note if the directory should be created if doesn’t exist (default: False).

Returns:

Full path to the newly created file.

to_radiance(output_type=1, wea_file=None, output_name=None)[source]

Return Radiance command to generate the sky.

Note that you need to write the wea to a file (in.wea) before running this command.

Alternatively you can use write method which will write the wea data to a file.

Parameters:
  • output_type – An integer between 0 to 1 for output type. * 0 = output in W/m2/sr visible * 1 = output in W/m2/sr solar (default)

  • wea_file – Path to wea file (default: in.wea).

  • output_name – A name for output files (default: suns).

write_wea(folder='.', name=None, hoys=None)[source]

Write wea to a file.

Parameters:
  • folder – Path to target folder (Default: ‘.’).

  • name – Optional name for the wea file (Default: in.wea)

  • hoys – Optional list of hoys to filter the hours of the wea. If None, this object’s wea will be used as-is. Note that you may not want to use this input if this object’s wea is not annual since an exception will be raised if a given hoy is not found in the wea. (Default: None).

Returns:

Path to wea file.

property is_climate_based

Return True if the sky is created based on values from weather data.

property is_point_in_time

Return True if the sky is generated for a single point in time.

property location

Location information for sky matrix.

property north

Get and set north direction.

A number between -360 and 360 for the counterclockwise difference between the North and the positive Y-axis in degrees. 90 is West and 270 is East.

property wea

Get and set wea.