FourierTransform¶
This module a function for the computation of the one-dimensional fourier transform of a real valued function. The module can be loaded in the notebook in one of the following way
>>> from mppi.Utilities import FourierTransform
>>>FourierTransform.eval_FT
or as
>>> import mppi.Utilities.FourierTransform
>>> FourierTransform.eval_FT
or to load directly some elements
>>> from mppi.Utilities.FourierTransform import eval_FT
>>> eval_FT
- mppi.Utilities.FourierTransform.eval_FT(time, values, time_units='fs', verbose=True)[source]¶
Compute the FT of the (real-valued) values array using the time array as x-values. The FT is provided only for positive energies since due to the real-valued of the values array the FT is assumed to be an even function.
- Parameters:
time (
np.array) – x-values array (assumes a uniform sampling)values (
np.array) – values array (assumes real-value function)time_units (
string) – set the units to compute the energy array. Default is ‘fs’ and the other possible choice is ‘ps’verbose (
bool) – defines the amount of information provided on terminal
- Returns:
- dictionary with the energy array (in eV), the real and imaginary part
of the FT and the associated module
- Return type:
dict