easyclimate.filter.redfit

Red-noise spectra estimating

Functions

calc_redfit(data[, timearray, nsim, mctest, rhopre, ...])

Estimating red-noise spectra directly from unevenly spaced paleoclimatic time series.

calc_redfit_cross(data_x, data_y[, timearray_x, ...])

Estimating red-noise spectra directly from unevenly spaced paleoclimatic time series.

Module Contents

easyclimate.filter.redfit.calc_redfit(data: xarray.DataArray, timearray: numpy.array = None, nsim: int = 1000, mctest: bool = False, rhopre: float = -99.0, ofac: float = 1.0, hifac: float = 1.0, n50: int = 1, iwin: Literal['rectangular', 'welch', 'hanning', 'triangular', 'blackmanharris'] = 'rectangular')

Estimating red-noise spectra directly from unevenly spaced paleoclimatic time series.

Parameters

data: xarray.DataArray

Input time series data

timearray: numpy.array

Time series data array

nsim: int

Number of Monte-Carlo simulations (1000-2000 should be o.k. in most cases)

mctest: bool

Toggle calculation of false-alarm levels based on Monte-Carlo simulation, if set to True : perform Monte-Carlo test, if set to False : skip Monte-Carlo test (default).

rhopre: float

Prescibed value for \(\rho\); unused if < 0 (default = -99.0)

ofac: float

Oversampling factor for Lomb-Scargle Fourier transform (typical values: 2.0-4.0)

hifac: float

Max. frequency to analyze is set to hifac * <fNyq> (default = 1.0)

n50: int

Number of WOSA segments (with 50 % overlap)

iwin: {“rectangular”, “welch”, “hanning”, “triangular”, “blackmanharris”}

Window-type identifier used to suppress sidelobes in spectral analysis: ({“rectangular”, “welch”, “hanning”, “triangular”, “blackmanharris”}, optional)

Caution

Parameters ofac, hifac, n50 and window type are identical to the SPECTRUM program (see Schulz and Stattegger, 1997 for further details). Except mctest, hifac and rhopre all parameters must be specified.

Returns

The red-noise spectra (xarray.Dataset).

See also

easyclimate.filter.redfit.calc_redfit_cross(data_x: xarray.DataArray, data_y: xarray.DataArray, timearray_x: numpy.array = None, timearray_y: numpy.array = None, x_sign: bool = False, y_sign: bool = False, nsim: int = 1000, mctest: bool = True, mctest_phi: bool = True, rhopre_1: float = -999.0, rhopre_2: float = -999.0, ofac: float = 1.0, hifac: float = 1.0, n50: int = 1, alpha: float = 0.05, iwin: Literal['rectangular', 'welch', 'hanning', 'triangular', 'blackmanharris'] = 'rectangular')

Estimating red-noise spectra directly from unevenly spaced paleoclimatic time series.

Parameters

data_x:xarray.DataArray

First input time series data

data_y: xarray.DataArray

Second input time series data

timearray_x: numpy.array

First time series data array

timearray_y: numpy.array

Second time series data array

x_sign: bool

Change the sign of the first time series: if True: The sign of the data is changed if False: The sign of the data is not changed (default)

y_sign: bool

Change the sign of the second time series: if True: The sign of the data is changed if False: The sign of the data is not changed (default)

nsim: int

Number of Monte Carlo simulations (1000-2000 is recommended)

mctest: bool

Estimate the significance of auto and coherency spectrum with Monte Carlo simulations if True: perform Monte Carlo simulations if False: do not perform Monte Carlo simulations

mctest_phi: bool

Estimate Monte Carlo confidence interval for the phase spectrum if True: perform Monte Carlo simulations (mctest needs to be true as well) if False: do not perform Monte Carlo simulations

rhopre_1: float

Prescribed value for \(\rho\) for the first time series, not used if \(\rho < 0\) (default = -999.0).

rhopre_2: float

Prescribed value for \(\rho\) for the second time series, not used if \(\rho< 0\) (default = -999.0).

ofac: float

Oversampling factor for Lomb-Scargle Fourier transform (typical values: 2.0-4.0).

hifac: float

Max. frequency to analyze is set to hifac * <fNyq> (default = 1.0).

n50: int

Number of WOSA segments (with 50 % overlap)

alpha: float

Significance level (Note: only 0.01, 0.05 [default], or 0.1 are allowed).

iwin: {“rectangular”, “welch”, “hanning”, “triangular”, “blackmanharris”}

Window-type identifier used to suppress sidelobes in spectral analysis: ({“rectangular”, “welch”, “hanning”, “triangular”, “blackmanharris”}, optional).

Caution

Parameters ofac, hifac, n50 and window type are identical to the SPECTRUM program (see Schulz and Stattegger, 1997 for further details). Except mctest, hifac, rhopre(1) and rhopre(2) all parameters must be specified.

See also