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.GeometryCollection
so 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_surfaces
List of all the
pvfactors.geometry.base.PVSurface
illum_collection
Illuminated collection of the PV segment.
n_surfaces
Number of surfaces in collection.
n_vector
Since shaded and illum surfaces are supposed to be collinear, this should return either surfaces' normal vector.
shaded_collection
Shaded collection of the PV segment
shaded_length
Length of the shaded collection of the PV segment.
surface_indices
Indices of the surfaces in the PV segment.