Closed AdamRJensen closed 2 years ago
I can't do a full review today, but after a quick look it seems like shading_geometries
is a sometimes a Polygon and sometimes a list of Polygons. Would it be better to return a list in all cases, and that list is empty for cases with no shading geometries (e.g. sun below horizon)?
I can't do a full review today, but after a quick look it seems like
shading_geometries
is a sometimes a Polygon and sometimes a list of Polygons. Would it be better to return a list in all cases, and that list is empty for cases with no shading geometries (e.g. sun below horizon)?
But of course. Your sharp mind strikes again!
Thanks for the review @kanderso-nrel 🙏
Closes #12
This PR adds a parameter called
return_geometries
to theshaded_fraction
function. When this parameter is True, the function returns a tuple(shading_fraction, geometries)
, wheregeometries
is a dictionary containing the unshaded area and the shading areas. Whenreturn_geometries
is False, only the shading fraction is returned (default behavior).The PR also removes the
total_collector_area
from therectangular_geometry
andcircular_geometry
in order to simplify the tests.