PVAnalytics

PVAnalytics is a python library that supports analytics for PV systems. It provides functions for quality control, filtering, and feature labeling and other tools supporting the analysis of PV system-level data.

The source code for PVAnalytics is hosted on github.

Contents

API Reference

Quality

Irradiance

The check_*_limits_qcrad functions use the QCRad algorithm 1 to identify irradiance measurements that are beyond physical limits.

quality.irradiance.check_ghi_limits_qcrad(…)

Test for physical limits on GHI using the QCRad criteria.

quality.irradiance.check_dhi_limits_qcrad(…)

Test for physical limits on DHI using the QCRad criteria.

quality.irradiance.check_dni_limits_qcrad(…)

Test for physical limits on DNI using the QCRad criteria.

All three checks can be combined into a single function call.

quality.irradiance.check_irradiance_limits_qcrad(…)

Test for physical limits on GHI, DHI or DNI using the QCRad criteria.

Irradiance measurements can also be checked for consistency.

quality.irradiance.check_irradiance_consistency_qcrad(…)

Check consistency of GHI, DHI and DNI using QCRad criteria.

GHI and POA irradiance can be validated against clearsky values to eliminate data that is unrealistically high.

quality.irradiance.clearsky_limits(measured, …)

Identify irradiance values which do not exceed clearsky values.

Gaps

Identify gaps in the data.

quality.gaps.interpolation_diff(x[, window, …])

Identify sequences which appear to be linear.

quality.gaps.stale_values_diff(x[, window, …])

Identify stale values in the data.

The following functions identify days with incomplete data.

quality.gaps.completeness_score(series[, …])

Calculate a data completeness score for each day.

quality.gaps.complete(series[, …])

Select data points that are part of days with complete data.

Many data sets may have leading and trailing periods of days with sporadic or no data. The following functions can be used to remove those periods.

quality.gaps.start_stop_dates(series[, days])

Get the start and end of data excluding leading and trailing gaps.

quality.gaps.trim(series[, days])

Mask the beginning and end of the data if not all True.

quality.gaps.trim_incomplete(series[, …])

Trim the series based on the completeness score.

Outliers

Functions for detecting outliers.

quality.outliers.tukey(data[, k])

Identify outliers based on the interquartile range.

quality.outliers.zscore(data[, zmax])

Identify outliers using the z-score.

quality.outliers.hampel(data[, window, …])

Identify outliers by the Hampel identifier.

Time

Quality control related to time. This includes things like time-stamp spacing, time-shifts, and time zone validation.

quality.time.spacing(times, freq)

Check that the spacing between times conforms to freq.

Weather

Quality checks for weather data.

quality.weather.relative_humidity_limits(…)

Identify relative humidity values that are within limits.

quality.weather.temperature_limits(…[, limits])

Identify temperature values that are within limits.

quality.weather.wind_limits(wind_speed[, limits])

Identify wind speed values that are within limits.

Features

Functions for detecting features in the data.

Clipping

Functions for identifying inverter clipping

features.clipping.levels(ac_power[, window, …])

Label clipping in AC power data based on levels in the data.

Clearsky

features.clearsky.reno(ghi, ghi_clearsky)

Identify times when GHI is consistent with clearsky conditions.

Time

The following functions can be used to differentiate night-time and day-time based on power or irradiance data. This is useful if you do not know the timezone of the index for your data or for verifying that the timezone is correct. Both functions identify the same feature, but in slightly different ways. features.daylight.frequency() is useful if your data has substantial outliers or other excessively large values; however, it may fail if substantial portions of the night-time data is greater than 0. features.daylight.level() can handle positive night-time data (so long as night-time values are substantially lower than day-time data) but may be more suceptible to large outliers.

features.daylight.frequency(power_or_irradiance)

Identify daytime periods based on frequency of positive data.

features.daylight.level(power_or_irradiance)

Identify daytime periods based on a minimum power/irradiance threshold.

References

1

C. N. Long and Y. Shi, An Automated Quality Assessment and Control Algorithm for Surface Radiation Measurements, The Open Atmospheric Science Journal 2, pp. 23-37, 2008.

Indices and tables