Other Functions

signalproc module

This module contains functions for performing common digital signal processing tasks. Many are utilized by other modules within the package. In the context of the cmv and field modules, these functions are used primarily to calculate relationships between signals, specifically relative delays.

Signal Processing Functions

averaged_psd(input_tsig, navgs[, overlap, ...])

Calculate an averaged power spectral density for a signal.

averaged_tf(input_tsig, output_tsig, navgs)

Calculate a transfer function between two signals, along with their coherence.

correlation(baseline, estimation[, scaling])

Compute the cross correlation between two signals, including the full range of possible time lags.

tf_delay(tf, coh[, coh_limit, freq_limit, ...])

Compute the delay based on the phase of a transfer function

xcorr_delay(ts_in, ts_out[, scaling])

Compute the delay between two timeseries using cross correlation.

compute_delays(ts_in, ts_out[, mode, scaling])

Compute the delay between two sets of timeseries using cross correlation.

interp_tf(new_freq, input_tf)

Interpolate a transfer function in the frequency domain by magnitude and phase independently.

apply_delay(tf, delay)

Apply a time delay to a transfer function.

spatial module

Coordinates and Vector Projections

These functions are utilized as parts of the CMV and field modules. The first two are used to transform between latitude and longitude coordinates and a cartesian frame more suitable for use with the CMV and field routines. The remaining functions are used to perform vector operations on the field of points within the cartesian coordinate frame.

latlon2utm(lat, lon[, zone])

Convert a latitude/longitude pair from WGS84 into UTM coordinates.

utm2latlon(e, n, zone[, south])

Convert from UTM coordinates to latitude/longitude (WGS84)

project_vectors(vectors, dir_vector)

Convert a set of vectors into a list of distances in a given direction.

compute_vectors(x, y, refpt)

Compute a list of vectors pointing from a reference origin to each site.

compute_intersection(A, B)

Computes intersection, C, of the lines perpendicular to the tips of two vectors (A and B) who share a starting point at the origin.

Basic Vector Operations

The following functions are simply implementations of common vector operations that are utilized by other sections of the code. They are only included here for completeness.

dot(vec_a, vec_b)

Vector dot product for 2-D cartesian

unit(vec)

Get the unit vector matching a vector's direction

magnitude(vec)

Get the magnitude of a vector

pol2rect(r, theta)

2D polar vector to cartesian form

rect2pol(x, y)

2D cartesian vector to polar form

rotate_vector(vector, theta)

2D rotation of a vector in cartesian form

stats module

Variability Metrics

These functions represent metrics that are used to analyze variability.

variability_score(series[, tau, moving_avg, pct])

Compute the variability score as proposed by Lave et al. [1].

variability_index(ghi, clearsky[, ...])

Compute the variability index, defined by Stein et al. [1].

darr(series[, tau, moving_avg, pct])

Compute the Daily Aggregate Ramp Rate as described by Van Haaren et al. [1].

calc_quantile(timeseries[, n_days, quantile])

Calculate a single-day percentile-based summary of data by aggregating multiple days.

Basic Statistics

These are just implementations of basic statistical error calculations and are only included as shortcuts for the user.

rmse(baseline, estimation)

Computation of Root Mean Squared Error

mse(baseline, estimation)

Computation of Mean Squared Error

squared_error(baseline, estimation)

Time series of Squared Error

mae(baseline, estimation)

Computation of Mean Absolute Error

absolute_error(baseline, estimation)

Time series of Absolute Error

bias_error(baseline, estimation)

Time series of Bias Error

mbe(baseline, estimation)

Computation of Mean Bias Error

irradiance module

This module solely serves as a helper, wrapping the pvlib function pvlib.irradiance.clearsky_index, which doesn’t natively handle some of the data types used by this package.

Functions

clearsky_index(ghi, clearsky_ghi[, ...])

Wrapper for pvlib.irradiance.clearsky_index.