spectrochempy.bartlett
- bartlett()def bartlett(dataset, **kwargs)[source]
- Calculate Bartlett apodization (triangular window with end points at zero). - 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. - The Bartlett window is defined as \[w(n) = \frac{2}{M-1} (\frac{M-1}{2} - |n - \frac{M-1}{2}|)\]- where M is the number of point of the input dataset. - Parameters:
- dataset (Dataset) – Input dataset. 
- **kwargs – Additional 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 usual- axisnumpy 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 - triang
- A triangular window that does not touch zero at the ends.