Statistics

Arithmetic routines

Functions for various arithmetic calculations.

rcatool.stats.arithmetics.run_mean(x, N[, mode])

Calculate running mean

ASoP

Analyzing Scales of Precipitation.

rcatool.stats.ASoP.asop(data[, keepdims, ...])

Calculate ASoP parameters.

rcatool.stats.ASoP.bins_calc(n[, bintype])

Calculates bins with edges according to Eq.

Bootstrapping

Routines for bootstrap calculations.

rcatool.stats.bootstrap.block_bootstr(data)

Calculate block bootstrap samples.

Climate indices

Routines for various climate index calculations.

rcatool.stats.climateindex.hotdays_calc(...)

Calculate number of hotdays.

rcatool.stats.climateindex.extr_hotdays_calc(...)

Calculate number of extreme hotdays.

rcatool.stats.climateindex.tropnights_calc(data)

Calculate number of tropical nights.

rcatool.stats.climateindex.ehi(data, thr_95)

Calculate Excessive Heat Index (EHI).

rcatool.stats.climateindex.cdd(data[, thr, ...])

Calculate the Consecutive Dry Days index (CDD).

rcatool.stats.climateindex.Rxx(data[, thr, ...])

Rxx mm, count of any time units (days, hours, etc) when precipitation ≥ xx mm: Let RRij be the precipitation amount on time unit i in period j.

rcatool.stats.climateindex.RRpX(data, percentile)

RRpX mm, total amount of precipitation above the percentile threshold pX; RR ≥ pX mm: Let RRij be the daily precipitation amount on day i in period j.

rcatool.stats.climateindex.RRtX(data, thr[, ...])

RRtX mm, total amount of precipitation above the threshold 'thr'.

rcatool.stats.climateindex.SDII(data[, thr, ...])

SDII, Simple pricipitation intensity index: Let RRwj be the daily precipitation amount on wet days, w (RR ≥ 1mm) in period j.

Convolution

This module includes functions to perform convolution, for example image smoothing, using scipy’s convolution routines.

rcatool.stats.convolve.kernel_gen(n[, ...])

Function to create a kernel, i.e. a moving window (box or disk) with side/radius equal to 'n'.

rcatool.stats.convolve.filtering(data, wgts)

1D and 2D filtering procedures.

rcatool.stats.convolve.fft_prep(array, ...)

Prepare data array and kernel for fft computation.

rcatool.stats.convolve.convolve_fft(array, ...)

Convolve an ndarray with an nd-kernel.

Probability distributions

rcatool.stats.pdf.freq_int_dist(data[, ...])

Calculate frequency - instensity distriutions.

rcatool.stats.pdf.prob_of_exceed(data[, ...])

Calculates probability of exceedance distriutions.

rcatool.stats.pdf.perkins_skill_score(p_mod, ...)

Calculate the Perkins Skill Score (PSS).

SAL module

Routines for calculation of SAL statistics.

rcatool.stats.sal.A_stat(data, refdata)

Calculate the amplitude component (A).

rcatool.stats.sal.S_stat(data, data_label, ...)

Function to calculate the structure component (S).

rcatool.stats.sal.L_stat(data, data_label, ...)

Function to determine the location component (L).

rcatool.stats.sal.threshold(data, thr_type, ...)

Function to calculate the threshold to be used to identify objects.

rcatool.stats.sal.distfunc(x)

Calculate distances

rcatool.stats.sal.remove_large_objects(...)

Remove large objects based on the maximum size limit defined by 'max_size'.

rcatool.stats.sal.sal_calc(tstep, data, ...)

Perform the SAL calculation using the S, A, L functions.

rcatool.stats.sal.write_to_disk(ddict, nt, ...)

rcatool.stats.sal.run_sal_analysis(data, ...)

Run the SAL analysis on the two data sets 'data' and 'refdata', where the latter is supposed to represent the 'truth'.