spectrochempy.spο
- sp(ssb=None, pow=None)def sp(dataset, ssb=1, pow=1, **kwargs)[source]ο
Calculate apodization with a Sine window multiplication.
For multidimensional NDDataset, the apodization is by default performed on the last dimension.
Functional form of apodization window (cfBruker TOPSPIN manual):
\[sp(t) = \sin(\frac{(\pi - \phi) t }{\text{aq}} + \phi)^{pow}\]where \(0 < t < \text{aq}\) and \(\phi = \pi β \text{sbb}\) when \(\text{ssb} \ge 2\) or \(\phi = 0\) when \(\text{ssb} < 2\)
\(\text{aq}\) is an acquisition status parameter and \(\text{ssb}\) is a processing parameter (see the
ssbparameter definition below) and \(\text{pow}\) is an exponent equal to 1 for a sine bell window or 2 for a squared sine bell window.- Parameters:
dataset (Dataset) β Dataset we want to apodize using Sine Bell or Squared Sine Bell window multiplication.
sbb (int or float, optional, default=1) β This processing parameter mimics the behaviour of the SSB parameter on bruker TOPSPIN software: Typical values are 1 for a pure sine function and 2 for a pure cosine function. Values greater than 2 give a mixed sine/cosine function. Note that all values smaller than 2, for example 0, have the same effect as \(\text{ssb}=1\) , namely a pure sine function.
pow (enum [1,2], optional, default=1) β Exponent value - If pow=2 a Squared Sine Bell window multiplication is performed.
- 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.
Examples using spectrochempy.spο
Sine bell and squared Sine bell window multiplication
Sine bell and squared Sine bell window multiplication