honeybee_plus.radiance.recipe.recipedcutil module

A collection of useful methods for daylight-coeff recipes.

honeybee_plus.radiance.recipe.recipedcutil.coeff_matrix_commands(output_name, receiver, rad_files, sender, points_file=None, number_of_points=None, rfluxmtx_parameters=None)[source]

Returns radiance commands to create coefficient matrix.

Parameters
  • output_name – Output file name.

  • receiver – A radiance file to indicate the receiver. In view matrix it will be the

  • group and in daylight matrix it will be the sky. (window) –

  • rad_files – A collection of Radiance files that should be included in the scene.

  • sender – A collection of files for senders if senders are radiance geometries such as window groups (Default: ‘-‘).

  • points_file – Path to point file which will be used instead of sender.

  • number_of_points – Number of points in points_file as an integer.

  • rfluxmtx_parameters – Radiance parameters for Rfluxmtx command using a RfluxmtxParameters instance (Default: None).

honeybee_plus.radiance.recipe.recipedcutil.create_reference_map_command(view, view_file, outputfolder, octree_file)[source]

Create a reference map to conver illuminance to luminance.

honeybee_plus.radiance.recipe.recipedcutil.final_matrix_addition(skymtx, skydirmtx, sunmtx, output)[source]

Add final sky, direct sky and sun matrix.

honeybee_plus.radiance.recipe.recipedcutil.final_matrix_addition_radiation(skydifmtx, sunmtx, output)[source]

Add final diffuse sky and sun matrix.

honeybee_plus.radiance.recipe.recipedcutil.get_commands_radiation_sky(project_folder, sky_matrix, reuse=True, simplified=False)[source]

Get list of commands to generate the skies.

1. sky matrix diffuse 3. sun matrix (aka analemma)

This methdo genrates sun matrix under project_folder/sky and return the commands to generate sky number 1.

Returns a namedtuple for (output_files, commands) output_files in a namedtuple itself (sky_mtx_total, sky_mtx_direct, analemma,

sunlist, analemmaMtx).

Simplified method will only calculate radiation under patched sky.

honeybee_plus.radiance.recipe.recipedcutil.get_commands_scene_daylight_coeff(project_name, sky_density, project_folder, skyfiles, inputfiles, points_file, total_point_count, rfluxmtx_parameters, reuse_daylight_mtx=False, total_count=1, radiation_only=False, transpose=False, simplified=False)[source]

Get commands for the static windows in the scene.

Use get_commands_w_groups_daylight_coeff to get the commands for the rest of the scene.

Parameters
  • project_name – A string to generate uniqe file names for this project.

  • sky_density – Sky density for this study.

  • project_folder – Path to project_folder.

  • skyfiles – Collection of path to sky files. The order must be (sky_mtx_total, sky_mtx_direct, analemma, sunlist, analemmaMtx). You can use get_commands_sky function to generate this list.

  • inputfiles – Input files for this study. The order must be (opqfiles, glzfiles, wgsfiles, extrafiles). Each files object is a namedtuple which includes filepath to radiance files under fp and filepath to backed out files under fpblk.

  • points_file – Path to points_file.

  • total_point_count – Number of total points inside points_file.

  • rfluxmtx_parameters – An instance of rfluxmtx_parameters for daylight matrix.

  • reuse_daylight_mtx – A boolean not to include the commands for daylight matrix calculation if they already exist inside the folder.

honeybee_plus.radiance.recipe.recipedcutil.get_commands_sky(project_folder, sky_matrix, reuse=True)[source]

Get list of commands to generate the skies.

  1. total sky matrix

  2. direct only sky matrix

  3. sun matrix (aka analemma)

This methdo genrates sun matrix under project_folder/sky and return the commands to generate skies number 1 and 2.

Returns a namedtuple for (output_files, commands) output_files in a namedtuple itself (sky_mtx_total, sky_mtx_direct, analemma,

sunlist, analemmaMtx).

honeybee_plus.radiance.recipe.recipedcutil.get_commands_w_groups_daylight_coeff(project_name, sky_density, project_folder, window_groups, skyfiles, inputfiles, points_file, total_point_count, rfluxmtx_parameters, reuse_daylight_mtx=False, total_count=1, radiation_only=False, transpose=False)[source]

Get commands for the static windows in the scene.

Use get_commands_w_groups_daylight_coeff to get the commands for the rest of the scene.

Parameters
  • project_name – A string to generate uniqe file names for this project.

  • sky_density – Sky density for this study.

  • project_folder – Path to project_folder.

  • window_groups – List of window_groups.

  • skyfiles – Collection of path to sky files. The order must be (sky_mtx_total, sky_mtx_direct, analemma, sunlist, analemmaMtx). You can use get_commands_sky function to generate this list.

  • inputfiles – Input files for this study. The order must be (opqfiles, glzfiles, wgsfiles, extrafiles). Each files object is a namedtuple which includes filepath to radiance files under fp and filepath to backed out files under fpblk.

  • points_file – Path to points_file.

  • total_point_count – Number of total points inside points_file.

  • rfluxmtx_parameters – An instance of rfluxmtx_parameters for daylight matrix.

  • reuse_daylight_mtx – A boolean not to include the commands for daylight matrix calculation if they already exist inside the folder.

honeybee_plus.radiance.recipe.recipedcutil.image_based_view_coeff_matrix_commands(receiver, rad_files, sender, view_info_file, view_file, view_rays_file, rfluxmtx_parameters=None)[source]

Returns radiance commands to create coefficient matrix.

Parameters
  • receiver – A radiance file to indicate the receiver. In view matrix it will be the

  • group and in daylight matrix it will be the sky. (window) –

  • rad_files – A collection of Radiance files that should be included in the scene.

  • sender – A collection of files for senders if senders are radiance geometries such as window groups (Default: ‘-‘).

  • points_file – Path to point file which will be used instead of sender.

  • number_of_points – Number of points in points_file as an integer.

  • sampling_rays_count – Number of sampling rays (Default: 1000).

  • rfluxmtx_parameters – Radiance parameters for Rfluxmtx command using a RfluxmtxParameters instance (Default: None).

honeybee_plus.radiance.recipe.recipedcutil.image_based_view_matrix_calculation(view, wg, state, sky_matrix, extention='', digits=3)[source]
honeybee_plus.radiance.recipe.recipedcutil.image_based_view_sampling_commands(project_folder, view, view_file, vwrays_parameters)[source]

Return VWrays command for calculating view coefficient matrix.

honeybee_plus.radiance.recipe.recipedcutil.imaged_based_sun_coeff_matrix_commands(output_filename_format, view, view_rays_file, scene_files, analemma, sunlist)[source]
honeybee_plus.radiance.recipe.recipedcutil.matrix_calculation(output, v_matrix=None, t_matrix=None, d_matrix=None, sky_matrix=None)[source]

Get commands for matrix calculation.

This method sets up a matrix calculations using Dctimestep.

honeybee_plus.radiance.recipe.recipedcutil.rgb_matrix_file_to_ill(input, output, transpose=False)[source]

Convert rgb values in matrix to illuminance values.

honeybee_plus.radiance.recipe.recipedcutil.sky_receiver(filepath, density, ground_file_format=None, sky_file_format=None)[source]

Create a receiver sky for daylight coefficient studies.

honeybee_plus.radiance.recipe.recipedcutil.skymtx_to_gendaymtx(sky_matrix, target_folder)[source]

Return gendaymtx command based on input sky_matrix.

honeybee_plus.radiance.recipe.recipedcutil.sun_coeff_matrix_commands(output, point_file, scene_files, analemma, sunlist, irradiance_calc)[source]

Return commands for calculating analemma coefficient.

Parameters
  • output – Output daylight coefficient file (e.g. suncoeff.dc).

  • point_file – Path to point / analysis grid file. In case of multiple grid put them together in a single file.

  • scene_files – A list fo scene files. Usually black scene.

  • analemma – Path to analemma file. You can generate analemma file using sun_matrix class. Analemma has list of sun positions with their respective values.

  • sunlist – Path to sunlist. Use sun_matrix to generate sunlist.

  • simulation_type

Returns

octree and rcontrib commands ready to be executed.

honeybee_plus.radiance.recipe.recipedcutil.sun_matrix_calculation(output, dc_matrix=None, sky_matrix=None)[source]

Get commands for sun matrix calculation.

This method sets up a matrix calculations using Dctimestep.

honeybee_plus.radiance.recipe.recipedcutil.window_group_to_receiver(filepath, upnormal, material_name='vmtx_glow', angle_basis='Kelms Full')[source]

Take a filepath to a window group and create a receiver.

honeybee_plus.radiance.recipe.recipedcutil.write_rad_files_daylight_coeff(working_dir, project_name, opq, glz, wgs)[source]

Write files to a target directory for daylight coefficeint method.

The files will be written under

working_dir/opaque working_dir/glazing working_dir/wgroup

Parameters
  • working_dir – Path to working directory.

  • opq – A RadFile for opaque surfaces.

  • glz – A RadFile for glazing surfaces.

  • wgs – A collection of RadFiles for window-groups.

Returns

A named tuple for each RadFile as (fp, fpblk) fp returns the file path to the list of radiance files. fpblk returns the file path to the list of blacked radiance files.