spectrochempy.hamming๏
- hamming(dataset, **kwargs)[source]๏
Calculate generalized Hamming (== Happ-Genzel) apodization.
For multidimensional NDDataset, the apodization is by default performed on the last dimension.
The data in the last dimension MUST be time-domain or dimensionless, otherwise an error is raised.
Functional form of apodization window :
\[w(n) = \alpha - (1 - \alpha)\cos(\frac{2\pi n}{M-1})\qquad 0\leq n\leq M-1\]where M is the number of point of the input dataset and :math:alpha = 0.54.
- Parameters:
dataset (array) โ Input dataset.
**kwargs โ Optional keyword parameters (see Other Parameters).
- Returns:
apodized โ Dataset.
apod_arr โ The apodization array only if โretapodโ is True.
- Other Parameters:
dim (str or int, keyword parameter, optional, default=โxโ.) โ Specify on which dimension to apply the apodization method. If
dimis specified as an integer it is equivalent to the usualaxisnumpy parameter.inv (bool, keyword parameter, optional, default=False.) โ True for inverse apodization.
rev (bool, keyword parameter, optional, default=False.) โ True to reverse the apodization before applying it to the data.
inplace (bool, keyword parameter, optional, default=False.) โ True if we make the transform inplace. If False, the function return a new dataset
retapod (bool, keyword parameter, optional, default=False) โ True to return the apodization array along with the apodized object
See also