block_average

mdtools.statistics.block_average(data, axis=0, ddof=0, dtype=np.float64)[source]

Calculate the sample means and their standard deviations over multiple series of measurement.

Parameters:
  • data (array_like) – The array that holds the measured values. Must have at least two dimensions, one dimension containing the different series of measurement and at least one other dimension containing the measured values per series.

  • axis (int, optional) – Axis along which the means and their standard deviations are computed.

  • ddof (int, optional) – Delta Degrees of Freedom. The divisor used in calculating the standard deviation is N-ddof, where N is the number of measurements.

  • dtype (type, optional) – The data type of the output arrays and the data type to use in computing the means and standard deviations. Note: Computing means and standard deviation using numpy.float32 or lower can be inaccurate. See numpy.mean() for more details.

Returns:

  • mean (numpy.ndarray) – The mean values of the measurements.

  • sd (numpy.ndarray) – The standard deviations of the mean values.

See also

numpy.mean()

Compute the arithmetic mean along the specified axis

numpy.std()

Compute the standard deviation along the specified axis