honeybee_radiance.postprocess.annualdaylight module

Functions for post-processing annual daylight outputs.

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

honeybee_radiance.postprocess.annualdaylight.metrics(ill_file, occ_pattern, threshold=300, min_t=100, max_t=3000, total_hours=None, sun_down_occ_hours=0)[source]

Compute annual metrics for a given result file.

Parameters:
  • ill_file – Path to an ill file generated by Radiance. The ill 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 illuminance 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.

  • threshold – Threshold illuminance level for daylight autonomy. Default: 300.

  • min_t – Minimum threshold for useful daylight illuminance. Default: 100.

  • max_t – Maximum threshold for useful daylight illuminance. Default: 3000.

  • 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.

  • sun_down_occ_hours – An integer for the total number of occupied hours where the sun is down. This is often needed to properly tally all hours that have illuminance below the threshold.

Returns:

Tuple(List, List, List, List, List) – 5 lists for daylight autonomy, continuous daylight autonomy, lower than useful daylight illuminance, useful daylight illuminance and higher than useful daylight illuminance. Number of results in each list matches the number of lines in ill input file.

honeybee_radiance.postprocess.annualdaylight.metrics_from_folder(results_folder, schedule=None, threshold=300, min_t=100, max_t=3000, grids_filter='*')[source]

Compute annual metrics for a folder.

This folder is an output folder of annual daylight 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.

  • threshold – Threshold illuminance level for daylight autonomy. Default: 300.

  • min_t – Minimum threshold for useful daylight illuminance. Default: 100.

  • max_t – Maximum threshold for useful daylight illuminance. Default: 3000.

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

Returns:

Tuple[Tuple] - There will be a tuple for each input sensor grid which is a Tuple(List, List, List, List, List) – 5 lists for daylight autonomy, continuous daylight autonomy, lower than useful daylight illuminance, useful daylight illuminance and higher than useful daylight illuminance. Number of results in each list matches the number of lines in ill input file.

honeybee_radiance.postprocess.annualdaylight.metrics_to_files(ill_file, occ_pattern, output_folder, threshold=300, min_t=100, max_t=3000, grid_name=None, total_hours=None, sun_down_occ_hours=0)[source]

Compute annual metrics for an ill file and write the results to a folder.

This function generates 5 different files or daylight autonomy, continuous daylight autonomy, lower than useful daylight illuminance, useful daylight illuminance and higher than useful daylight illuminance.

Parameters:
  • ill_file – Path to an ill file generated by Radiance. The ill 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 illuminance 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.

  • threshold – Threshold illuminance level for daylight autonomy. Default: 300.

  • min_t – Minimum threshold for useful daylight illuminance. Default: 100.

  • max_t – Maximum threshold for useful daylight illuminance. Default: 3000.

  • 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.

  • sun_down_occ_hours – An integer for the total number of occupied hours where the sun is down. This is often needed to properly tally all hours that have illuminance below the threshold.

Returns:

Tuple(file.da, file.cda, file.luid, file.uid, file.hudi)

honeybee_radiance.postprocess.annualdaylight.metrics_to_folder(results_folder, schedule=None, threshold=300, min_t=100, max_t=3000, grids_filter='*', sub_folder='metrics')[source]

Compute annual metrics in a folder and write them in a subfolder.

This folder is an output folder of annual daylight 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.

  • threshold – Threshold illuminance level for daylight autonomy. Default: 300.

  • min_t – Minimum threshold for useful daylight illuminance. Default: 100.

  • max_t – Maximum threshold for useful daylight illuminance. Default: 3000.

  • 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.