spectrochempy.rms#

rms(dataset, dim=None, keepdims=False, *, axis=None, dims=None)[source]#

Compute the root mean square magnitude.

Parameters:
  • dataset (array_like or Quantity) – Real or complex input. Masked samples are excluded.

  • dim (int, str, sequence, or None, optional) – Dimensions to reduce. By default, reduce over all dimensions.

  • keepdims (bool, optional) – Keep reduced dimensions with size one.

  • axis, dims (optional) – Aliases for dim. Supply only one dimension selector.

Returns:

float, Quantity, or NDDataset – Square root of the mean squared magnitude, in the input units. An entirely masked slice produces a masked result. Unmasked NaNs propagate, and a slice with infinity and no NaNs returns infinity. Empty slices return NaN.