weldx.measurement.MeasurementChain#

class weldx.measurement.MeasurementChain(name, source, signal_data=None)#

Class that represents a measurement chain.

Create a new measurement chain.

Parameters:
  • name (str) – Name of the measurement chain

  • source (SignalSource) – The source of the measurement chain

  • signal_data (Optional[TimeSeries]) – Measured data of the sources’ signal

Examples

>>> from weldx import Q_
>>> from weldx.measurement import Error, MeasurementChain, Signal, SignalSource

Create a signal source

>>> current_source = SignalSource(name="Current sensor",
...                               error=Error(Q_(0.1, "percent")),
...                               output_signal=Signal(signal_type="analog",
...                                                    units="V")
...                               )

Create a measurement chain using the source

>>> mc = MeasurementChain(name="Current measurement chain",
...                       source=current_source
...      )

Methods

add_signal_data

Add data to a signal.

add_transformation

Add a transformation from an SignalTransformation instance.

add_transformation_from_equipment

Add a transformation from a piece of equipment.

create_transformation

Create and add a transformation to the measurement chain.

from_dict

Create a measurement chain from a dictionary.

from_equipment

Create a measurement chain from a piece of equipment that contains a source.

from_parameters

Create a new measurement chain without providing a SignalSource instance.

get_equipment

Get the equipment that produced a signal.

get_signal

Get a signal.

get_signal_data

Get the data from a signal.

get_transformation

Get a transformation.

plot

Plot the measurement chain.

to_dict

Get the content of the measurement chain as dictionary.

Attributes

output_signal

Get the output signal of the measurement chain.

signals

Get a list of all signals.

source

Return the source of the measurement chain.

source_name

Get the name of the source.

transformation_names

Get the names of all transformations.

transformations

Get a list of all transformations.