honeybee_plus.radiance.datatype module

Descriptors, factory classes etc for the Radiance library.

class honeybee_plus.radiance.datatype.RadianceBoolFlag(name, descriptive_name=None, default_value=None, is_dual_sign=False)[source]

Bases: honeybee_plus.radiance.datatype.RadianceDefault

This input is expected to a boolean value (i.e. True or False).

name

Required for all cases. Name of the flag, like ‘ab’ for ‘-ab 5’ in rtrace etc. Note that some of the radiance flags are actually keywords in python. For example -or in rcollate or -as in rtrace. In such cases the name of the flag should be specified as orX or asX respectively. Refer the rcollate definition for an example.

descriptive_name

This is the human-readable name of the flag. For example ‘ambient divisions’ for ‘ab’, ‘view file’ for ‘vf’ etc. These descriptions are usually available in the manual pages of Radiance. Although this is an optional input, for the purposes of debugging and readability, it is strongly suggested that this input be specified for all instances.

default_value

Optional. The value to be assigned in case no value is assigned by the user. If the default value is not specified then the attribute won’t be considered int the creation of the to_rad_string string representation of the component.

is_dual_sign

Set to True if the Boolean should return +/- value. (i.e. +I/-I) (Default: False)

class honeybee_plus.radiance.datatype.RadianceNumber(name, descriptive_name=None, valid_range=None, accepted_inputs=None, num_type=None, check_positive=False, default_value=None)[source]

Bases: honeybee_plus.radiance.datatype.RadianceDefault

This input is expected to be an integer or floating point number.

name

Required for all cases. Name of the flag, like ‘ab’ for ‘-ab 5’ in rtrace etc. Note that some of the radiance flags are actually keywords in python. For example -or in rcollate or -as in rtrace. In such cases the name of the flag should be specified as orX or asX respectively. Refer the rcollate definition for an example.

descriptive_name

This is the human-readable name of the flag. For example ‘ambient divisions’ for ‘ab’, ‘view file’ for ‘vf’ etc. These descriptions are usually available in the manual pages of Radiance. Although this is an optional input, for the purposes of debugging and readability, it is strongly suggested that this input be specified for all instances.

accepted_inputs

Optional. List of inputs that are permissible for a particular command option. For example, the -h flag in rcollate only accepts ‘i’ or ‘o’ as options. So, in cases where permissible inputs are known it is recommended that this input be specified.If the user-specified input doesn’t exist in _accepted_inputs then a value error will be raised.

valid_range

Optional. The valid range for several prominent radiance parameters is between 0 and 1. There are likely to be other parameters with similar valid ranges. If _valid_range is specified, a warning will be issued in case the provided input is not within that range.

check_positive

Optional. Check if the number should be greater than or equal to zero.

num_type

Optional. Acceptable inputs are float or int. If specified, the __set__ method will ensure that the value is stored in that type. Also, if the number changes (for example from 4.212 to 4 due to int being specified as _type_), then a warning will be issued.

default_value

Optional. The value to be assigned in case no value is assigned by the user. If the default value is not specified then the attribute won’t be considered int the creation of the to_rad_string string representation of the component.

class honeybee_plus.radiance.datatype.RadiancePath(name, descriptive_name=None, relative_path=None, check_exists=False, extension=None)[source]

Bases: honeybee_plus.radiance.datatype.RadianceDefault

This input is expected to be a file path.

(Attributes inherited from base-class are explained there.) .. attribute:: name

Required for all cases. Name of the flag, like ‘ab’ for ‘-ab 5’ in rtrace etc. Note that some of the radiance flags are actually keywords in python. For example -or in rcollate or -as in rtrace. In such cases the name of the flag should be specified as orX or asX respectively. Refer the rcollate definition for an example.

descriptive_name

This is the human-readable name of the flag. For example ‘ambient divisions’ for ‘ab’, ‘view file’ for ‘vf’ etc. These descriptions are usually available in the manual pages of Radiance. Although this is an optional input, for the purposes of debugging and readability, it is strongly suggested that this input be specified for all instances.

relative_path

Optional. Start folder for relative path. Default is None which returns absolute path.

check_exists

Optional. Check if the file exists. Useful in the case of input files such as epw files etc. where it is essential for those files to exist before the command executes.

extension

Optional. Test the extension of the file.

class honeybee_plus.radiance.datatype.RadianceReadOnly(name)[source]

Bases: object

A descriptor for creating Readonly values.

class honeybee_plus.radiance.datatype.RadianceTuple(name, descriptive_name=None, valid_range=None, accepted_inputs=None, tuple_size=None, num_type=None, default_value=None, test_type=True)[source]

Bases: honeybee_plus.radiance.datatype.RadianceDefault

This input is expected to be a numeric tuple like (0.5,0.3,0.2) etc.

(Attributes inherited from base-class are explained there.) .. attribute:: name

Required for all cases. Name of the flag, like ‘ab’ for ‘-ab 5’ in rtrace etc. Note that some of the radiance flags are actually keywords in python. For example -or in rcollate or -as in rtrace. In such cases the name of the flag should be specified as orX or asX respectively. Refer the rcollate definition for an example.

descriptive_name

This is the human-readable name of the flag. For example ‘ambient divisions’ for ‘ab’, ‘view file’ for ‘vf’ etc. These descriptions are usually available in the manual pages of Radiance. Although this is an optional input, for the purposes of debugging and readability, it is strongly suggested that this input be specified for all instances.

accepted_inputs

Optional. List of inputs that are permissible for a particular command option. For example, the -h flag in rcollate only accepts ‘i’ or ‘o’ as options. So, in cases where permissible inputs are known it is recommended that this input be specified.If the user-specified input doesn’t exist in _accepted_inputs then a value error will be raised.

valid_range

Optional. The valid range for several prominent radiance parameters is between 0 and 1. There are likely to be other parameters with similar valid ranges. If _valid_range is specified, a warning will be issued in case the provided input is not within that range.

tuple_size

Optional. Specify the number of inputs that are expected.

num_type

Optional. Acceptable inputs are float or int. If specified, the __set__ method will ensure that the value is stored in that type.

default_value

Optional. The value to be assigned in case no value is assigned by the user. If the default value is not specified then the attribute won’t be considered int the creation of the to_rad_string string representation of the component.

class honeybee_plus.radiance.datatype.RadianceValue(name, descriptive_name=None, accepted_inputs=None, default_value=None, is_joined=False)[source]

Bases: honeybee_plus.radiance.datatype.RadianceDefault

A Radiance string value.

name

Required for all cases. Name of the flag, like ‘ab’ for ‘-ab 5’ in rtrace etc. Note that some of the radiance flags are actually keywords in python. For example -or in rcollate or -as in rtrace. In such cases the name of the flag should be specified as orX or asX respectively. Refer the rcollate definition for an example.

descriptive_name

This is the human-readable name of the flag. For example ‘ambient divisions’ for ‘ab’, ‘view file’ for ‘vf’ etc. These descriptions are usually available in the manual pages of Radiance. Although this is an optional input, for the purposes of debugging and readability, it is strongly suggested that this input be specified for all instances.

accepted_inputs

Optional. List of inputs that are permissible for a particular command option. For example, the -h flag in rcollate only accepts ‘i’ or ‘o’ as options. So, in cases where permissible inputs are known it is recommended that this input be specified.If the user-specified input doesn’t exist in _accepted_inputs then a value error will be raised.

default_value

Optional. The value to be assigned in case no value is assigned by the user. If the default value is not specified then the attribute won’t be considered int the creation of the to_rad_string string representation of the component.

is_joined

Set to True if the Boolean should be returned as a joined output (i.e. -of, -od) (Default: False)

Usage:
o = RadianceValue(‘o’, ‘output format’, default_value=’f’,

accepted_inputs=(‘f’, ‘d’))