spectrochempy.center๏ƒ

center(dataset, dim='y', inplace=False)[source]๏ƒ

Subtract the mean along a dimension (mean-centering).

Parameters:
  • dataset (NDDataset) โ€“ The input data.

  • dim (str or int, optional, default:โ€™yโ€™) โ€“ Dimension along which the mean is computed and subtracted.

  • inplace (bool, optional, default:False) โ€“ If True, centering is performed in place.

Returns:

NDDataset โ€“ The centered dataset.

Examples

>>> dataset = scp.read("irdata/nh4.spg")
>>> nd = dataset.center(dim="x")