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 ssb parameter 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 dim is specified as an integer it is equivalent to the usual axis numpy 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

Sine bell and squared Sine bell window multiplication

Sine bell and squared Sine bell window multiplication