/usr/include/openturns/swig/UserDefinedSpectralModel_doc.i is in libopenturns-dev 1.7-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | %feature("docstring") OT::UserDefinedSpectralModel
"Spectral model defined by the User.
Parameters
----------
frequency : :class:`~openturns.RegularGrid`
The frequency grid :math:`(-f_c, \\\\dots, f_c)` with step :math:`\\\\delta f` on which the model is built.
densityCollectionFunction : :class:`~openturns.HermitianMatrixCollection`
Collection of hermitian matrices :math:`\\\\in \\\\mathbb{M}_d(\\\\mathbb{C})` which are the images of each point of the frequency grid through the density spectral function.
Notes
-----
We consider a multivariate process :math:`X: \\\\Omega \\\\times \\\\cD \\\\rightarrow \\\\Rset^d` of dimension *d* where :math:`\\\\cD \\\\in \\\\Rset^n`. We only treat here the case where the domain is of dimension 1: :math:`\\\\cD \\\\in \\\\Rset` (*n=1*).
We denote :math:`(\\\\vect{t}_0, \\\\dots, \\\\vect{t}_{N-1})` the time stamps of the time grid.
*X* is supposed to be a stationary second order process and we suppose that its spectral density function :math:`S : \\\\Rset \\\\rightarrow \\\\mathcal{H}^+(d)` defined by:
.. math::
:label: fourier_transform
\\\\forall \\\\vect{f} \\\\in \\\\Rset^n, \\\\,S(\\\\vect{f}) = \\\\int_{\\\\Rset^n}\\\\exp\\\\left\\\\{ -2i\\\\pi <\\\\vect{f},\\\\vect{\\\\tau}> \\\\right\\\\} C^{stat}(\\\\vect{\\\\tau})\\\\, d\\\\vect{\\\\tau}
exists, where :math:`\\\\mathcal{H}^+(d) \\\\in \\\\mathcal{M}_d(\\\\Cset)` is the set of *d*-dimensional positive definite hermitian matrices.
We get a piecewise constant function on :math:`[-f_c,f_c]`, where the intervals on which the density spectral function is constant are centered on the points of the frequency grid, of length :math:`\\\\delta f`.
Then, it is possible to evaluate the spectral density function for a given frequency thanks to the method *computeSpectralDensity*: if the frequency is not inside the interval :math:`[-f_c,f_c]`, OpenTURNS returns an exception. Otherwise, it returns the hermitian matrix of the subinterval of :math:`[-f_c,f_c]` that contains the given frequency.
Examples
--------
Create the frequency grid:
>>> import openturns as ot
>>> from math import exp
>>> fmin = 0.1
>>> df = 0.2
>>> N = int((10.0 - fmin)/ df)
>>> myFrequencyGrid = ot.RegularGrid(fmin, df, N)
Define the spectral function:
>>> def s(f):
... if(f <= 5.0):
... return 1.0
... else:
... x = f - 5.0
... return exp(-2.0 * x * x)
Create the collection of HermitianMatrix:
>>> myCollection = ot.HermitianMatrixCollection()
>>> for k in range(N):
... frequency = myFrequencyGrid.getValue(k)
... matrix = ot.HermitianMatrix(1)
... matrix[0, 0] = s(frequency)
... myCollection.add(matrix)
Create the spectral model:
>>> mySpectralModel = ot.UserDefinedSpectralModel(myFrequencyGrid, myCollection)
"
|