prospect.utils

prospect.utils.beta(a: float, b: float, **kwargs)scipy.stats._distn_infrastructure.rv_frozen[source]

Create a fixed beta distribution.

Parameters
  • a (float) – Shape parameters

  • b (float) – Shape parameters

Returns

Fixed beta distribution

Return type

rv_frozen

prospect.utils.clip_lines_polys(lines_polys: geopandas.geodataframe.GeoDataFrame, by: geopandas.geodataframe.GeoDataFrame)geopandas.geodataframe.GeoDataFrame[source]

Subset a GeoDataFrame of lines or polygons based on the boundaries of another GeoDataFrame.

Parameters
  • lines_polys (geopandas GeoDataFrame) – Features to be clipped

  • by (geopandas GeoDataFrame) – Boundaries to use for clipping

Returns

A subset of the original lines_polys

Return type

geopandas GeoDataFrame

References

Earth Analytics Python course, https://doi.org/10.5281/zenodo.2209415

prospect.utils.clip_points(points: geopandas.geodataframe.GeoDataFrame, by: geopandas.geodataframe.GeoDataFrame)geopandas.geodataframe.GeoDataFrame[source]

Subset a GeoDataFrame of points based on the boundaries of another GeoDataFrame.

Parameters
  • points (geopandas GeoDataFrame) – Point features to be clipped

  • by (geopandas GeoDataFrame) – Boundaries to use for clipping

Returns

A subset of the original points

Return type

geopandas GeoDataFrame

References

Earth Analytics Python course, https://doi.org/10.5281/zenodo.2209415

prospect.utils.truncnorm(mean: float, sd: float, lower: float, upper: float)scipy.stats._distn_infrastructure.rv_frozen[source]

Create a truncated normal distribution.

Parameters
  • mean (float) – Mean of distribution

  • sd (float) – Standard deviation of the distribution

  • lower (float) – Lower bound

  • upper (float) – Upper bound

Returns

Fixed truncated normal distribution

Return type

rv_frozen