pvlib / twoaxistracking

twoaxistracking is a python package for simulating two-axis tracking solar collectors, particularly self-shading.
http://twoaxistracking.rtfd.io/
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Return unshaded geometry #12

Closed AdamRJensen closed 1 year ago

AdamRJensen commented 2 years ago

Currently only the shaded_fraction gets returned by the shaded_fraction function:

    return shaded_fraction

However, for PV panels the power reduction is not necessarily proportional to the shaded area, due to mismatch losses. Therefore, it may be of interest to some users also to have access to the actual shaded geometry and from that calculate more specific mismatch losses. This could easily be achieved by also returning the unshaded_geometry:

return shaded_fraction, unshaded_geometry

@kanderso-nrel Thoughts on this?

kandersolar commented 2 years ago

Not opposed to returning unshaded_geometry. Maybe via a an optional return_geometry parameter so that it's only returned if requested?

AdamRJensen commented 2 years ago

Given that implementing this would not be a breaking change in the future, I will close this issue without addressing it.

Then, if users show interest in this feature in the future, it will be easy to implement.

AdamRJensen commented 1 year ago

One thing that would be a bit annoying in implementing this is that there are 4 return statements in the shaded_fraction function. So, there would need to be 4 if statements checking if return_geometry is true.