honeybee_radiance_folder.folderutil module¶
Utilities for Radiance folder structure.
- class honeybee_radiance_folder.folderutil.ApertureGroup(identifier, states)[source]¶
Bases:
DynamicScene
Representation of a Dynamic aperture in Radiance folder.
- Parameters:
identifier (str) – Text string for a unique dynamic aperture group identifier. This is required and cannot be None.
states – A list of aperture states.
- Properties:
identifier
states
- classmethod from_dict(input_dict)[source]¶
Create a dynamic aperture from a dictionary.
{ "south_window": [ { "identifier": "clear", "default": "./south_window..default..000.rad", "direct": "./south_window..direct..000.rad", "black": "./south_window..black.rad", "tmtx": "clear.xml", "vmtx": "./south_window..mtx.rad", "dmtx": "./south_window..mtx.rad" }, { "identifier": "diffuse", "default": "./south_window..default..001.rad", "direct": "./south_window..direct..001.rad", "black": "./south_window..black.rad", "tmtx": "diffuse50.xml", "vmtx": "./south_window..mtx.rad", "dmtx": "./south_window..mtx.rad" } ] }
- validate(folder, bsdf_folder)[source]¶
Validate aperture group.
- Parameters:
folder – Path to dynamic scene folder.
bsdf_folder – Path to BSDF folder.
- property state_count¶
Number of states.
- class honeybee_radiance_folder.folderutil.ApertureState(identifier, default, direct, black=None, tmtx=None, vmtx=None, dmtx=None)[source]¶
Bases:
SceneState
A state for a dynamic aperture from Radiance files.
This object parallels the honeybee-radiance
SubFaceState
inhoneybee-radiance
.- Parameters:
identifier (str) – Optional human-readable identifier for the state. Can be None.
default (str) – Path to file to be used for normal representation of the geometry.
direct (str) – Path to file to be used for direct studies.
black (str) – Path to file for blacking out the window.
tmtx (str) – Path to file for transmittance matrix.
vmtx (str) – Path to file for transmittance matrix.
dmtx (str) – Path to file for transmittance matrix.
- Properties:
identifier
default
direct
black
tmtx
vmtx
dmtx
- classmethod from_dict(input_dict)[source]¶
Create a state from an input dictionary.
{ "identifier": "clear", "default": "./south_window..default..000.rad", "direct": "./south_window..direct..000.rad", "black": "./south_window..black.rad", "tmtx": "clear.xml", "vmtx": "./south_window..mtx.rad", "dmtx": "./south_window..mtx.rad" }
- class honeybee_radiance_folder.folderutil.DynamicScene(identifier, states)[source]¶
Bases:
object
Representation of a Dynamic scene geometry in Radiance folder.
- Parameters:
identifier (str) – Text string for a unique dynamic scene group identifier. This is required and cannot be None.
states (list[SceneState]) – A list of scene states.
- Properties:
identifier
states
state_count
- classmethod from_dict(input_dict)[source]¶
Create a dynamic scene from a dictionary.
- Parameters:
input_dict – An input dictionary.
{ "ground": [ { "identifier": "grass_covered", "default": "ground..summer..000.rad", "direct": "ground..direct..000.rad" }, { "identifier": "snow_covered", "default": "ground..winter..001.rad", "direct": "ground..direct..000.rad" } ] }
- validate(folder)[source]¶
Validate this dynamic geometry.
- Parameters:
folder – Path to dynamic scene folder.
- property state_count¶
Number of states.
- class honeybee_radiance_folder.folderutil.SceneState(identifier, default, direct)[source]¶
Bases:
object
A state for a dynamic non-aperture geometry.
This object is parallels the
ShadeState
class inhoneybee-radiance
.- Parameters:
identifier (str) – Human-readable identifier for the state.
default (str) – Path to file to be used for normal representation of the geometry.
direct (str) – Path to file to be used for direct studies.
- Properties:
identifier
default
direct
- honeybee_radiance_folder.folderutil.add_output_spec_to_receiver(receiver_file, output_spec, output_file=None)[source]¶
Add output spec to a receiver file.
- Parameters:
receiver_file – Path to a receiver file. You can find these files under the
aperture_group
subfolder.output_spec – A string for receiver output spec.
output_file – An optional output file to write the modified receiver. By default this function overwrites the original file.
- honeybee_radiance_folder.folderutil.combined_receiver(grid_name, apt_group_folder, apt_groups, target_folder, add_output_header=True)[source]¶
Write combined receiver file for a grid and aperture groups.
The aperture group folder must be a relative path. Otherwise xform will fail when using the combined receiver file in simulations.
- Arg:
grid_name: A string of the grid name (identifier). apt_group_folder: Path to aperture group folder. apt_groups: A list of aperture groups to include in the combined receiver. target_folder: A path of the target folder to write files to. add_output_header: If set to True, a header will be added to redirect the
generated view matrix to the path specified through the “o= ..” option.
- Returns:
The path of the file that was written out as the combined receiver.
- honeybee_radiance_folder.folderutil.parse_aperture_groups(states_file, validate=True, bsdf_folder=None)[source]¶
Parse dynamic apertures from a states.json file.
- Parameters:
states_file – Path to states JSON file.
validate – Validate the files in states files exist in the folder.
bsdf_folder – Required for validation of tmtx. Not required if validate is set to False.
- Returns:
A list of dynamic apertures
- honeybee_radiance_folder.folderutil.parse_dynamic_scene(states_file, validate=True)[source]¶
Parse dynamic nonaperture geometries from a state file.
- Parameters:
states_file – Path to states JSON file.
- Returns:
A list of dynamic nonaperture geometries
- honeybee_radiance_folder.folderutil.parse_states(states_file)[source]¶
Parse states information from a json file.
This information typically contains the various rad files for each state such as ‘default’, ‘black’, ‘direct’, as well as matrix files such as ‘vmtx’, ‘tmtx’, and ‘dmtx’.
- Parameters:
states_file – Path to the states file.
- Returns:
A list containing the information about states.