spectrochempy.gm

gm(gb="Hz", lb="Hz", shifted="us")def gm(dataset, gb=1, lb=0, shifted=0, **kwargs)[source]

Calculate lorentz-to-gauss apodization.

Functional form of apodization window :

\[gm(t) = \exp(e - g^2 )\]

where :

\[e = \pi * lb * (t - t0)\]

and

\[g = 0.6 * \pi * gb * (t - t0)\]
Parameters
  • dataset (ndarray) – Dataset we want to apodize using an Lorentz Multiplication.

  • lb (float or quantity, optional, default=0 Hz) – Inverse exponential width. If it is not a quantity with units, it is assumed to be a broadening expressed in Hz.

  • gb (float or quantity, optional, default=1 Hz) – Gaussian broadening width. If it is not a quantity with units, it is assumed to be a broadening expressed in Hz.

  • shifted (float or quantity, optional, default=0 us) – Shift the data time origin by this amount. If it is not a quantity it is assumed to be expressed in the data units of the last dimension.

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.