FREQCOR_cof
Transfer function computation utilities for cut-off frequency estimation.
Functions
Estimate transfer functions and cut-off frequencies from ideal and real (co)spectra. |
- FREQCOR_cof.FREQCOR_cof(Icon, Rcon, jtmin_hz, jtmax_hz, varclim, freq, freqn, sps, zL, tfmin_hz, tfmax_hz, plot, ws, outputpath, wd, tf_peltola, jrh_class=None, run_tag=None)[source]
Estimate transfer functions and cut-off frequencies from ideal and real (co)spectra.
The routine computes the transfer function as the ratio between real and ideal (co)spectra and fits parametric forms (Lorentz and Gauss) to derive cut-off frequencies and normalization factors.
- Parameters:
Icon (
pandas.Series,numpy.ndarray, orpandas.DataFrame) – Ideal (reference) and real (measured) (co)spectra. - If 1D, the routine treats the input as an ensemble-average spectrum. - If 2D, columns are treated as individual half-hours.Rcon (
pandas.Series,numpy.ndarray, orpandas.DataFrame) – Ideal (reference) and real (measured) (co)spectra. - If 1D, the routine treats the input as an ensemble-average spectrum. - If 2D, columns are treated as individual half-hours.jtmin_hz (
float) – Frequency range (Hz) used for transfer function quality checks.jtmax_hz (
float) – Frequency range (Hz) used for transfer function quality checks.varclim (
float) – Maximum allowed coefficient of variation for the normalization factor.freq (
pandas.Seriesornumpy.ndarray) – Natural frequencies (Hz).freqn (
pandas.DataFrameornumpy.ndarray) – Normalized frequencies per time step.sps (
int) – Approach selector (cospectral or spectral).zL (
pandas.Seriesornumpy.ndarray) – Stability parameter time series.tfmin_hz (
float) – Frequency range (Hz) used for parametric fitting.tfmax_hz (
float) – Frequency range (Hz) used for parametric fitting.plot (
list[int]) – Plotting options selector.ws (
pandas.Series) – Wind speed and wind direction time series.wd (
pandas.Series) – Wind speed and wind direction time series.outputpath (
str) – Output directory.tf_peltola (
int) – Use Peltola et al. form of Lorentzian fit.jrh_class (
int, optional) – First-variable class index (WD or RH class; used for plotting/output naming).run_tag (
str, optional) – Run identifier used to generate output filenames.
- Returns:
xy (
list[numpy.ndarray]) –[x, y]vectors used for the fit (frequency and transfer function samples).cofmat (
pandas.Series) – Cut-off frequencies and uncertainties with keys:'cof_L', 'unc_L_tf', 'cof_G', 'unc_G_tf'.fnmat (
pandas.Series) – Normalization factors and uncertainties with keys:'fn_L', 'uncfn_L', 'fn_G', 'uncfn_G'.trafun (
pandas.Series,numpy.ndarray, orpandas.DataFrame) – Transfer function values (ratio real/ideal).denoising_out (
dict) – Denoising results (when active; see Aslan et al., 2021).
- Raises:
ValueError – If run_tag is missing.
ValueError – If plotting of PDF outputs is enabled and jrh_class is missing.