API reference

Submodules

RdTools is organized into submodules focused on different parts of the data analysis workflow.

analysis_chains

This module contains functions and classes for object-oriented end-to-end analysis

degradation

Functions for calculating the degradation rate of photovoltaic systems.

soiling

Functions for calculating soiling metrics from photovoltaic system data.

availability

Functions for detecting and quantifying production loss from photovoltaic system downtime events.

filtering

Functions for filtering and subsetting PV system data.

normalization

Functions for normalizing, rescaling, and regularizing PV system data.

aggregation

Functions for calculating weighted aggregates of PV system data.

clearsky_temperature

Functions for estimating clear-sky ambient temperature.

plotting

Functions for plotting degradation and soiling analysis results.

Analysis Chains

Object-oriented end-to-end analysis

analysis_chains.TrendAnalysis(pv[, ...])

Class for end-to-end degradation and soiling analysis using sensor_analysis() or clearsky_analysis()

analysis_chains.TrendAnalysis.set_clearsky([...])

Initialize values for a clearsky analysis which requires configuration of location and orientation details.

analysis_chains.TrendAnalysis.sensor_analysis([...])

Perform entire sensor-based analysis workflow.

analysis_chains.TrendAnalysis.clearsky_analysis([...])

Perform entire clear-sky-based analysis workflow.

analysis_chains.TrendAnalysis.plot_degradation_summary(...)

Return a figure of a scatter plot and a histogram summarizing degradation rate analysis.

analysis_chains.TrendAnalysis.plot_soiling_rate_histogram(...)

Return a histogram of soiling rates found in the stochastic rate and recovery soiling analysis

analysis_chains.TrendAnalysis.plot_soiling_interval(...)

Return a figure visualizing the valid soiling intervals used in stochastic rate and recovery soiling analysis.

analysis_chains.TrendAnalysis.plot_soiling_monte_carlo(...)

Return a figure visualizing the Monte Carlo of soiling profiles used in stochastic rate and recovery soiling analysis.

analysis_chains.TrendAnalysis.plot_pv_vs_irradiance(case)

Plot PV energy vs irradiance, useful in diagnosing things like timezone problems or transposition errors.

Degradation

Functions for calculating the degradation rate of photovoltaic systems.

degradation_classical_decomposition(...[, ...])

Estimate the trend of a timeseries using a classical decomposition approach (moving average) and calculate various statistics, including the result of a Mann-Kendall test and a Monte Carlo-derived confidence interval of slope.

degradation_ols(energy_normalized[, ...])

Estimate the trend of a timeseries using ordinary least-squares regression and calculate various statistics including a Monte Carlo-derived confidence interval of slope.

degradation_year_on_year(energy_normalized)

Estimate the trend of a timeseries using the year-on-year decomposition approach and calculate a Monte Carlo-derived confidence interval of slope.

Soiling

Functions for calculating soiling metrics from photovoltaic system data.

The soiling module is currently experimental. The API, results, and default behaviors may change in future releases (including MINOR and PATCH releases) as the code matures.

soiling_srr(energy_normalized_daily, ...[, ...])

Functional wrapper for SRRAnalysis.

monthly_soiling_rates(soiling_interval_summary)

Use Monte Carlo to calculate typical monthly soiling rates.

annual_soiling_ratios(...[, confidence_level])

Return annualized soiling ratios and associated confidence intervals based on stochastic soiling profiles from SRR.

SRRAnalysis(energy_normalized_daily, ...[, ...])

Class for running the stochastic rate and recovery (SRR) photovoltaic soiling loss analysis presented in Deceglie et al. JPV 8(2) p547 2018.

SRRAnalysis.run([reps, day_scale, ...])

Run the SRR method from beginning to end.

System Availability

Functions for detecting and quantifying production loss from photovoltaic system downtime events.

The availability module is currently experimental. The API, results, and default behaviors may change in future releases (including MINOR and PATCH releases) as the code matures.

AvailabilityAnalysis(power_system, ...)

A class to perform system availability and loss analysis.

AvailabilityAnalysis.run([low_threshold, ...])

Run the availability analysis.

AvailabilityAnalysis.plot()

Create a figure summarizing the availability analysis results.

Filtering

Functions for filtering and subsetting PV system data.

clip_filter(power_ac[, model])

Master wrapper for running one of the desired clipping filters.

quantile_clip_filter(power_ac[, quantile])

Filter data points likely to be affected by clipping with power or energy greater than or equal to 99% of the quant quantile.

logic_clip_filter(power_ac[, mounting_type, ...])

This filter is a logic-based filter that is used to filter out clipping periods in AC power or energy time series.

xgboost_clip_filter(power_ac[, mounting_type])

This function generates the features to run through the XGBoost clipping model, runs the data through the model, and generates model outputs.

csi_filter(poa_global_measured, ...[, threshold])

Filtering based on clear-sky index (csi)

poa_filter(poa_global[, poa_global_low, ...])

Filter POA irradiance readings outside acceptable measurement bounds.

tcell_filter(temperature_cell[, ...])

Filter temperature readings outside acceptable measurement bounds.

normalized_filter(energy_normalized[, ...])

Select normalized yield between low_cutoff and high_cutoff

Normalization

Functions for normalizing, rescaling, and regularizing PV system data.

energy_from_power(power[, target_frequency, ...])

Returns a regular right-labeled energy time series in units of Wh per interval from a power time series.

interpolate(time_series, target[, ...])

Returns an interpolation of time_series, excluding times associated with gaps in each column of time_series longer than max_timedelta; NaNs are returned within those gaps.

irradiance_rescale(irrad, irrad_sim[, ...])

Attempt to rescale modeled irradiance to match measured irradiance on clear days.

normalize_with_expected_power(pv, ...[, ...])

Normalize PV power or energy based on expected PV power.

normalize_with_pvwatts(energy, pvwatts_kws)

Normalize system AC energy output given measured poa_global and meteorological data.

normalize_with_sapm(energy, sapm_kws)

Deprecated since version 2.0.0.

pvwatts_dc_power(poa_global, power_dc_rated)

PVWatts v5 Module Model: DC power given effective poa poa_global, module nameplate power, and cell temperature.

sapm_dc_power(pvlib_pvsystem, met_data)

Deprecated since version 2.0.0.

delta_index(series)

Deprecated since version 2.0.0.

check_series_frequency(series, ...)

Deprecated since version 2.0.0.

Aggregation

Functions for calculating weighted aggregates of PV system data.

aggregation_insol(energy_normalized, insolation)

Insolation weighted aggregation

Clear-Sky Temperature

Functions for estimating clear-sky ambient temperature.

get_clearsky_tamb(times, latitude, longitude)

Estimates the ambient temperature at latitude and longitude for the given times using a Gaussian rolling window.

Plotting

Functions for plotting degradation and soiling analysis results.

degradation_summary_plots(yoy_rd, yoy_ci, ...)

Create plots (scatter plot and histogram) that summarize degradation analysis results.

soiling_monte_carlo_plot(soiling_info, ...)

Create figure to visualize Monte Carlo of soiling profiles used in the SRR analysis.

soiling_interval_plot(soiling_info, ...[, ...])

Create figure to visualize valid soiling profiles used in the SRR analysis.

soiling_rate_histogram(soiling_info[, bins])

Create histogram of soiling rates found in the SRR analysis.

availability_summary_plots(power_system, ...)

Create a figure summarizing the availability analysis results.

tune_filter_plot(signal, mask[, ...])

This function allows the user to visualize filtered data in a Plotly plot, after tweaking the function's different parameters.