Commit dd6f25a6 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

libpsdxx [WP]: declaration of functions for logarithmic sampling

parent a2a21f12
......@@ -124,6 +124,11 @@ namespace psd {
/* ====================================================================== */
//! series container (for frequency values, for example)
typedef aff::Series<double> TDseries;
/* ====================================================================== */
//! return absolute value (magnitude) of complex values
TDISeries abs(const TDCISeries::Tcoc& s);
......@@ -204,16 +209,32 @@ namespace psd {
/* ====================================================================== */
/*! \brief support sampling in the frequency domain
* This class supports logarithmic sampling and averaging in the frequency
* domain.
/*! return a logarithmic frequency scale
* Samples data which is provided on a uniformly spaced frequency axis with
* an equal amount of samples per decade and performs averarging.
* \param df sampling interval in Hz of uniformly samples spectral values
* \param nsamples number of samples of spectral data
* \param n_per_decade number of samples per frequency decade
* for logarithmic sampling
* \return series of frequency values in Hz with logarithmic spacing and
* \p n_per_decade frequency values per decade
* Implemented as a function
* This function is used to compute a series of frequency values with
* logarithmic spacing. The return value can be used as input parameter to
* the actual sampling functions.
TDseries log_frequency(const double& df,
unsigned int& nsamples,
unsigned int& n_per_decade);
/*! sample values on a logarithmic frequency axis
TDCISeries::Tseries log_sampling(const TDCISeries::Tcoc& s,
const TDseries::Tcoc& f);
/*! sample complex values on a logarithmic frequency axis
TDISeries::Tseries log_sampling(const TDISeries::Tcoc& s,
const TDseries::Tcoc& f);
} // namespace psd
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment