.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_datasheet_examples.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_datasheet_examples.py: Datasheet Accuracy Interfaces ============================= In this example, we use create datasheet specification for DC Voltage measurements on an HP3458A Digital Multi Meter. Every instrument provides class interfaces where measurements can be provided. The state of the instrument is provided to the constructor. If not enough key word arguments are provided to the constructor, the default assumptions about the state of the instrument are printed as warnings. .. GENERATED FROM PYTHON SOURCE LINES 16-23 .. code-block:: Python from rminstr_specs import HP3458A import numpy as np voltage_specs = HP3458A.DatasheetDCV() .. GENERATED FROM PYTHON SOURCE LINES 24-31 After creating your spec sheet, supply measurements to get an uncertainty estimate. The uncertainties are always returned as the standard uncertainty (i.e. standard deviation) of the assumed probability distribution. The probablity distribution is assumed to be uniform unless otherwise specified. .. GENERATED FROM PYTHON SOURCE LINES 31-40 .. code-block:: Python # Supply 1d numpy arrays to ``all_manufacturer_errors`` # to get a 1d numpy where the elements of the output # corresponds to the estimated standard uncertainty # on the inputs based on the my_measurements = np.array([0.1, 1.0, 2.0]) my_accuracy = voltage_specs.all_manufacturer_errors(my_measurements) .. _sphx_glr_download_auto_examples_plot_datasheet_examples.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_datasheet_examples.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_datasheet_examples.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_datasheet_examples.zip ` .. include:: plot_datasheet_examples.recommendations .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_