# mathFunctions (skrf.mathFunctions)¶

Provides commonly used mathematical functions.

## Mathematical Constants¶

Some convenient constants are defined in the skrf.constants module.

## Complex Component Conversion¶

 Return real and imaginary parts of a complex number. Return the magnitude of the complex argument. Return the magnitude in dB of a complex number (as $$20\log_{10}(|z|)$$).. Return the magnitude in dB of a complex number (as $$10\log_{10}(|z|)$$). Return the angle complex argument in radian. Returns the angle complex argument in degree. Return the magnitude of the complex argument. Take a complex number and returns quadrature, which is (length, arc-length from real axis)

## Phase Unwrapping¶

 unwrap_rad(phi) Unwraps a phase given in radians. Take the square root of a complex number with unwrapped phase.

## Unit Conversion¶

 Convert angles from radians to degrees. Convert angles from degrees to radians. Converts a value in Nepers (Np) to decibel (dB). Converts a value in decibel (dB) to neper (Np).

## Scalar-Complex Conversion¶

These conversions are useful for wrapping other functions that don’t support complex numbers.

 Serialize a list/array of complex numbers Unserialize a list/array of real and imag numbers into a complex array.

## Special Functions¶

 Calculate Dirac function. Calculate Neumans number. null(A[, eps]) Calculate the null space of matrix A. cross_ratio(a, b, c, d) Calculate the cross ratio of a quadruple of distinct points on the real line.

## Various Utility Functions¶

 psd2TimeDomain(f, y[, windowType]) Convert a one sided complex spectrum into a real time-signal. rational_interp(x, y[, d, epsilon, axis, ...]) Interpolates function using rational polynomials of degree d. Transforms S-parameters to time-domain bandpass. irfft(x[, n]) Transforms S-parameters to time-domain, assuming complex conjugates for values corresponding to negative frequencies. is_square(mat) Tests whether mat is a square matrix. is_symmetric(mat[, tol]) Tests mat for symmetry. is_Hermitian(mat[, tol]) Tests whether mat is Hermitian. is_positive_definite(mat[, tol]) Tests mat for positive definiteness. is_positive_semidefinite(mat[, tol]) Tests mat for positive semidefiniteness. Returns the conjugate transpose of mat.