pvfactors.geometry.base.PVSegment
- class pvfactors.geometry.base.PVSegment(illum_collection=<pvfactors.geometry.base.ShadeCollection object>, shaded_collection=<pvfactors.geometry.base.ShadeCollection object>, index=None)[source]
A PV segment will be a collection of 2 collinear and contiguous shade collections, a shaded one and an illuminated one. It inherits from
shapely.geometry.GeometryCollectionso that users can still call basic geometrical methods and properties on it, eg call length, etc.- __init__(illum_collection=<pvfactors.geometry.base.ShadeCollection object>, shaded_collection=<pvfactors.geometry.base.ShadeCollection object>, index=None)[source]
Initialize PV segment.
- Parameters
illum_collection (
ShadeCollection, optional) – Illuminated collection of the PV segment (Default = empty shade collection with no shading)shaded_collection (
ShadeCollection, optional) – Shaded collection of the PV segment (Default = empty shade collection with shading)index (int, optional) – Index of the PV segment (Default = None)
Methods
__init__([illum_collection, ...])Initialize PV segment.
cast_shadow(linestring)Cast shadow on PV segment using linestring: will rearrange the PV surfaces between the shaded and illuminated collections of the segment
cut_at_point(point)Cut PV segment at point if the segment contains it.
from_linestring_coords(coords[, shaded, ...])Create a PV segment with a single PV surface.
get_param_weighted(param)Get the parameter from the segment's surfaces, after weighting by surface length.
get_param_ww(param)Get the parameter from the segment's surfaces with weight, i.e. after multiplying by the surface lengths.
plot(ax[, color_shaded, color_illum, with_index])Plot the surfaces in the PV Segment.
update_params(new_dict)Update surface parameters in the collection.
Attributes
all_surfacesList of all the
pvfactors.geometry.base.PVSurfaceillum_collectionIlluminated collection of the PV segment.
n_surfacesNumber of surfaces in collection.
n_vectorSince shaded and illum surfaces are supposed to be collinear, this should return either surfaces' normal vector.
shaded_collectionShaded collection of the PV segment
shaded_lengthLength of the shaded collection of the PV segment.
surface_indicesIndices of the surfaces in the PV segment.