Skip to content

Commit

Permalink
Merge 40f83a1 into 29c44c2
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Feb 25, 2019
2 parents 29c44c2 + 40f83a1 commit fee21ec
Show file tree
Hide file tree
Showing 23 changed files with 3,926 additions and 1,469 deletions.
13 changes: 13 additions & 0 deletions ladybug/comfort/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# coding=utf-8
"""Module for computing thermal comfort.
Properties:
SOLARCALSPLINES: A dictionary with two keys: 'standing' and 'seated'.
Each value for these keys is a 2D matrix of projection factors
for human geometry. Each row refers to an degree of azimuth and each
colum refers to a degree of altitude.
"""

from ._loadmannequin import load_solarcal_splines

SOLARCALSPLINES = load_solarcal_splines()
23 changes: 23 additions & 0 deletions ladybug/comfort/_loadmannequin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# coding=utf-8
"""Load data that accounts for human geometry.
This includes mannequin geometry and solarcal splines.
"""

from ..futil import csv_to_num_matrix

from os.path import dirname, abspath
import inspect


def load_solarcal_splines():
try:
cur_dir = dirname(abspath(inspect.getfile(inspect.currentframe())))
solarcal_splines = {
'seated': csv_to_num_matrix(cur_dir + '/mannequindata/seatedspline.csv'),
'standing': csv_to_num_matrix(cur_dir + '/mannequindata/standingspline.csv')}
except IOError:
solarcal_splines = {}
print ('Failed to import projection factor splines from CSV.'
'\nA simpler interoplation method for Solarcal will be used.')
return solarcal_splines

0 comments on commit fee21ec

Please sign in to comment.