{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Datasheet Accuracy Interfaces\n\nIn this example, we use create datasheet specification\nfor DC Voltage measurements on an HP3458A Digital Multi Meter.\n\nEvery instrument provides class interfaces\nwhere measurements can be provided. The state of the\ninstrument is provided to the constructor.\n\nIf not enough key word arguments are provided to the constructor,\nthe default assumptions about the state of the instrument are\nprinted as warnings.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from rminstr_specs import HP3458A\nimport numpy as np\n\n\nvoltage_specs = HP3458A.DatasheetDCV()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "After creating your spec sheet, supply measurements\nto get an uncertainty estimate. The uncertainties\nare always returned as the standard uncertainty (i.e.\nstandard deviation) of\nthe assumed probability distribution. The probablity\ndistribution is assumed to be uniform\nunless otherwise specified.\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Supply 1d numpy arrays to ``all_manufacturer_errors``\n# to get a 1d numpy where the elements of the output\n# corresponds to the estimated standard uncertainty\n# on the inputs based on the\n\nmy_measurements = np.array([0.1, 1.0, 2.0])\nmy_accuracy = voltage_specs.all_manufacturer_errors(my_measurements)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.4" } }, "nbformat": 4, "nbformat_minor": 0 }