kinisi.parser#

A class to represent samples of a physical quantity using scipp. This class extends the scipp.Variable class to provide additional functionality for handling samples, such as calculating the mean and standard deviation of the samples.

class kinisi.samples.Samples(values, unit=Unit(1))#

Bases: Variable

A subclass of scipp.Variable that represents samples of a physical quantity. This class is designed to add some specific functionality for handling samples, such as calculating the mean and standard deviation of the samples. It also overrides the HTML representation to include these statistics.

Parameters:
  • values – The values of the samples.

  • unit – The unit of the samples, if applicable. Optional, defaults to dimensionless.

to_unit(unit)#

Convert the samples to a different unit.

Parameters:

unit (Unit) – The unit to convert the samples to.

Return type:

Samples

Returns:

A new Samples object with the converted values.