honeybee_radiance.postprocess.annualglare module

Functions for post-processing imageless annual glare outputs.

Note: These functions will most likely be moved to a separate package in the near future.

honeybee_radiance.postprocess.annualglare.glare_autonomy(dgp_file, occ_pattern, glare_threshold=0.4, total_hours=None)[source]

Compute glare autonomy for a given result file.

Parameters
  • dgp_file – Path to a dgp file generated by Radiance. The dgp file should be tab separated and shot NOT have a header. The results for each sensor point should be available in a row and and each column should be the DGP value for a sun_up_hour. The number of columns should match the number of sun up hours.

  • occ_pattern – A list of 0 and 1 values for hours of occupancy.

  • glare_threshold – Threshold DGP level for glare autonomy. Default: 0.4.

  • total_hours – An integer for the total number of occupied hours in the occupancy schedule. If None, it will be assumed that all of the occupied hours are sun-up hours and are already accounted for in the the occ_pattern.

Returns

A list of glare autonomy values. Number of results in each list matches the number of lines in dgp input file.

honeybee_radiance.postprocess.annualglare.glare_autonomy_from_folder(results_folder, schedule=None, glare_threshold=0.4, grids_filter='*')[source]

Compute glare autonomy for a folder.

This folder is an output folder of imageless annual glare recipe. Folder should include grids_info.json and sun-up-hours.txt - the script uses the list in grids_info.json to find the result files for each sensor grid.

Parameters
  • results_folder – Results folder.

  • schedule – An annual schedule for 8760 hours of the year as a list of values.

  • glare_threshold – Threshold DGP level for glare autonomy. Default: 0.4.

  • grids_filter – A pattern to filter the grids. By default all the grids will be processed.

Returns

Tuple[List] - There will be a list for each input sensor grid. Number of results in each list matches the number of lines in ill input file.

honeybee_radiance.postprocess.annualglare.glare_autonomy_to_file(dgp_file, occ_pattern, output_folder, glare_threshold=0.4, grid_name=None, total_hours=None)[source]

Compute glare autonomy for an dgp file and write the results to a folder.

This function generates 1 file for glare autonomy.

Parameters
  • dgp_file – Path to an dgp file generated by Radiance. The dgp file should be tab separated and shot NOT have a header. The results for each sensor point should be available in a row and and each column should be the daylight glare probability value for a sun_up_hour. The number of columns should match the number of sun up hours.

  • occ_pattern – A list of 0 and 1 values for hours of occupancy.

  • output_folder – An output folder where the results will be written to. The folder will be created if not exist.

  • glare_threshold – A fractional number for the threshold of DGP above which conditions are considered to induce glare. Default: 0.4.

  • grid_name – An optional name for grid name which will be used to name the output files. If None the name of the input file will be used.

  • total_hours – An integer for the total number of occupied hours in the occupancy schedule. If None, it will be assumed that all of the occupied hours are sun-up hours and are already accounted for in the the occ_pattern.

Returns

file.ga

honeybee_radiance.postprocess.annualglare.glare_autonomy_to_folder(results_folder, schedule=None, glare_threshold=0.4, grids_filter='*', sub_folder='metrics')[source]

Compute annual glare autonomy in a folder and write them in a subfolder.

This folder is an output folder of imageless annual glare recipe. Folder should include grids_info.json and sun-up-hours.txt - the script uses the list in grids_info.json to find the result files for each sensor grid.

Parameters
  • results_folder – Results folder.

  • schedule – An annual schedule for 8760 hours of the year as a list of values.

  • glare_threshold – A fractional number for the threshold of DGP above which conditions are considered to induce glare. Default: 0.4.

  • grids_filter – A pattern to filter the grids. By default all the grids will be processed.

  • sub_folder – An optional relative path for subfolder to copy results files. Default: metrics

Returns

str – Path to results folder.