mirror of
https://github.com/vale981/stocproc
synced 2025-03-05 09:41:42 -05:00
added docs
This commit is contained in:
parent
b7e9b6040c
commit
872a82f65d
2 changed files with 27 additions and 40 deletions
|
@ -1,6 +1,32 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Stochastic Process Module
|
||||
=========================
|
||||
|
||||
This module contains two different implementation for generating stochastic processes for a
|
||||
given auto correlation function. Both methods are based on a time discrete process, however cubic
|
||||
spline interpolation is assured to be valid within a given tolerance.
|
||||
|
||||
* simulate stochastic processes using Karhunen-Loève expansion :py:func:`stocproc.StocProc_KLE_tol`
|
||||
|
||||
Setting up the class involves solving an eigenvalue problem which grows with
|
||||
the time interval the process is simulated on. Further generating a new process
|
||||
involves a multiplication with that matrix, therefore it scales quadratically with the
|
||||
time interval. Nonetheless it turns out that this method requires less random numbers
|
||||
than the Fast-Fourier method.
|
||||
|
||||
* simulate stochastic processes using Fast-Fourier method method :py:func:`stocproc.StocProc_FFT_tol`
|
||||
|
||||
Setting up this class is quite efficient as it only calculates values of the
|
||||
associated spectral density. The number scales linear with the time interval of interest. However to achieve
|
||||
sufficient accuracy many of these values are required. As the generation of a new process is based on
|
||||
a Fast-Fouried-Transform over these values, this part is comparably lengthy.
|
||||
"""
|
||||
|
||||
version = '0.2.0'
|
||||
|
||||
from .stocproc import StocProc_FFT_tol
|
||||
from .stocproc import StocProc_KLE
|
||||
from .stocproc import StocProc_KLE_tol
|
|
@ -1,44 +1,5 @@
|
|||
# -*- coding: utf8 -*-
|
||||
"""
|
||||
**Stochastic Process Module**
|
||||
|
||||
This module contains various methods to generate stochastic processes for a
|
||||
given correlation function. There are two different kinds of generators. The one kind
|
||||
allows to generate the process for a given time grid, where as the other one generates a
|
||||
time continuous process in such a way that it allows to "correctly" interpolate between the
|
||||
solutions of the time discrete version.
|
||||
|
||||
**time discrete methods:**
|
||||
:py:func:`stochastic_process_kle`
|
||||
Simulate Stochastic Process using Karhunen-Loève expansion
|
||||
|
||||
This method still needs explicit integrations weights for the
|
||||
numeric integrations. For convenience you can use
|
||||
|
||||
:py:func:`stochastic_process_mid_point_weight` simplest approach, for
|
||||
test reasons only, uses :py:func:`get_mid_point_weights`
|
||||
to calculate the weights
|
||||
|
||||
:py:func:`stochastic_process_trapezoidal_weight` little more sophisticated,
|
||||
uses :py:func:`get_trapezoidal_weights_times` to calculate the weights
|
||||
|
||||
:py:func:`stochastic_process_simpson_weight`,
|
||||
**so far for general use**, uses :py:func:`get_simpson_weights_times`
|
||||
to calculate the weights
|
||||
|
||||
|
||||
:py:func:`stochastic_process_fft`
|
||||
Simulate Stochastic Process using FFT method
|
||||
|
||||
**time continuous methods:**
|
||||
:py:class:`StocProc`
|
||||
Simulate Stochastic Process using Karhunen-Loève expansion and allows
|
||||
for correct interpolation. This class still needs explicit integrations
|
||||
weights for the numeric integrations (use :py:func:`get_trapezoidal_weights_times`
|
||||
for general purposes).
|
||||
|
||||
.. todo:: implement convenient classes with fixed weights
|
||||
"""
|
||||
|
||||
from __future__ import print_function, division
|
||||
|
||||
from scipy.interpolate import InterpolatedUnivariateSpline
|
||||
|
|
Loading…
Add table
Reference in a new issue