This is development documentation. Some features are not available in the stable release. View stable documentation.

spectrochempy.snv

snv(dataset, inplace=False)[source]

Apply Standard Normal Variate (SNV) correction.

SNV is equivalent to autoscaling each observation (spectrum) individually along its spectral axis (dim='x'), so that every spectrum has zero mean and unit variance.

\[x_i^\prime = \frac{x_i - \bar{x}_i}{s_i}\]
Parameters:
  • dataset (NDDataset) – The input data.

  • inplace (bool, optional, default:False) – If True, SNV is performed in place.

Returns:

NDDataset – The SNV-corrected dataset.

Examples

>>> dataset = scp.read("irdata/nh4.spg")
>>> nd = dataset.snv()

See also

autoscale

General mean-center and unit-variance scaling.