diff --git a/dist/metrolopy-0.6.2.tar.gz b/dist/metrolopy-0.6.2.tar.gz deleted file mode 100644 index f7795f4..0000000 Binary files a/dist/metrolopy-0.6.2.tar.gz and /dev/null differ diff --git a/dist/metrolopy-0.6.2-py3-none-any.whl b/dist/metrolopy-0.6.3-py3-none-any.whl similarity index 53% rename from dist/metrolopy-0.6.2-py3-none-any.whl rename to dist/metrolopy-0.6.3-py3-none-any.whl index 709688d..2e120ef 100644 Binary files a/dist/metrolopy-0.6.2-py3-none-any.whl and b/dist/metrolopy-0.6.3-py3-none-any.whl differ diff --git a/dist/metrolopy-0.6.3.tar.gz b/dist/metrolopy-0.6.3.tar.gz new file mode 100644 index 0000000..9e904aa Binary files /dev/null and b/dist/metrolopy-0.6.3.tar.gz differ diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index ad6e0c4..e39526e 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/hand_made_doc.doctree b/docs/_build/doctrees/hand_made_doc.doctree index d86eef2..bf56b0e 100644 Binary files a/docs/_build/doctrees/hand_made_doc.doctree and b/docs/_build/doctrees/hand_made_doc.doctree differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree index 86af618..7105b7b 100644 Binary files a/docs/_build/doctrees/index.doctree and b/docs/_build/doctrees/index.doctree differ diff --git a/docs/_build/doctrees/metrolopy.doctree b/docs/_build/doctrees/metrolopy.doctree index a695b39..e8e0da1 100644 Binary files a/docs/_build/doctrees/metrolopy.doctree and b/docs/_build/doctrees/metrolopy.doctree differ diff --git a/docs/_build/doctrees/metrolopy.tests.doctree b/docs/_build/doctrees/metrolopy.tests.doctree index a540ce6..0e455be 100644 Binary files a/docs/_build/doctrees/metrolopy.tests.doctree and b/docs/_build/doctrees/metrolopy.tests.doctree differ diff --git a/docs/_build/doctrees/modules.doctree b/docs/_build/doctrees/modules.doctree index fdaaed8..5d44099 100644 Binary files a/docs/_build/doctrees/modules.doctree and b/docs/_build/doctrees/modules.doctree differ diff --git a/docs/_build/doctrees/todo.doctree b/docs/_build/doctrees/todo.doctree index b857a1b..760ca7a 100644 Binary files a/docs/_build/doctrees/todo.doctree and b/docs/_build/doctrees/todo.doctree differ diff --git a/docs/_build/html/_sources/index.rst.txt b/docs/_build/html/_sources/index.rst.txt index f7f7597..80e923a 100644 --- a/docs/_build/html/_sources/index.rst.txt +++ b/docs/_build/html/_sources/index.rst.txt @@ -133,6 +133,7 @@ version history as well as a library of physical constants. * Version 0.6.1 built 19 October 2020, bug fixes * Version 0.6.2 built 10 July 2021, bug fixes +* Version 0.6.3 built 13 May 2022, bug fixes author diff --git a/docs/_build/html/_static/basic.css b/docs/_build/html/_static/basic.css index aa9df31..bf18350 100644 --- a/docs/_build/html/_static/basic.css +++ b/docs/_build/html/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -731,8 +731,9 @@ dl.glossary dt { .classifier:before { font-style: normal; - margin: 0.5em; + margin: 0 0.5em; content: ":"; + display: inline-block; } abbr, acronym { @@ -756,6 +757,7 @@ span.pre { -ms-hyphens: none; -webkit-hyphens: none; hyphens: none; + white-space: nowrap; } div[class*="highlight-"] { @@ -819,7 +821,7 @@ div.code-block-caption code { table.highlighttable td.linenos, span.linenos, -div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ +div.highlight span.gp { /* gp: Generic.Prompt */ user-select: none; -webkit-user-select: text; /* Safari fallback only */ -webkit-user-select: none; /* Chrome/Safari */ diff --git a/docs/_build/html/_static/doctools.js b/docs/_build/html/_static/doctools.js index 61ac9d2..e1bfd70 100644 --- a/docs/_build/html/_static/doctools.js +++ b/docs/_build/html/_static/doctools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for all documentation. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -154,9 +154,7 @@ var Documentation = { this.fixFirefoxAnchorBug(); this.highlightSearchWords(); this.initIndexTable(); - if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { - this.initOnKeyListeners(); - } + this.initOnKeyListeners(); }, /** @@ -264,6 +262,16 @@ var Documentation = { hideSearchWords : function() { $('#searchbox .highlight-link').fadeOut(300); $('span.highlighted').removeClass('highlighted'); + var url = new URL(window.location); + url.searchParams.delete('highlight'); + window.history.replaceState({}, '', url); + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar : function() { + $('input[name=q]').first().focus(); }, /** @@ -288,25 +296,54 @@ var Documentation = { }, initOnKeyListeners: function() { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) + return; + $(document).keydown(function(event) { var activeElementType = document.activeElement.tagName; // don't navigate when in search box, textarea, dropdown or button if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' - && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey - && !event.shiftKey) { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } + && activeElementType !== 'BUTTON') { + if (event.altKey || event.ctrlKey || event.metaKey) + return; + + if (!event.shiftKey) { + switch (event.key) { + case 'ArrowLeft': + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) + break; + var prevHref = $('link[rel="prev"]').prop('href'); + if (prevHref) { + window.location.href = prevHref; + return false; + } + break; + case 'ArrowRight': + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) + break; + var nextHref = $('link[rel="next"]').prop('href'); + if (nextHref) { + window.location.href = nextHref; + return false; + } + break; + case 'Escape': + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) + break; + Documentation.hideSearchWords(); + return false; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case '/': + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) + break; + Documentation.focusSearchBar(); + return false; } } }); diff --git a/docs/_build/html/_static/nature.css b/docs/_build/html/_static/nature.css index c4768af..beb3a60 100644 --- a/docs/_build/html/_static/nature.css +++ b/docs/_build/html/_static/nature.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- nature theme. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/docs/_build/html/_static/searchtools.js b/docs/_build/html/_static/searchtools.js index e09f926..0a44e85 100644 --- a/docs/_build/html/_static/searchtools.js +++ b/docs/_build/html/_static/searchtools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -172,10 +172,6 @@ var Search = { } // stem the word var word = stemmer.stemWord(tmp[i].toLowerCase()); - // prevent stemmer from cutting word smaller than two chars - if(word.length < 3 && tmp[i].length >= 3) { - word = tmp[i]; - } var toAppend; // select the correct list if (word[0] == '-') { @@ -276,13 +272,16 @@ var Search = { setTimeout(function() { displayNextItem(); }, 5); - } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { + } else if (DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY) { $.ajax({url: requestUrl, dataType: "text", complete: function(jqxhr, textstatus) { var data = jqxhr.responseText; if (data !== '' && data !== undefined) { - listItem.append(Search.makeSearchSummary(data, searchterms, hlterms)); + var summary = Search.makeSearchSummary(data, searchterms, hlterms); + if (summary) { + listItem.append(summary); + } } Search.output.append(listItem); setTimeout(function() { @@ -290,7 +289,7 @@ var Search = { }, 5); }}); } else { - // no source available, just display title + // just display title Search.output.append(listItem); setTimeout(function() { displayNextItem(); @@ -325,7 +324,9 @@ var Search = { var results = []; for (var prefix in objects) { - for (var name in objects[prefix]) { + for (var iMatch = 0; iMatch != objects[prefix].length; ++iMatch) { + var match = objects[prefix][iMatch]; + var name = match[4]; var fullname = (prefix ? prefix + '.' : '') + name; var fullnameLower = fullname.toLowerCase() if (fullnameLower.indexOf(object) > -1) { @@ -339,7 +340,6 @@ var Search = { } else if (parts[parts.length - 1].indexOf(object) > -1) { score += Scorer.objPartialMatch; } - var match = objects[prefix][name]; var objname = objnames[match[1]][2]; var title = titles[match[0]]; // If more than one term searched for, we require other words to be @@ -498,6 +498,9 @@ var Search = { */ makeSearchSummary : function(htmlText, keywords, hlwords) { var text = Search.htmlToText(htmlText); + if (text == "") { + return null; + } var textLower = text.toLowerCase(); var start = 0; $.each(keywords, function() { diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html index a6dd9bb..7982d56 100644 --- a/docs/_build/html/genindex.html +++ b/docs/_build/html/genindex.html @@ -5,7 +5,7 @@ - Index — metrolopy 0.6.2 documentation + Index — metrolopy 0.6.3 documentation @@ -24,7 +24,7 @@

Navigation

  • modules |
  • - + @@ -255,24 +255,32 @@

    C

  • (metrolopy.unit.Quantity method)
  • - - + -
  • covariance_matrix_sim() (metrolopy.nummy.nummy static method) +
  • covariance_matrix_sim() (metrolopy.gummy.gummy static method) + +
  • +
  • covariance_sim() (metrolopy.gummy.gummy method) + +
  • coverage_factor() (in module metrolopy.pmethod)
  • coverage_probability() (in module metrolopy.pmethod) @@ -661,10 +677,12 @@

    I

  • IncompatibleUnitsError
  • -
  • independant (metrolopy.gummy.gummy property) -
  • -
  • independent (metrolopy.nummy.nummy property) +
  • independent (metrolopy.gummy.gummy property) + +
  • is_dimensionless (metrolopy.unit.Unit property)
  • isindependent (metrolopy.distributions.Convolution attribute) @@ -1938,7 +1956,7 @@

    Z

    Quick search

    @@ -1957,13 +1975,13 @@

    Navigation

  • modules |
  • - + \ No newline at end of file diff --git a/docs/_build/html/hand_made_doc.html b/docs/_build/html/hand_made_doc.html index b8d66ac..abc5824 100644 --- a/docs/_build/html/hand_made_doc.html +++ b/docs/_build/html/hand_made_doc.html @@ -6,7 +6,7 @@ - MetroloPy — metrolopy 0.6.2 documentation + MetroloPy — metrolopy 0.6.3 documentation @@ -25,7 +25,7 @@

    Navigation

  • modules |
  • - + @@ -2003,8 +2003,9 @@

    sub-classes of Fit for some common functions
    -

    Table of Contents

    -
    @@ -131,6 +131,7 @@

    version history @@ -156,8 +157,9 @@

    license
    -

    Table of Contents

    -
    @@ -59,7 +59,7 @@

    Submodules
    -class metrolopy.budget.Budget(y, xlist, uunit=None, units_on_values=None, sort=True, solidus=None, mulsep=None, slashaxis=None, columns=None, column_names=None, xnames=None, yname=None, show_subtotals=True, show_expanded_u=None, description=None, description_math_mode=False, custom=None, custom_heading=None, custom_math_mode=False, show_s=None, show_d=None, show_c=None, css=None, k=None, p=None, sim=False)
    +class metrolopy.budget.Budget(y, xlist, uunit=None, units_on_values=None, sort=True, solidus=None, mulsep=None, slashaxis=None, columns=None, column_names=None, xnames=None, yname=None, show_subtotals=True, show_expanded_u=None, description=None, description_math_mode=False, custom=None, custom_heading=None, custom_math_mode=False, show_s=None, show_d=None, show_c=None, css=None, k=None, p=None, sim=False)

    Bases: metrolopy.printing.PrettyPrinter

    A class that facilitates the creation of uncertainty budget tables.

    To display the table use the Budget.html or Budget.latex @@ -165,7 +165,7 @@

    Submodules
    -property column_names
    +property column_names

    dict

    Names to display as column headers. The dictionary should use as keys any of the column names listed above in the columns parameter @@ -174,7 +174,7 @@

    Submodules
    -property columns
    +property columns

    list of str or None

    Allows the user to select the columns (and ordering of the columns) for display. The available columns are:

    @@ -194,8 +194,7 @@

    Submodules
    -default_column_names = None
    +default_column_names = None
    -default_columns = None
    +default_columns = None
    -default_css = '\n.budget_table {\n    display: table;\n}\n    \n.budget_row {\n    display: table-row;\n}\n\n.budget_header_row {\n    display: table-row;\n    font-weight: bold;\n}\n\n.budget_first_col_header_cell\n{\n    display: table-cell;\n    text-align: center;\n    border-bottom: solid;\n    border-width: thin;\n    padding-left: 5px;\n    padding-right: 5px;\n}\n\n.budget_header_cell {\n    display: table-cell;\n    text-align: center;\n    border-bottom: solid;\n    border-width: thin;\n    padding-left: 5px;\n    padding-right: 5px;\n    \n}\n\n.budget_first_col_x_cell {\n    display: table-cell;\n    text-align: center;\n    padding-left: 5px;\n    padding-right: 5px;\n    min-width: 8ex;\n}\n\n.budget_x_cell {\n    display: table-cell;\n    text-align: center;\n    padding-left: 5px;\n    padding-right: 5px;\n    min-width: 8ex;\n}\n'
    +default_css = '\n.budget_table {\n    display: table;\n}\n    \n.budget_row {\n    display: table-row;\n}\n\n.budget_header_row {\n    display: table-row;\n    font-weight: bold;\n}\n\n.budget_first_col_header_cell\n{\n    display: table-cell;\n    text-align: center;\n    border-bottom: solid;\n    border-width: thin;\n    padding-left: 5px;\n    padding-right: 5px;\n}\n\n.budget_header_cell {\n    display: table-cell;\n    text-align: center;\n    border-bottom: solid;\n    border-width: thin;\n    padding-left: 5px;\n    padding-right: 5px;\n    \n}\n\n.budget_first_col_x_cell {\n    display: table-cell;\n    text-align: center;\n    padding-left: 5px;\n    padding-right: 5px;\n    min-width: 8ex;\n}\n\n.budget_x_cell {\n    display: table-cell;\n    text-align: center;\n    padding-left: 5px;\n    padding-right: 5px;\n    min-width: 8ex;\n}\n'
    -property df
    +property df

    read-only

    Returns a Panda’s DataFrame with the the budget table.

    -property df_html
    +property df_html

    read-only

    Returns a Panda’s DataFrame with the the budget table, with entries displayed using HTML.

    @@ -239,7 +238,7 @@

    Submodules
    -property df_latex
    +property df_latex

    read-only

    Returns a Panda’s DataFrame with the the budget table, with all entries displayed using LaTeX.

    @@ -247,7 +246,7 @@

    Submodules
    -property df_str
    +property df_str

    read-only

    Returns a Panda’s DataFrame with the the budget table, with all values displayed as strings.

    @@ -255,29 +254,29 @@

    Submodules
    -property k
    +property k

    Gets or sets the k value for the expanded uncertainty of y.

    -property p
    +property p

    Gets or sets the p value for the expanded uncertainty of y.

    -show_c = True
    +show_c = True
    -show_d = False
    +show_d = False
    -show_s = True
    +show_s = True
    @@ -293,7 +292,7 @@

    Submodules
    -units_on_values = None
    +units_on_values = None

    @@ -305,7 +304,7 @@

    Submodules
    -class metrolopy.dfunc.Dfunc
    +class metrolopy.dfunc.Dfunc

    Bases: object

    Class Dfunc is an abstract base class that provides some support for numpy broadcasting for functions and operators. An inheriting class must implement @@ -313,7 +312,7 @@

    Submodules
    -classmethod apply(function, derivative, *args)
    +classmethod apply(function, derivative, *args)

    A classmethod that applies a function to one or more gummy or jummy objects propagating the uncertainty.

    @@ -380,7 +379,7 @@

    Submodules
    -classmethod napply(function, *args)
    +classmethod napply(function, *args)

    gummy.napply(function, arg1, arg2, …) and jummy.napply(function, arg1, arg2, …)

    A classmethod that applies a function to one or more gummy or jummy @@ -441,7 +440,7 @@

    Submodules
    -class metrolopy.distributions.ArcSinDist(center=None, half_width=None, lower_limit=None, upper_limit=None)
    +class metrolopy.distributions.ArcSinDist(center=None, half_width=None, lower_limit=None, upper_limit=None)

    Bases: metrolopy.distributions.Distribution

    @@ -474,7 +473,7 @@

    Submodules
    -class metrolopy.distributions.BinomialDist(n, p)
    +class metrolopy.distributions.BinomialDist(n, p)

    Bases: metrolopy.distributions.Distribution

    @@ -507,11 +506,11 @@

    Submodules
    -class metrolopy.distributions.Convolution(func, *args)
    +class metrolopy.distributions.Convolution(func, *args)

    Bases: metrolopy.distributions.Distribution

    -isindependent = False
    +isindependent = False
    @@ -534,7 +533,7 @@

    Submodules
    -class metrolopy.distributions.CurvlinearTrapDist(center=None, half_width=None, limit_half_range=None, lower_limit=None, upper_limit=None)
    +class metrolopy.distributions.CurvlinearTrapDist(center=None, half_width=None, limit_half_range=None, lower_limit=None, upper_limit=None)

    Bases: metrolopy.distributions.Distribution

    @@ -567,7 +566,7 @@

    Submodules
    -class metrolopy.distributions.Distribution
    +class metrolopy.distributions.Distribution

    Bases: object

    Abstract base class for distributions used for Monte-Carlo uncertainty propagation.

    @@ -622,7 +621,7 @@

    Submodules
    -static apply(f, *d)
    +static apply(f, *d)

    Applies a function f to distribution(s) d1, d2, …, f`(`d1,`d2`,…) and returns a distribution resulting from the convolution.

    @@ -699,7 +698,7 @@

    Submodules
    -static covplot(x, y, fmt='ko', xlabel=None, ylabel=None, title=None, hold=False, **kwds)
    +static covplot(x, y, fmt='ko', xlabel=None, ylabel=None, title=None, hold=False, **kwds)

    Plots the Distribution x versus the Distribution y

    Parameters
    @@ -736,7 +735,7 @@

    Submodules
    -static covsim_matrix(*d)
    +static covsim_matrix(*d)

    Returns the variance-covariance matrix of the Distributions d1, d2, …

    Raises
    @@ -772,18 +771,18 @@

    Submodules
    -isindependent = True
    +isindependent = True

    -property mean
    +property mean

    Returns the mean of the simulated data.

    Raises
    • A NoSimulatedDataError will be raised if no simulated data is available

    • -
    • from a call to Distribution.simulate()

    • +
    • from a call to Distribution.simulate().

    @@ -799,32 +798,32 @@

    Submodules
    -static random_state()
    +static random_state()

    Returns the numpy.random.RandomState object shared by all distributions.

    -static set_seed(seed)
    +static set_seed(seed)

    Sets the seed of the numpy.random.RandomState object shared by all distributions.

    -simdata = None
    +simdata = None
    -property simsorted
    +property simsorted

    numpy.ndarray, read-only

    Returns a sorted numpy array containing the simulated data values.

    Raises
    • A NoSimulatedDataError will be raised if no simulated data is available

    • -
    • from a call to Distribution.simulate()

    • +
    • from a call to Distribution.simulate().

    @@ -832,7 +831,7 @@

    Submodules
    -static simulate(distributions, n=100000, ufrom=None)
    +static simulate(distributions, n=100000, ufrom=None)

    Generates simulated data for the desired distributions.

    Parameters
    @@ -852,13 +851,13 @@

    Submodules
    -property stdev
    +property stdev

    Returns the standard deviation of the simulated data.

    Raises
    • A NoSimulatedDataError will be raised if no simulated data is available

    • -
    • from a call to Distribution.simulate()

    • +
    • from a call to Distribution.simulate().

    @@ -887,7 +886,7 @@

    Submodules
    -class metrolopy.distributions.ExponentialDist(scale=None, rate=None)
    +class metrolopy.distributions.ExponentialDist(scale=None, rate=None)

    Bases: metrolopy.distributions.Distribution

    @@ -920,7 +919,7 @@

    Submodules
    -class metrolopy.distributions.GammaDist(shape, scale)
    +class metrolopy.distributions.GammaDist(shape, scale)

    Bases: metrolopy.distributions.Distribution

    @@ -953,7 +952,7 @@

    Submodules
    -class metrolopy.distributions.LaplaceDist(x, scale)
    +class metrolopy.distributions.LaplaceDist(x, scale)

    Bases: metrolopy.distributions.Distribution

    @@ -986,7 +985,7 @@

    Submodules
    -class metrolopy.distributions.LogNormalDist(mu, sigma)
    +class metrolopy.distributions.LogNormalDist(mu, sigma)

    Bases: metrolopy.distributions.Distribution

    @@ -1019,11 +1018,11 @@

    Submodules
    -class metrolopy.distributions.MultiNormalDist(mean, cov)
    +class metrolopy.distributions.MultiNormalDist(mean, cov)

    Bases: metrolopy.distributions.MultivariateDistribution

    -property cov
    +property cov
    @@ -1040,11 +1039,11 @@

    Submodules
    -class metrolopy.distributions.MultiTDist(mean, cov, dof)
    +class metrolopy.distributions.MultiTDist(mean, cov, dof)

    Bases: metrolopy.distributions.MultivariateDistribution

    -property cov
    +property cov
    @@ -1061,13 +1060,13 @@

    Submodules
    -class metrolopy.distributions.MultiTElement(parent, index, dof)
    +class metrolopy.distributions.MultiTElement(parent, index, dof)

    Bases: metrolopy.distributions.MultivariateElement

    -class metrolopy.distributions.MultivariateDistribution(nd)
    +class metrolopy.distributions.MultivariateDistribution(nd)

    Bases: object

    @@ -1076,7 +1075,7 @@

    Submodules
    -property cov
    +property cov

    @@ -1093,7 +1092,7 @@

    Submodules
    -class metrolopy.distributions.MultivariateElement(parent, index)
    +class metrolopy.distributions.MultivariateElement(parent, index)

    Bases: metrolopy.distributions.Distribution

    @@ -1137,7 +1136,7 @@

    Submodules
    -class metrolopy.distributions.NormalDist(x, s)
    +class metrolopy.distributions.NormalDist(x, s)

    Bases: metrolopy.distributions.Distribution

    @@ -1170,7 +1169,7 @@

    Submodules
    -class metrolopy.distributions.PoissonDist(lam)
    +class metrolopy.distributions.PoissonDist(lam)

    Bases: metrolopy.distributions.Distribution

    @@ -1203,11 +1202,11 @@

    Submodules
    -class metrolopy.distributions.TDist(x, s, dof)
    +class metrolopy.distributions.TDist(x, s, dof)

    Bases: metrolopy.distributions.Distribution

    -bayesian_default = False
    +bayesian_default = False
    @@ -1241,7 +1240,7 @@

    Submodules
    -class metrolopy.distributions.TrapezoidalDist(lower_limit, upper_limit, top_to_base_ratio)
    +class metrolopy.distributions.TrapezoidalDist(lower_limit, upper_limit, top_to_base_ratio)

    Bases: metrolopy.distributions.Distribution

    @@ -1274,7 +1273,7 @@

    Submodules
    -class metrolopy.distributions.TriangularDist(mode, half_width=None, left_width=None, right_width=None, lower_limit=None, upper_limit=None)
    +class metrolopy.distributions.TriangularDist(mode, half_width=None, left_width=None, right_width=None, lower_limit=None, upper_limit=None)

    Bases: metrolopy.distributions.Distribution

    @@ -1307,7 +1306,7 @@

    Submodules
    -class metrolopy.distributions.UniformDist(center=None, half_width=None, lower_limit=None, upper_limit=None)
    +class metrolopy.distributions.UniformDist(center=None, half_width=None, lower_limit=None, upper_limit=None)

    Bases: metrolopy.distributions.Distribution

    @@ -1340,7 +1339,7 @@

    Submodules
    -class metrolopy.distributions.WeibullDist(shape, scale)
    +class metrolopy.distributions.WeibullDist(shape, scale)

    Bases: metrolopy.distributions.Distribution

    @@ -1376,37 +1375,37 @@

    Submodules

    metrolopy.exceptions module

    -exception metrolopy.exceptions.BudgetWarning
    +exception metrolopy.exceptions.BudgetWarning

    Bases: Warning

    -exception metrolopy.exceptions.CircularUnitConversionError
    +exception metrolopy.exceptions.CircularUnitConversionError

    Bases: metrolopy.exceptions.UnitError

    -exception metrolopy.exceptions.ConstantNotFoundError
    +exception metrolopy.exceptions.ConstantNotFoundError

    Bases: ValueError

    -exception metrolopy.exceptions.FitWarning
    +exception metrolopy.exceptions.FitWarning

    Bases: Warning

    -exception metrolopy.exceptions.GummyWarning
    +exception metrolopy.exceptions.GummyWarning

    Bases: Warning

    -exception metrolopy.exceptions.IncompatibleUnitsError
    +exception metrolopy.exceptions.IncompatibleUnitsError

    Bases: ValueError

    This exception is raised when an operation is attempted with gummys that have units that are incompatible for that operation.

    @@ -1414,51 +1413,51 @@

    Submodules
    -exception metrolopy.exceptions.NoSimulatedDataError
    +exception metrolopy.exceptions.NoSimulatedDataError

    Bases: Exception

    -exception metrolopy.exceptions.NoUnitConversionFoundError
    +exception metrolopy.exceptions.NoUnitConversionFoundError

    Bases: metrolopy.exceptions.UnitError

    -exception metrolopy.exceptions.UncertiantyPrecisionWarning
    +exception metrolopy.exceptions.UncertiantyPrecisionWarning

    Bases: Warning

    -exception metrolopy.exceptions.UnitError
    +exception metrolopy.exceptions.UnitError

    Bases: Exception

    Base class for Unit exceptions.

    -exception metrolopy.exceptions.UnitLibError
    +exception metrolopy.exceptions.UnitLibError

    Bases: metrolopy.exceptions.UnitError

    This exception is raised when the UnitLibrary cannot parse a unit string.

    -exception metrolopy.exceptions.UnitLibNotFoundError
    +exception metrolopy.exceptions.UnitLibNotFoundError

    Bases: metrolopy.exceptions.UnitLibError

    -exception metrolopy.exceptions.UnitNotFoundError
    +exception metrolopy.exceptions.UnitNotFoundError

    Bases: metrolopy.exceptions.UnitLibError

    -exception metrolopy.exceptions.UnitWarning
    +exception metrolopy.exceptions.UnitWarning

    Bases: Warning

    @@ -1468,7 +1467,7 @@

    Submodules
    -class metrolopy.fit.DoubleExpFit(x, y=None, p0=None, ux=None, uy=None, sigma_is_known=True, xunit=None, yunit=None, solver=None, maxiter=None, nprop=False, **kw)
    +class metrolopy.fit.DoubleExpFit(x, y=None, p0=None, ux=None, uy=None, sigma_is_known=True, xunit=None, yunit=None, solver=None, maxiter=None, nprop=False, **kw)

    Bases: metrolopy.fit.Fit

    DoubleExpFit(x,y,p0=None,ux=None,uy=None,sigma_is_known=True,xunit=None, yunit=None,

    solver=None,maxiter=None,nprop=False,**keywords)

    @@ -1826,7 +1825,7 @@

    Submodules
    -class metrolopy.fit.ExpFit(x, y=None, p0=None, ux=None, uy=None, sigma_is_known=True, xunit=None, yunit=None, solver=None, maxiter=None, nprop=False, **kw)
    +class metrolopy.fit.ExpFit(x, y=None, p0=None, ux=None, uy=None, sigma_is_known=True, xunit=None, yunit=None, solver=None, maxiter=None, nprop=False, **kw)

    Bases: metrolopy.fit.Fit

    ExpFit(x,y,p0=None,ux=None,uy=None,sigma_is_known=True,xunit=None, yunit=None,

    solver=None,maxiter=None,nprop=False,**keywords)

    @@ -2184,7 +2183,7 @@

    Submodules
    -class metrolopy.fit.Fit(x, y=None, p0=None, ux=None, uy=None, sigma_is_known=True, xunit=None, yunit=None, solver=None, maxiter=None, nprop=False, **kw)
    +class metrolopy.fit.Fit(x, y=None, p0=None, ux=None, uy=None, sigma_is_known=True, xunit=None, yunit=None, solver=None, maxiter=None, nprop=False, **kw)

    Bases: metrolopy.fit._Fit, metrolopy.printing.PrettyPrinter

    @@ -2276,7 +2275,7 @@

    Submodules
    -latex_math = None
    +latex_math = None

    @@ -2341,7 +2340,7 @@

    Submodules
    -class metrolopy.fit.OneOverTFit(x, y=None, p0=None, ux=None, uy=None, sigma_is_known=True, xunit=None, yunit=None, solver=None, maxiter=None, nprop=False, **kw)
    +class metrolopy.fit.OneOverTFit(x, y=None, p0=None, ux=None, uy=None, sigma_is_known=True, xunit=None, yunit=None, solver=None, maxiter=None, nprop=False, **kw)

    Bases: metrolopy.fit.Fit

    DoubleExpFit(x,y,p0=None,ux=None,uy=None,sigma_is_known=True,xunit=None, yunit=None,

    solver=None,maxiter=None,nprop=False,**keywords)

    @@ -2699,7 +2698,7 @@

    Submodules
    -class metrolopy.fit.PolyFit(x, y, deg=1, ux=None, uy=None, sigma_is_known=True, p0=None, xunit=None, yunit=None, solver=None, maxiter=None, nprop=False, **kw)
    +class metrolopy.fit.PolyFit(x, y, deg=1, ux=None, uy=None, sigma_is_known=True, p0=None, xunit=None, yunit=None, solver=None, maxiter=None, nprop=False, **kw)

    Bases: metrolopy.fit.Fit

    @@ -2779,7 +2778,7 @@

    Submodules
    -class metrolopy.fit.SinFit(x, y=None, p0=None, ux=None, uy=None, sigma_is_known=True, xunit=None, yunit=None, solver=None, maxiter=None, nprop=False, **kw)
    +class metrolopy.fit.SinFit(x, y=None, p0=None, ux=None, uy=None, sigma_is_known=True, xunit=None, yunit=None, solver=None, maxiter=None, nprop=False, **kw)

    Bases: metrolopy.fit.Fit

    SinFit(x,y,p0=None,ux=None,uy=None,sigma_is_known=True,xunit=None, yunit=None,

    solver=None,maxiter=None,nprop=False,**keywords)

    @@ -3518,11 +3517,11 @@

    Submodules
    -class metrolopy.gummy.MetaGummy
    +class metrolopy.gummy.MetaGummy

    Bases: metrolopy.printing.MetaPrettyPrinter

    -property bayesian
    +property bayesian

    bool

    Read/write at the class level, but read-only at the instance level. The default value is False; this should only be changed once at the @@ -3544,7 +3543,7 @@

    SubmodulesExample

    @@ -3558,7 +3557,7 @@

    Submodules
    -property cimethod
    +property cimethod

    str in {‘shortest’, ‘symmetric’}

    Get or set the method for calculating the confidence interval from Monte-Carlo data. If this property is set at the class level, it will @@ -3579,28 +3578,28 @@

    Submodules
    -property cmp_k
    +property cmp_k

    Get or set the coverage factor for comparisons between gummys. Setting this property sets the cmp_p property to None.

    -property cmp_p
    +property cmp_p

    Get or set the probability level to use when comparing gummys. Setting this property sets the cmp_k property to None.

    -property max_digits
    +property max_digits

    int

    Gets or sets the maximum number of digits in x to display.

    -property max_dof
    +property max_dof

    int

    Gets or sets the maximum finite value for dof. Any dof larger than max_dof will be rounded to float(‘inf’).

    @@ -3608,12 +3607,12 @@

    Submodules
    -property mulsep
    +property mulsep

    -property nsig
    +property nsig

    int

    Gets or sets the number of significant digits in the uncertainty to display.

    @@ -3621,7 +3620,7 @@

    Submodules
    -property p_method
    +property p_method

    str in {‘loc’, ‘cp’, ‘gauss’, ‘ccp’, ‘chebyshev’}

    This sets the default p_method attribute for newly created gummys which determines how the coverage factor is calculated from a given level of @@ -3637,7 +3636,7 @@

    Submodules
    -property rounding_u
    +property rounding_u

    bool

    If this is set to True then the uncertainty of the ummy or gummy includes a contribution to account for the finite resolution of the @@ -3646,7 +3645,7 @@

    Submodules
    -property sci_notation
    +property sci_notation

    bool or None

    Setting this to True or False forces or prevents scientific notation in the display of the value. If this is set to None thr scientific @@ -3656,24 +3655,24 @@

    Submodules
    -property sci_notation_high
    +property sci_notation_high

    see the sci_notation property

    -property sci_notation_low
    +property sci_notation_low

    see the sci_notation property

    -property solidus
    +property solidus
    -property style
    +property style

    Get or set the default display style for new gummys. This is a string with one of the following values:

      @@ -3735,7 +3734,7 @@

      Submodules
      -property thousand_spaces
      +property thousand_spaces

      bool

      Gets or sets a bool value that determines whether to insert a space to group digits in x.

      @@ -3745,7 +3744,7 @@

      Submodules
      -class metrolopy.gummy.gummy(x, u=0, unit=one, dof=inf, k=1, p=None, uunit=None, utype=None, name=None)
      +class metrolopy.gummy.gummy(x, u=0, unit=one, dof=inf, k=1, p=None, uunit=None, utype=None, name=None)

      Bases: metrolopy.unit.Quantity

      A gummy object represents a numerical value with an uncertainty and (or) a unit. They can be used in place of float values in Python expressions and @@ -3812,7 +3811,7 @@

      Submodules
      -property U
      +property U

      Gets the expanded uncertainty. This property is read-only but changing the coverage factor (setting the k property), the level of confidence (setting the p property), or changing the units of the uncertainty @@ -3856,7 +3855,7 @@

      Submodules
      -property Usim
      +property Usim

      Gets the expanded uncertainty plus and minus components calculated from Monte-Carlo data at the level of confidence given by the p property. The return value is a tuple equivalent to (cisim[1] - xsim,xsim - cisim[0]), @@ -3873,7 +3872,7 @@

      Submodules
      -classmethod apply(function, derivative, *args)
      +classmethod apply(function, derivative, *args)

      A classmethod that applies a function to one or more gummy or jummy objects propagating the uncertainty.

      @@ -3948,7 +3947,7 @@

      Submodules
      -bayesian = False
      +bayesian = False

      @@ -4062,12 +4061,12 @@

      Submodules
      -cimethod = 'shortest'
      +cimethod = 'shortest'

      -property cisim
      +property cisim

      Gets the confidence interval using the Monte-Carlo data with the level of confidence as set with the p property. A tuple is returned with the first element giving the lower limit and the second element @@ -4106,10 +4105,29 @@

      Submodules
      -static correlation_matrix(gummys)
      +static correlation_matrix(gummys)

      Returns the correlation matrix of a list or array of gummys.

      +
      +
      +static correlation_matrix_sim(gummys)
      +

      The staticmethod takes a list of gummys an returns the correlation +matrix calculated from Monte-Carlo data. The return value is numpy +ndarray.

      +

      See the method gummy.correlation_matrix(gummys) for the corresponding +result based on first order error propagation.

      +
      + +
      +
      +correlation_sim(gummy)
      +

      Returns the correlation coefficient, calculated from Monte-Carlo data, +between the owning gummy and the gummy g.

      +

      See the method gummy.correlation(g) for the corresponding result based +on first order error propagation.

      +
      +
      covariance(gummy)
      @@ -4118,13 +4136,32 @@

      Submodules
      -static covariance_matrix(gummys)
      +static covariance_matrix(gummys)

      Returns the variance-covariance matrix of a list or array of gummys.

      +
      +
      +static covariance_matrix_sim(gummys)
      +

      The staticmethod takes a list of gummys an returns the variance-covariance +matrix calculated from Monte-Carlo data. The return value is numpy +ndarray.

      +

      See the method gummy.covariance_matrix(gummys) for the corresponding +result based on first order error propagation.

      +
      + +
      +
      +covariance_sim(gummy)
      +

      Returns the covariance, calculated from Monte-Carlo data, between the +owning gummy and the gummy g.

      +

      See the method gummy.covariance(g) for the corresponding result based +on first order error propagation.

      +
      +
      -static covplot(x, y, title=None, xlabel=None, ylabel=None, mean_marker=False, mean_marker_options={}, hold=False, math=None, **plot_options)
      +static covplot(x, y, title=None, xlabel=None, ylabel=None, mean_marker=False, mean_marker_options={}, hold=False, math=None, **plot_options)

      Creates scatter plot showing the covariance between two gummys.

      Parameters
      @@ -4155,7 +4192,7 @@

      Submodules
      -classmethod create(x, u=0, unit=one, dof=inf, k=1, p=None, uunit=None, utype=None, name=None, correlation_matrix=None, covariance_matrix=None)
      +classmethod create(x, u=0, unit=one, dof=inf, k=1, p=None, uunit=None, utype=None, name=None, correlation_matrix=None, covariance_matrix=None)

      A class method that creates a list of correlated gummys.

      Parameters
      @@ -4179,11 +4216,8 @@

      SubmodulesReturns -

      -
      -
      Return type
      -

      a list of gummys

      +
      Return type
      +

      a list of gummys

      Notes

      @@ -4197,14 +4231,14 @@

      Submodules
      -property distribution
      +property distribution

      read-only

      Returns ths Distribution instance associated with the gummy.

      -property dof
      +property dof

      float, read-only

      Returns the number or degrees of freedom that the uncertainty of the gummy is based on. If the gummy was created as the result of an @@ -4229,11 +4263,8 @@

      Submodules

      x (gummy, str, or array_like) – A gummy, a string referencing a utype or a list containing gummys and strings.

      -
      Returns
      -

      -
      -
      Return type
      -

      float

      +
      Return type
      +

      float

      Example

      @@ -4249,18 +4280,32 @@

      Submodules
      -exception_on_fmt_error = False
      +exception_on_fmt_error = False

      -property finfo
      +property finfo
      get_name(fmt='unicode', norm=None)
      -
      +
      +
      Parameters
      +
        +
      • fmt (The format, must be a str in {‘unicode’,’html’,’latex’,’ascii’}.) – The default is ‘unicode’.

      • +
      • norm (An optional function which returns the name in nomral text. This) – function is applied to the name before it is returned if +fmt = ‘latex’, name has been set to single string, and the name +is more than one character long. The default is +‘text{’ + name + ‘}’.

      • +
      +
      +
      Return type
      +

      str, the name in the requested format.

      +
      +
      +

    @@ -4342,20 +4387,20 @@

    Submodules
    -property imag
    +property imag

    -
    -property independant
    +
    +property independent

    bool, read-only

    Returns False if the owning gummy was created from a operation involving -other gummys and True otherwise.

    +other gummys or has zero uncertainty and True otherwise.

    -property k
    +property k

    Get or set the coverage factor; must be > 0.

    The expanded uncertainty U (see the U property) is related to the standard uncertainty u (see the u property) by U = k`*`u. @@ -4388,7 +4433,7 @@

    Submodules
    -property ksim
    +property ksim

    read-only

    Returns 0.5*(gummy.Usim[0] + gummy.Usim[1])/gummy.usim

    @@ -4404,23 +4449,28 @@

    Submodules
    -max_digits = 15
    +max_digits = 15

    -mulsep = False
    +mulsep = False
    -property name
    -

    gets or sets an optional name for the gummy, may be str or None

    +property name +

    gets or sets an optional name for the gummy, may be str, None or a +length four tuple of str. If name is set to a length four tuple +the elements are, in order, the unicode name, the html name, the latex +name and the ASCII name. Getting this property returns only the unicode +name not the full tuple. Use the get_name method to get the name +in html, latex or ASCII format.

    -classmethod napply(function, *args, fxx=None)
    +classmethod napply(function, *args, fxx=None)

    gummy.napply(function, arg1, arg2, …) and jummy.napply(function, arg1, arg2, …)

    A classmethod that applies a function to one or more gummy or jummy @@ -4469,12 +4519,12 @@

    Submodules
    -nsig = 2
    +nsig = 2

    -property p
    +property p

    Get or set the level of confidence; must be in the interval (0,1).

    The expanded uncertainty U (see the U property) is related to the standard uncertainty u (see the u property) by U = k`*`u. @@ -4507,43 +4557,43 @@

    Submodules
    -property real
    +property real

    returns a copy of the gummy

    -sci_notation = None
    +sci_notation = None
    -sci_notation_high = 7
    +sci_notation_high = 7
    -sci_notation_low = -3
    +sci_notation_low = -3
    -show_dof = None
    +show_dof = None
    -show_k = None
    +show_k = None
    -show_name = True
    +show_name = True
    -show_p = None
    +show_p = None
    @@ -4568,7 +4618,7 @@

    Submodules
    -property simdata
    +property simdata

    numpy.ndarray, read-only

    Returns an array containing the Monte-Carlo simulation data. A NoSimulatedDataError is raised if no Monte-Carlo data is available.

    @@ -4576,7 +4626,7 @@

    Submodules
    -property simsorted
    +property simsorted

    numpy.ndarray, read-only

    Returns a sorted array containing the Monte-Carlo simulation data. A NoSimulatedDataError is raised if no Monte-Carlo data is available.

    @@ -4584,7 +4634,7 @@

    Submodules
    -static simulate(gummys, n=100000, ufrom=None)
    +static simulate(gummys, n=100000, ufrom=None)

    Generates Monte-Carlo data for one or more gummys. Calling this method erases previously generated Monte-Carlo data for all gummys. See also the gummy.sim() method to generate data for one gummy only.

    @@ -4603,12 +4653,12 @@

    Submodules
    -slashaxis = True
    +slashaxis = True

    -solidus = True
    +solidus = True
    @@ -4619,12 +4669,12 @@

    Submodules
    -style = 'concise'
    +style = 'concise'

    -thousand_spaces = True
    +thousand_spaces = True
    @@ -4674,7 +4724,7 @@

    Submodules
    -property u
    +property u

    Gets the gummy standard uncertainty in the units given by the units property (not the uunits property). The standard uncertainty is sometimes called the “1-sigma” uncertainty. The This property is read-only @@ -4683,7 +4733,7 @@

    Submodules
    -property ubreakdown
    +property ubreakdown

    list of str or None, default is None

    If this is set to a list containing strings referencing utypes then when the gummy is printed, the uncertainty from each utype will be @@ -4715,11 +4765,8 @@

    Submodules

    x (gummy, str, or array_like) – A gummy, a string referencing a utype or a list containing gummys and strings.

    -
    Returns
    -

    -
    -
    Return type
    -

    float

    +
    Return type
    +

    float

    Example

    @@ -4742,7 +4789,7 @@

    Submodules
    -property unit
    +property unit

    Gets or sets the unit for x `and, if the `uunit attribute is None, the units for the uncertainty.

    If this property is set, a unit conversion will be performed. The value @@ -4763,7 +4810,7 @@

    Submodules
    -property usim
    +property usim

    Gets the standard deviation of the Monte-Carlo data. If no simulated data is available a NoSimulatedDataError will be raised when this property is called; see the sim and simulate methods. This property is read-only.

    @@ -4771,14 +4818,14 @@

    Submodules
    -property utype
    +property utype

    str or None

    An arbitrary string value labeling the uncertainty type.

    -property uunit
    +property uunit

    Gets or sets the units for the expanded uncertainty (see the U property). This property may be set to a unit with the same dimension as the unit property or to a dimensionless unit such at “%” or “ppm” @@ -4824,21 +4871,21 @@

    Submodules
    -property uunit_is_rel
    +property uunit_is_rel

    Returns True if gummy.U is a relative uncertainty and False otherwise. This property is read-only.

    -property x
    +property x

    Gets the gummy’s value. Usually this is the mean of the probability distribution. This property is read-only and returns a float.

    -property xsim
    +property xsim

    Gets the mean value of the Monte-Carlo data. If no simulated data is available a NoSimulatedDataError will be raised when this property is called; see the sim and simulate methods. This property is read-only.

    @@ -4848,7 +4895,7 @@

    Submodules
    -class metrolopy.gummy.jummy(real=None, imag=None, r=None, phi=None, cov=None, name=None)
    +class metrolopy.gummy.jummy(real=None, imag=None, r=None, phi=None, cov=None, name=None)

    Bases: metrolopy.ummy.immy

    @@ -4857,12 +4904,12 @@

    Submodules
    -property name
    +property name

    -show_name = True
    +show_name = True
    @@ -4891,7 +4938,7 @@

    Submodules
    -class metrolopy.logunit.LogConversion(reference, multiplier, log_base, log_func, offset=0)
    +class metrolopy.logunit.LogConversion(reference, multiplier, log_base, log_func, offset=0)

    Bases: metrolopy.nonlinearunit.NonlinearConversion

    @@ -4917,7 +4964,7 @@

    Submodules
    -class metrolopy.logunit.LogUnit(*p, **kwds)
    +class metrolopy.logunit.LogUnit(*p, **kwds)

    Bases: metrolopy.nonlinearunit.NonlinearUnit

    @@ -4954,11 +5001,8 @@

    SubmodulesParameters

    x (array_like of float) – the data

    -
    Returns
    -

    -
    -
    Return type
    -

    numpy.ndarray

    +
    Return type
    +

    numpy.ndarray

    Notes

    @@ -4969,7 +5013,7 @@

    Submodules
    -metrolopy.mean.delta_diff_mean(x, n_sigma=None, unit=1, bayesian=None)
    +metrolopy.mean.delta_diff_mean(x, n_sigma=None, unit=1)

    Returns a gummy representing the mean value and uncertainty of a delta type difference taken on the data. A delta type difference removes a linear drift from the data by taking differences:

    @@ -4985,7 +5029,7 @@

    SubmodulesParameters

    x (array_like of float) – the data

    -
    Returns
    -

    -
    -
    Return type
    -

    numpy.ndarray

    +
    Return type
    +

    numpy.ndarray

    @@ -5047,7 +5088,7 @@

    Submodules
    -metrolopy.mean.mean(x, n_sigma_trim=3, unit=1, ignore_nan=True, use_n_eff=None, bayesian=None)
    +metrolopy.mean.mean(x, n_sigma_trim=3, unit=1, ignore_nan=True, use_n_eff=None)

    Returns a gummy representing the mean of a float array.

    Parameters
    @@ -5065,7 +5106,7 @@

    Submodules
    -class metrolopy.nonlinearunit.NonlinearConversion(unit, factor=1)
    +class metrolopy.nonlinearunit.NonlinearConversion(unit, factor=1)

    Bases: metrolopy.unit.Conversion

    Base class for non-linear conversions.

    @@ -5156,7 +5197,7 @@

    Submodules
    -linear = False
    +linear = False

    @@ -5173,7 +5214,7 @@

    Submodules
    -class metrolopy.nonlinearunit.NonlinearUnit(name, symbol, conversion=None, short_name=None, add_symbol=False, html_symbol=None, latex_symbol=None, ascii_symbol=None, description=None, order=- 1, **kwds)
    +class metrolopy.nonlinearunit.NonlinearUnit(name, symbol, conversion=None, short_name=None, add_symbol=False, html_symbol=None, latex_symbol=None, ascii_symbol=None, description=None, order=- 1, **kwds)

    Bases: metrolopy.unit.Unit

    Base class of non-linear units.

    @@ -5200,7 +5241,7 @@

    Submodules
    -class metrolopy.nonlinearunit.ReciprocalConversion(conversion)
    +class metrolopy.nonlinearunit.ReciprocalConversion(conversion)

    Bases: metrolopy.nonlinearunit.NonlinearConversion

    @@ -5233,16 +5274,16 @@

    Submodules
    -class metrolopy.nummy.nummy(x, u=0, dof=inf, utype=None, name=None)
    +class metrolopy.nummy.nummy(x, u=0, dof=inf, utype=None, name=None)

    Bases: metrolopy.ummy.ummy

    -property Usim
    +property Usim
    -property bayesian
    +property bayesian

    bool

    Read/write at the class level, but read-only at the instance level. The default value is False; this should only be changed once at the @@ -5264,7 +5305,7 @@

    SubmodulesExample

    @@ -5278,7 +5319,7 @@

    Submodules
    -property cimethod
    +property cimethod

    str in {‘shortest’, ‘symmetric’}), default is ‘shortest’

    Get or set the method for calculating the confidence interval from Monte-Carlo data. If this property is set at the class level, it will @@ -5299,12 +5340,12 @@

    Submodules
    -property cisim
    +property cisim

    -static correlation_matrix_sim(gummys)
    +static correlation_matrix_sim(gummys)

    The staticmethod takes a list of gummys an returns the correlation matrix calculated from Monte-Carlo data. The return value is numpy ndarray.

    @@ -5323,7 +5364,7 @@

    Submodules
    -static covariance_matrix_sim(gummys)
    +static covariance_matrix_sim(gummys)

    The staticmethod takes a list of gummys an returns the variance-covariance matrix calculated from Monte-Carlo data. The return value is numpy ndarray.

    @@ -5342,12 +5383,12 @@

    Submodules
    -static covplot(x, y, title=None, xlabel=None, ylabel=None, hold=False, **kwds)
    +static covplot(x, y, title=None, xlabel=None, ylabel=None, hold=False, **kwds)

    -classmethod create(x, u=0, dof=inf, name=None, correlation_matrix=None, covariance_matrix=None)
    +classmethod create(x, u=0, dof=inf, name=None, correlation_matrix=None, covariance_matrix=None)

    A class method that creates a list of (possibly) correlated ummys.

    Parameters
    @@ -5371,25 +5412,22 @@

    SubmodulesReturns -

    -
    -
    Return type
    -

    a list of ummys

    +
    Return type
    +

    a list of ummys

    -property distribution
    +property distribution

    read-only

    Returns ths Distribution instance associated with the gummy.

    -property dof
    +property dof

    float, read-only

    Returns the number or degrees of freedom that the uncertainty of the gummy is based on. If gummy.bayesian is set to False, then the Welch- @@ -5414,7 +5452,7 @@

    Submodules
    -property independent
    +property independent

    bool, read-only

    Returns False if the owning gummy was created from a operation involving other gummys and True otherwise.

    @@ -5422,31 +5460,31 @@

    Submodules
    -property ksim
    +property ksim

    read-only

    Returns 0.5*(gummy.Usim[0] + gummy.Usim[1])/gummy.usim

    -property name
    +property name
    -property p
    +property p
    -static set_seed(seed)
    +static set_seed(seed)

    Sets the seed for the numpy.random.RandomState object shared by all Distribution instances.

    -property simdata
    +property simdata

    numpy.ndarray, read-only

    Returns an array containing the Monte-Carlo simulation data. A NoSimulatedDataError is raised if no Monte-Carlo data is available.

    @@ -5454,7 +5492,7 @@

    Submodules
    -property simsorted
    +property simsorted

    numpy.ndarray, read-only

    Returns a sorted array containing the Monte-Carlo simulation data. A NoSimulatedDataError is raised if no Monte-Carlo data is available.

    @@ -5462,7 +5500,7 @@

    Submodules
    -static simulate(nummys, n=100000, ufrom=None)
    +static simulate(nummys, n=100000, ufrom=None)

    @@ -5487,11 +5525,8 @@

    Submodules

    x (gummy, str, or array_like) – A gummy, a string referencing a utype or a list containing gummys and strings.

    -
    Returns
    -

    -
    -
    Return type
    -

    float

    +
    Return type
    +

    float

    Example

    @@ -5507,12 +5542,12 @@

    Submodules
    -property usim
    +property usim

    -property xsim
    +property xsim

    @@ -5523,7 +5558,7 @@

    Submodules
    -class metrolopy.offsetunit.OffsetConversion(unit, offset)
    +class metrolopy.offsetunit.OffsetConversion(unit, offset)

    Bases: metrolopy.nonlinearunit.NonlinearConversion

    Represents a conversion of the form x -> x + offset.

    @@ -5545,7 +5580,7 @@

    Submodules
    -class metrolopy.offsetunit.OffsetUnit(*params, **kwds)
    +class metrolopy.offsetunit.OffsetUnit(*params, **kwds)

    Bases: metrolopy.nonlinearunit.NonlinearUnit

    This class was created to handle units such as the degree Celsius and the degree Fahrenheit. This class takes the same parameters as the Unit class, @@ -5585,11 +5620,8 @@

    Submodules -
    Returns
    -

    -
    -
    Return type
    -

    float

    +
    Return type
    +

    float

    @@ -5628,7 +5660,7 @@

    Submodules
    -class metrolopy.prefixedunit.BinaryPrefixedUnit(name, symbol, conversion=None, short_name=None, additional_names=None, additional_short_names=None, add_symbol=False, html_symbol=None, latex_symbol=None, ascii_symbol=None, linear=True, description=None, order=- 1, prefixes=None, base_prefix=None, base_description=None, **kwds)
    +class metrolopy.prefixedunit.BinaryPrefixedUnit(name, symbol, conversion=None, short_name=None, additional_names=None, additional_short_names=None, add_symbol=False, html_symbol=None, latex_symbol=None, ascii_symbol=None, linear=True, description=None, order=- 1, prefixes=None, base_prefix=None, base_description=None, **kwds)

    Bases: metrolopy.prefixedunit.PrefixedUnit

    PrefixedUnit(name,symbol,conversion=None,short_name=None,

    additional_names=None,additional_short_names=None, @@ -5644,14 +5676,14 @@

    Submodules
    -prefix_definitions = {'exa': [1e+18, 'E', None, None, None], 'exbi': [1152921504606846976, 'Ei', None, None, None], 'gibi': [1073741824, 'Gi', None, None, None], 'giga': [1000000000.0, 'G', None, None, None], 'kibi': [1024, 'Ki', None, None, None], 'kilo': [1000, 'k', None, None, None], 'mebi': [1048576, 'Mi', None, None, None], 'mega': [1000000.0, 'M', None, None, None], 'pebi': [1125899906842624, 'Pi', None, None, None], 'peta': [1000000000000000.0, 'P', None, None, None], 'tebi': [1099511627776, 'Ti', None, None, None], 'tera': [1000000000000.0, 'T', None, None, None], 'yobi': [1208925819614629174706176, 'Yi', None, None, None], 'yotta': [1e+24, 'Y', None, None, None], 'zetta': [1e+21, 'Z', None, None, None], 'zibi': [1180591620717411303424, 'Zi', None, None, None]}
    +prefix_definitions = {'exa': [1e+18, 'E', None, None, None], 'exbi': [1152921504606846976, 'Ei', None, None, None], 'gibi': [1073741824, 'Gi', None, None, None], 'giga': [1000000000.0, 'G', None, None, None], 'kibi': [1024, 'Ki', None, None, None], 'kilo': [1000, 'k', None, None, None], 'mebi': [1048576, 'Mi', None, None, None], 'mega': [1000000.0, 'M', None, None, None], 'pebi': [1125899906842624, 'Pi', None, None, None], 'peta': [1000000000000000.0, 'P', None, None, None], 'tebi': [1099511627776, 'Ti', None, None, None], 'tera': [1000000000000.0, 'T', None, None, None], 'yobi': [1208925819614629174706176, 'Yi', None, None, None], 'yotta': [1e+24, 'Y', None, None, None], 'zetta': [1e+21, 'Z', None, None, None], 'zibi': [1180591620717411303424, 'Zi', None, None, None]}

    -class metrolopy.prefixedunit.PrefixedUnit(name, symbol, conversion=None, short_name=None, additional_names=None, additional_short_names=None, add_symbol=False, html_symbol=None, latex_symbol=None, ascii_symbol=None, linear=True, description=None, order=- 1, prefixes=None, base_prefix=None, base_description=None, **kwds)
    +class metrolopy.prefixedunit.PrefixedUnit(name, symbol, conversion=None, short_name=None, additional_names=None, additional_short_names=None, add_symbol=False, html_symbol=None, latex_symbol=None, ascii_symbol=None, linear=True, description=None, order=- 1, prefixes=None, base_prefix=None, base_description=None, **kwds)

    Bases: metrolopy.unit.Unit

    PrefixedUnit(name,symbol,conversion=None,short_name=None,

    additional_names=None,additional_short_names=None, @@ -5666,7 +5698,7 @@

    Submodules
    -prefix_definitions = {'atto': [1e-18, 'a', None, None, None], 'centi': [0.01, 'c', None, None, None], 'deca': [10, 'da', None, None, None], 'deci': [0.1, 'd', None, None, None], 'exa': [1e+18, 'E', None, None, None], 'femto': [1e-15, 'f', None, None, None], 'giga': [1000000000.0, 'G', None, None, None], 'hecto': [100, 'h', None, None, None], 'kilo': [1000, 'k', None, None, None], 'mega': [1000000, 'M', None, None, None], 'micro': [1e-06, 'μ', '&mu;', None, 'u'], 'milli': [0.001, 'm', None, None, None], 'nano': [1e-09, 'n', None, None, None], 'peta': [1000000000000000.0, 'P', None, None, None], 'pico': [1e-12, 'p', None, None, None], 'tera': [1000000000000.0, 'T', None, None, None], 'yocto': [1e-24, 'y', None, None, None], 'yotta': [1e+24, 'Y', None, None, None], 'zepto': [1e-21, 'z', None, None, None], 'zetta': [1e+21, 'Z', None, None, None]}
    +prefix_definitions = {'atto': [1e-18, 'a', None, None, None], 'centi': [0.01, 'c', None, None, None], 'deca': [10, 'da', None, None, None], 'deci': [0.1, 'd', None, None, None], 'exa': [1e+18, 'E', None, None, None], 'femto': [1e-15, 'f', None, None, None], 'giga': [1000000000.0, 'G', None, None, None], 'hecto': [100, 'h', None, None, None], 'kilo': [1000, 'k', None, None, None], 'mega': [1000000, 'M', None, None, None], 'micro': [1e-06, 'μ', '&mu;', None, 'u'], 'milli': [0.001, 'm', None, None, None], 'nano': [1e-09, 'n', None, None, None], 'peta': [1000000000000000.0, 'P', None, None, None], 'pico': [1e-12, 'p', None, None, None], 'tera': [1000000000000.0, 'T', None, None, None], 'yocto': [1e-24, 'y', None, None, None], 'yotta': [1e+24, 'Y', None, None, None], 'zepto': [1e-21, 'z', None, None, None], 'zetta': [1e+21, 'Z', None, None, None]}

    @@ -5678,11 +5710,11 @@

    Submodules
    -class metrolopy.printing.MetaPrettyPrinter
    +class metrolopy.printing.MetaPrettyPrinter

    Bases: type

    -property printer
    +property printer

    Get or set the prefered display printer. This is a string with one of the following values:

    “any”, “latex”, “html”, “unicode”, “ascii”, or “any_but_latex”

    @@ -5698,7 +5730,7 @@

    Submodules
    -class metrolopy.printing.PrettyPrinter
    +class metrolopy.printing.PrettyPrinter

    Bases: object

    @@ -5710,7 +5742,7 @@

    Submodules
    -break_on_printing_error = False
    +break_on_printing_error = False

    @@ -5751,7 +5783,7 @@

    Submodules
    -printer = 'any_but_latex'
    +printer = 'any_but_latex'

    @@ -5827,7 +5859,7 @@

    Submodules
    -class metrolopy.relunits.RatioUnit(name, symbol, conversion=None, short_name=None, add_symbol=False, html_symbol=None, latex_symbol=None, ascii_symbol=None, description=None, order=- 1, **kwds)
    +class metrolopy.relunits.RatioUnit(name, symbol, conversion=None, short_name=None, add_symbol=False, html_symbol=None, latex_symbol=None, ascii_symbol=None, description=None, order=- 1, **kwds)

    Bases: metrolopy.unit.Unit

    RatioUnit is used for dimensionless units like % where powers, e.g. %**2, are not desired.

    @@ -5849,7 +5881,7 @@

    Submodules
    -class metrolopy.ummy.GummyTag(tag_name)
    +class metrolopy.ummy.GummyTag(tag_name)

    Bases: object

    @@ -5858,37 +5890,37 @@

    Submodules
    -static set_tag(g, tag)
    +static set_tag(g, tag)

    -tags = <WeakValueDictionary>
    +tags = <WeakValueDictionary>

    -class metrolopy.ummy.MFraction(*args, **kwargs)
    +class metrolopy.ummy.MFraction(*args, **kwargs)

    Bases: fractions.Fraction

    A fraction.Fraction sub-class that works with mpmath.mpf objects

    -class metrolopy.ummy.MetaImmy
    +class metrolopy.ummy.MetaImmy

    Bases: metrolopy.printing.MetaPrettyPrinter

    -property imag_symbol
    +property imag_symbol

    str

    The symbol for the unit imaginary number. The default is ‘j’.

    -property style
    +property style

    str in {‘polar’,’cartesian’}

    Sets whether to print the value using a cartesian or polar representaion. This property can be set at the class or instance @@ -5899,7 +5931,7 @@

    Submodules
    -class metrolopy.ummy.immy(real=None, imag=None, r=None, phi=None, cov=None)
    +class metrolopy.ummy.immy(real=None, imag=None, r=None, phi=None, cov=None)

    Bases: metrolopy.printing.PrettyPrinter, metrolopy.dfunc.Dfunc

    @@ -5926,35 +5958,35 @@

    Submodules
    -property cov
    +property cov

    Returns the variance-covariance matrix between the real and imaginary parts of the value, read-only.

    -property imag
    +property imag

    read-only Returns the imaginary part of the value.

    -property phi
    +property phi

    read-only Returns the polar angle of the value.

    -property r
    +property r

    read-only Returns the magnitude of the value.

    -property real
    +property real

    read-only Returns real part of the value.

    @@ -5966,7 +5998,7 @@

    Submodules
    -style = 'cartesian'
    +style = 'cartesian'

    @@ -5983,7 +6015,7 @@

    Submodules
    -property x
    +property x

    Returns complex(self.real.x,self.imag.x), read-only

    @@ -5991,7 +6023,7 @@

    Submodules
    -class metrolopy.ummy.ummy(x, u=0, dof=inf, utype=None)
    +class metrolopy.ummy.ummy(x, u=0, dof=inf, utype=None)

    Bases: metrolopy.dfunc.Dfunc, metrolopy.printing.PrettyPrinter

    @@ -6022,7 +6054,7 @@

    Submodules
    -static correlation_matrix(gummys)
    +static correlation_matrix(gummys)

    Returns the correlation matrix of a list or array of ummys.

    @@ -6034,13 +6066,13 @@

    Submodules
    -static covariance_matrix(gummys)
    +static covariance_matrix(gummys)

    Returns the variance-covariance matrix of a list or array of ummys.

    -classmethod create(x, u=None, dof=None, correlation_matrix=None, covariance_matrix=None)
    +classmethod create(x, u=None, dof=None, correlation_matrix=None, covariance_matrix=None)

    A class method that creates a list of (possibly) correlated ummys.

    Parameters
    @@ -6064,18 +6096,15 @@

    SubmodulesReturns -

    -
    -
    Return type
    -

    a list of ummys

    +
    Return type
    +

    a list of ummys

    -property dof
    +property dof

    float, read-only

    Returns the number or degrees of freedom that the uncertainty of the ummy is based on. If the ummy was created as the result of an @@ -6100,11 +6129,8 @@

    Submodules

    x (ummy, str, or array_like) – A ummy, a string referencing a utype or a list containing ummys and strings.

    -
    Returns
    -

    -
    -
    Return type
    -

    float

    +
    Return type
    +

    float

    Example

    @@ -6120,52 +6146,52 @@

    Submodules
    -property finfo
    +property finfo

    -property imag
    +property imag
    -max_digits = 15
    +max_digits = 15
    -max_dof = 10000
    +max_dof = 10000
    -nsig = 2
    +nsig = 2
    -property real
    +property real
    -rounding_u = False
    +rounding_u = False
    -sci_notation = None
    +sci_notation = None
    -sci_notation_high = 7
    +sci_notation_high = 7
    -sci_notation_low = -3
    +sci_notation_low = -3
    @@ -6176,7 +6202,7 @@

    Submodules
    -thousand_spaces = True
    +thousand_spaces = True

    @@ -6192,7 +6218,7 @@

    Submodules
    -property u
    +property u

    @@ -6205,11 +6231,8 @@

    Submodules

    x (ummy, str, or array_like) – A ummy, a string referencing a utype or a list containing ummys and strings.

    -
    Returns
    -

    -
    -
    Return type
    -

    float

    +
    Return type
    +

    float

    Example

    @@ -6225,14 +6248,14 @@

    Submodules
    -property utype
    +property utype

    str or None

    An arbitrary string value labeling the uncertainty type.

    -property x
    +property x

    @@ -6244,7 +6267,7 @@

    Submodules
    -class metrolopy.unit.Conversion(unit, factor=1)
    +class metrolopy.unit.Conversion(unit, factor=1)

    Bases: object

    Represents a unit conversion. This class should only be used as arguments to Unit object initializers. Each conversion should be associated with @@ -6282,7 +6305,7 @@

    Submodules
    -linear = True
    +linear = True

    @@ -6297,14 +6320,14 @@

    Submodules
    -property unit
    +property unit

    -class metrolopy.unit.Quantity(value, unit=one)
    +class metrolopy.unit.Quantity(value, unit=one)

    Bases: metrolopy.printing.PrettyPrinter

    Instances of this class represent a quantity with a value and a unit. The behavior of Quantity instances under mathematical operations with @@ -6330,7 +6353,7 @@

    Submodules
    -property c
    +property c

    This read-only property is used as a conversion flag during calculations. When an arithmetic operation is carried out between two Quantaties with different units, a unit conversion on one of the input quantities may be @@ -6380,12 +6403,12 @@

    Submodules
    -property imag
    +property imag

    -property real
    +property real
    @@ -6410,7 +6433,7 @@

    Submodules
    -splonk_func_ret = False
    +splonk_func_ret = False

    @@ -6430,7 +6453,7 @@

    Submodules
    -property unit
    +property unit

    Gets or sets the unit for the Quantity.

    If this property is set, a unit conversion will be performed. The value it is set to may be a string, None, a Unit object, or the integer 1. @@ -6450,14 +6473,14 @@

    Submodules
    -property value
    +property value

    -class metrolopy.unit.QuantityArray(value, unit=one)
    +class metrolopy.unit.QuantityArray(value, unit=one)

    Bases: metrolopy.unit.Quantity

    A subclass of Quantity. Instance of this class represent a list, tuple, or numpy array of values all with the same unit. Elements of the array @@ -6477,7 +6500,7 @@

    Submodules
    -class metrolopy.unit.Unit(name, symbol, conversion=None, short_name=None, add_symbol=False, html_symbol=None, latex_symbol=None, ascii_symbol=None, description=None, order=- 1, **kwds)
    +class metrolopy.unit.Unit(name, symbol, conversion=None, short_name=None, add_symbol=False, html_symbol=None, latex_symbol=None, ascii_symbol=None, description=None, order=- 1, **kwds)

    Bases: metrolopy.printing.PrettyPrinter, metrolopy.indexed.Indexed

    Creating an instance of this class creates a representation of a physical unit and adds it to the unit library. Once created the unit intance may @@ -6542,7 +6565,7 @@

    Submodules
    -property conversion
    +property conversion

    Gets or sets the Conversion instance for the unit.

    *This property is not intended to be used directly and setting this property may cause problems*

    @@ -6556,12 +6579,12 @@

    Submodules
    -static format_latex(text)
    +static format_latex(text)

    -property is_dimensionless
    +property is_dimensionless

    bool, read-only

    Returns True if a conversion exists between self and one, and False if not.

    @@ -6569,7 +6592,7 @@

    Submodules
    -property linear
    +property linear

    Gets a bool value indicating whether the Unit is linear. If the unit is linear then any associated values will follow the standard rules of arithmatic for Quantaties and the unit’s Conversion is @@ -6580,12 +6603,12 @@

    Submodules
    -mulsep = False
    +mulsep = False

    -static reorder(txt)
    +static reorder(txt)

    This changes the order in which the symbols of composite derived units are displayed.

    Examples

    @@ -6602,12 +6625,12 @@

    Submodules
    -solidus = True
    +solidus = True

    -static unit(txt, exception=True)
    +static unit(txt, exception=True)

    Finds an returns a Unit from the unit library.

    Parameters
    @@ -6645,7 +6668,7 @@

    Submodules
    -property units
    +property units

    read-only

    Returns a list of the constituent units and their exponents, e.g. for kg m**2/s units would be [(kg, 1), (m, 2), (s, -1)].

    @@ -6774,8 +6797,9 @@

    Submodules
    -

    Table of Contents

    -
    @@ -60,8 +60,9 @@

    Submodules
    -

    Table of Contents

    -
    @@ -97,7 +97,7 @@

    This Page

    Quick search

    @@ -116,13 +116,13 @@

    Navigation

  • modules |
  • - + \ No newline at end of file diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv index 1b287ba..593da50 100644 Binary files a/docs/_build/html/objects.inv and b/docs/_build/html/objects.inv differ diff --git a/docs/_build/html/py-modindex.html b/docs/_build/html/py-modindex.html index 8df98f1..8081813 100644 --- a/docs/_build/html/py-modindex.html +++ b/docs/_build/html/py-modindex.html @@ -5,7 +5,7 @@ - Python Module Index — metrolopy 0.6.2 documentation + Python Module Index — metrolopy 0.6.3 documentation @@ -27,7 +27,7 @@

    Navigation

  • modules |
  • - + @@ -187,7 +187,7 @@

    Python Module Index

    Quick search

    @@ -206,13 +206,13 @@

    Navigation

  • modules |
  • - + \ No newline at end of file diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html index 456cbe0..760bcc0 100644 --- a/docs/_build/html/search.html +++ b/docs/_build/html/search.html @@ -5,7 +5,7 @@ - Search — metrolopy 0.6.2 documentation + Search — metrolopy 0.6.3 documentation @@ -30,7 +30,7 @@

    Navigation

  • modules |
  • - + @@ -42,13 +42,14 @@

    Navigation

    Search

    -
    - +

    @@ -58,7 +59,7 @@

    Search

    - +
    @@ -89,13 +90,13 @@

    Navigation

  • modules |
  • - +
    \ No newline at end of file diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js index 6b98e57..2faffd7 100644 --- a/docs/_build/html/searchindex.js +++ b/docs/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["hand_made_doc","index","metrolopy","metrolopy.tests","modules","todo"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["hand_made_doc.rst","index.rst","metrolopy.rst","metrolopy.tests.rst","modules.rst","todo.rst"],objects:{"":{metrolopy:[2,0,0,"-"]},"metrolopy.budget":{Budget:[2,1,1,""]},"metrolopy.budget.Budget":{column_names:[2,2,1,""],columns:[2,2,1,""],default_column_names:[2,3,1,""],default_columns:[2,3,1,""],default_css:[2,3,1,""],df:[2,2,1,""],df_html:[2,2,1,""],df_latex:[2,2,1,""],df_str:[2,2,1,""],k:[2,2,1,""],p:[2,2,1,""],show_c:[2,3,1,""],show_d:[2,3,1,""],show_s:[2,3,1,""],tostring:[2,4,1,""],units_on_values:[2,3,1,""]},"metrolopy.dfunc":{Dfunc:[2,1,1,""]},"metrolopy.dfunc.Dfunc":{apply:[2,4,1,""],napply:[2,4,1,""],tofloat:[2,4,1,""]},"metrolopy.distributions":{ArcSinDist:[2,1,1,""],BinomialDist:[2,1,1,""],Convolution:[2,1,1,""],CurvlinearTrapDist:[2,1,1,""],Distribution:[2,1,1,""],ExponentialDist:[2,1,1,""],GammaDist:[2,1,1,""],LaplaceDist:[2,1,1,""],LogNormalDist:[2,1,1,""],MultiNormalDist:[2,1,1,""],MultiTDist:[2,1,1,""],MultiTElement:[2,1,1,""],MultivariateDistribution:[2,1,1,""],MultivariateElement:[2,1,1,""],NormalDist:[2,1,1,""],PoissonDist:[2,1,1,""],TDist:[2,1,1,""],TrapezoidalDist:[2,1,1,""],TriangularDist:[2,1,1,""],UniformDist:[2,1,1,""],WeibullDist:[2,1,1,""]},"metrolopy.distributions.ArcSinDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.BinomialDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.Convolution":{isindependent:[2,3,1,""],random:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.CurvlinearTrapDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.Distribution":{apply:[2,4,1,""],ci:[2,4,1,""],cisym:[2,4,1,""],clear:[2,4,1,""],covplot:[2,4,1,""],covsim:[2,4,1,""],covsim_matrix:[2,4,1,""],hist:[2,4,1,""],isindependent:[2,3,1,"id0"],mean:[2,2,1,""],random:[2,4,1,""],random_state:[2,4,1,""],set_seed:[2,4,1,""],simdata:[2,3,1,"id1"],simsorted:[2,2,1,""],simulate:[2,4,1,""],stdev:[2,2,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.ExponentialDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.GammaDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.LaplaceDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.LogNormalDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.MultiNormalDist":{cov:[2,2,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.MultiTDist":{cov:[2,2,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.MultivariateDistribution":{clear:[2,4,1,""],cov:[2,2,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.MultivariateElement":{clear:[2,4,1,""],cov:[2,4,1,""],random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.NormalDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.PoissonDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.TDist":{bayesian_default:[2,3,1,""],random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.TrapezoidalDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.TriangularDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.UniformDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.distributions.WeibullDist":{random:[2,4,1,""],u:[2,4,1,""],x:[2,4,1,""]},"metrolopy.exceptions":{BudgetWarning:[2,5,1,""],CircularUnitConversionError:[2,5,1,""],ConstantNotFoundError:[2,5,1,""],FitWarning:[2,5,1,""],GummyWarning:[2,5,1,""],IncompatibleUnitsError:[2,5,1,""],NoSimulatedDataError:[2,5,1,""],NoUnitConversionFoundError:[2,5,1,""],UncertiantyPrecisionWarning:[2,5,1,""],UnitError:[2,5,1,""],UnitLibError:[2,5,1,""],UnitLibNotFoundError:[2,5,1,""],UnitNotFoundError:[2,5,1,""],UnitWarning:[2,5,1,""]},"metrolopy.fit":{DoubleExpFit:[2,1,1,""],ExpFit:[2,1,1,""],Fit:[2,1,1,""],OneOverTFit:[2,1,1,""],PolyFit:[2,1,1,""],SinFit:[2,1,1,""]},"metrolopy.fit.DoubleExpFit":{count:[2,3,1,""],cov:[2,3,1,""],f:[2,4,1,""],fhtml:[2,4,1,""],fit_output:[2,3,1,""],flatex:[2,4,1,""],funicode:[2,4,1,""],get_p0:[2,4,1,""],get_punits:[2,4,1,""],jac:[2,4,1,""],nparam:[2,3,1,""],p0:[2,3,1,""],p:[2,3,1,""],pf:[2,3,1,""],punits:[2,3,1,""],res:[2,3,1,""],s:[2,3,1,""],solver:[2,3,1,""],ux:[2,3,1,""],uy:[2,3,1,""],x:[2,3,1,""],xdim:[2,3,1,""],xf:[2,3,1,""],y:[2,3,1,""],ydim:[2,3,1,""],yf:[2,3,1,""]},"metrolopy.fit.ExpFit":{count:[2,3,1,""],cov:[2,3,1,""],f:[2,4,1,""],fhtml:[2,4,1,""],fit_output:[2,3,1,""],flatex:[2,4,1,""],funicode:[2,4,1,""],get_p0:[2,4,1,""],get_punits:[2,4,1,""],jac:[2,4,1,""],nparam:[2,3,1,""],p0:[2,3,1,""],p:[2,3,1,""],pf:[2,3,1,""],punits:[2,3,1,""],res:[2,3,1,""],s:[2,3,1,""],solver:[2,3,1,""],ux:[2,3,1,""],uy:[2,3,1,""],x:[2,3,1,""],xdim:[2,3,1,""],xf:[2,3,1,""],y:[2,3,1,""],ydim:[2,3,1,""],yf:[2,3,1,""]},"metrolopy.fit.Fit":{f:[2,4,1,""],fhtml:[2,4,1,""],flatex:[2,4,1,""],funicode:[2,4,1,""],get_p0:[2,4,1,""],get_punits:[2,4,1,""],html:[2,4,1,""],jac:[2,4,1,""],latex:[2,4,1,""],latex_math:[2,3,1,""],ptostring:[2,4,1,""],toascii:[2,4,1,""],tohtml:[2,4,1,""],tolatex:[2,4,1,""],tostring:[2,4,1,""],ypred:[2,4,1,""],ypredf:[2,4,1,""]},"metrolopy.fit.OneOverTFit":{count:[2,3,1,""],cov:[2,3,1,""],f:[2,4,1,""],fhtml:[2,4,1,""],fit_output:[2,3,1,""],flatex:[2,4,1,""],funicode:[2,4,1,""],get_p0:[2,4,1,""],get_punits:[2,4,1,""],jac:[2,4,1,""],nparam:[2,3,1,""],p0:[2,3,1,""],p:[2,3,1,""],pf:[2,3,1,""],punits:[2,3,1,""],res:[2,3,1,""],s:[2,3,1,""],solver:[2,3,1,""],ux:[2,3,1,""],uy:[2,3,1,""],x:[2,3,1,""],xdim:[2,3,1,""],xf:[2,3,1,""],y:[2,3,1,""],ydim:[2,3,1,""],yf:[2,3,1,""]},"metrolopy.fit.PolyFit":{f:[2,4,1,""],fhtml:[2,4,1,""],flatex:[2,4,1,""],funicode:[2,4,1,""],get_p0:[2,4,1,""],get_punits:[2,4,1,""],jac:[2,4,1,""]},"metrolopy.fit.SinFit":{count:[2,3,1,""],cov:[2,3,1,""],f:[2,4,1,""],fhtml:[2,4,1,""],fit_output:[2,3,1,""],flatex:[2,4,1,""],funicode:[2,4,1,""],get_p0:[2,4,1,""],get_punits:[2,4,1,""],jac:[2,4,1,""],nparam:[2,3,1,""],p0:[2,3,1,""],p:[2,3,1,""],pf:[2,3,1,""],punits:[2,3,1,""],res:[2,3,1,""],s:[2,3,1,""],solver:[2,3,1,""],ux:[2,3,1,""],uy:[2,3,1,""],x:[2,3,1,""],xdim:[2,3,1,""],xf:[2,3,1,""],y:[2,3,1,""],ydim:[2,3,1,""],yf:[2,3,1,""]},"metrolopy.functions":{absolute:[2,6,1,""],add:[2,6,1,""],angle:[2,6,1,""],arccos:[2,6,1,""],arccosh:[2,6,1,""],arcsin:[2,6,1,""],arcsinh:[2,6,1,""],arctan2:[2,6,1,""],arctan:[2,6,1,""],arctanh:[2,6,1,""],around:[2,6,1,""],cbrt:[2,6,1,""],ceil:[2,6,1,""],conj:[2,6,1,""],cos:[2,6,1,""],cosh:[2,6,1,""],cross:[2,6,1,""],cumprod:[2,6,1,""],cumsum:[2,6,1,""],diff:[2,6,1,""],divide:[2,6,1,""],divmod:[2,6,1,""],ediff1d:[2,6,1,""],exp2:[2,6,1,""],exp:[2,6,1,""],expm1:[2,6,1,""],fix:[2,6,1,""],floor:[2,6,1,""],floor_divide:[2,6,1,""],gradient:[2,6,1,""],heaviside:[2,6,1,""],imag:[2,6,1,""],log10:[2,6,1,""],log1p:[2,6,1,""],log2:[2,6,1,""],log:[2,6,1,""],logaddexp2:[2,6,1,""],logaddexp:[2,6,1,""],mod:[2,6,1,""],modf:[2,6,1,""],multiply:[2,6,1,""],negative:[2,6,1,""],power:[2,6,1,""],prod:[2,6,1,""],real:[2,6,1,""],reciprocal:[2,6,1,""],remainder:[2,6,1,""],rint:[2,6,1,""],sign:[2,6,1,""],sin:[2,6,1,""],sinh:[2,6,1,""],sqrt:[2,6,1,""],square:[2,6,1,""],subtract:[2,6,1,""],sum:[2,6,1,""],tan:[2,6,1,""],tanh:[2,6,1,""],true_divide:[2,6,1,""],trunc:[2,6,1,""]},"metrolopy.gummy":{MetaGummy:[2,1,1,""],gummy:[2,1,1,""],jummy:[2,1,1,""]},"metrolopy.gummy.MetaGummy":{bayesian:[2,2,1,""],cimethod:[2,2,1,""],cmp_k:[2,2,1,""],cmp_p:[2,2,1,""],max_digits:[2,2,1,""],max_dof:[2,2,1,""],mulsep:[2,2,1,""],nsig:[2,2,1,""],p_method:[2,2,1,""],rounding_u:[2,2,1,""],sci_notation:[2,2,1,""],sci_notation_high:[2,2,1,""],sci_notation_low:[2,2,1,""],solidus:[2,2,1,""],style:[2,2,1,""],thousand_spaces:[2,2,1,""]},"metrolopy.gummy.gummy":{U:[2,2,1,""],Usim:[2,2,1,""],angle:[2,4,1,""],apply:[2,4,1,""],ascii:[2,4,1,""],bayesian:[2,3,1,""],budget:[2,4,1,""],cimethod:[2,3,1,""],cisim:[2,2,1,""],conjugate:[2,4,1,""],copy:[2,4,1,""],correlation:[2,4,1,""],correlation_matrix:[2,4,1,""],covariance:[2,4,1,""],covariance_matrix:[2,4,1,""],covplot:[2,4,1,""],create:[2,4,1,""],distribution:[2,2,1,""],dof:[2,2,1,""],doffrom:[2,4,1,""],exception_on_fmt_error:[2,3,1,""],finfo:[2,2,1,""],get_name:[2,4,1,""],graft:[2,4,1,""],hist:[2,4,1,""],html:[2,4,1,""],imag:[2,2,1,""],independant:[2,2,1,""],k:[2,2,1,""],ksim:[2,2,1,""],latex:[2,4,1,""],max_digits:[2,3,1,""],mulsep:[2,3,1,""],name:[2,2,1,""],napply:[2,4,1,""],nsig:[2,3,1,""],p:[2,2,1,""],real:[2,2,1,""],sci_notation:[2,3,1,""],sci_notation_high:[2,3,1,""],sci_notation_low:[2,3,1,""],show_dof:[2,3,1,""],show_k:[2,3,1,""],show_name:[2,3,1,""],show_p:[2,3,1,""],sim:[2,4,1,""],simdata:[2,2,1,""],simsorted:[2,2,1,""],simulate:[2,4,1,""],slashaxis:[2,3,1,""],solidus:[2,3,1,""],splonk:[2,4,1,""],style:[2,3,1,""],thousand_spaces:[2,3,1,""],toascii:[2,4,1,""],tohtml:[2,4,1,""],tolatex:[2,4,1,""],tostring:[2,4,1,""],toummy:[2,4,1,""],u:[2,2,1,""],ubreakdown:[2,2,1,""],ufrom:[2,4,1,""],unicode:[2,4,1,""],unit:[2,2,1,""],usim:[2,2,1,""],utype:[2,2,1,""],uunit:[2,2,1,""],uunit_is_rel:[2,2,1,""],x:[2,2,1,""],xsim:[2,2,1,""]},"metrolopy.gummy.jummy":{get_name:[2,4,1,""],name:[2,2,1,""],show_name:[2,3,1,""],splonk:[2,4,1,""],toimmy:[2,4,1,""],tostring:[2,4,1,""]},"metrolopy.logunit":{LogConversion:[2,1,1,""],LogUnit:[2,1,1,""]},"metrolopy.logunit.LogConversion":{copy:[2,4,1,""],frm:[2,4,1,""],log_func:[2,4,1,""],to:[2,4,1,""]},"metrolopy.logunit.LogUnit":{get_composite:[2,4,1,""],zero:[2,4,1,""]},"metrolopy.mean":{autocorrelation:[2,6,1,""],delta_diff:[2,6,1,""],delta_diff_mean:[2,6,1,""],delta_sum:[2,6,1,""],delta_sum_mean:[2,6,1,""],mean:[2,6,1,""],mean_datetime:[2,6,1,""],n_eff:[2,6,1,""],sigma_trim:[2,6,1,""],wmean:[2,6,1,""]},"metrolopy.nonlinearunit":{NonlinearConversion:[2,1,1,""],NonlinearUnit:[2,1,1,""],ReciprocalConversion:[2,1,1,""]},"metrolopy.nonlinearunit.NonlinearConversion":{chain:[2,4,1,""],copy:[2,4,1,""],linear:[2,3,1,""],pow:[2,4,1,""],rchain:[2,4,1,""]},"metrolopy.nonlinearunit.NonlinearUnit":{from_uunit:[2,4,1,""],get_composite:[2,4,1,""],to_uunit:[2,4,1,""],zero:[2,4,1,""]},"metrolopy.nonlinearunit.ReciprocalConversion":{chain:[2,4,1,""],copy:[2,4,1,""],frm:[2,4,1,""],to:[2,4,1,""]},"metrolopy.nummy":{nummy:[2,1,1,""]},"metrolopy.nummy.nummy":{Usim:[2,2,1,""],bayesian:[2,2,1,""],cimethod:[2,2,1,""],cisim:[2,2,1,""],correlation_matrix_sim:[2,4,1,""],correlation_sim:[2,4,1,""],covariance_matrix_sim:[2,4,1,""],covariance_sim:[2,4,1,""],covplot:[2,4,1,""],create:[2,4,1,""],distribution:[2,2,1,""],dof:[2,2,1,""],get_name:[2,4,1,""],hist:[2,4,1,""],independent:[2,2,1,""],ksim:[2,2,1,""],name:[2,2,1,""],p:[2,2,1,""],set_seed:[2,4,1,""],simdata:[2,2,1,""],simsorted:[2,2,1,""],simulate:[2,4,1,""],splonk:[2,4,1,""],toummy:[2,4,1,""],ufrom:[2,4,1,""],usim:[2,2,1,""],xsim:[2,2,1,""]},"metrolopy.offsetunit":{OffsetConversion:[2,1,1,""],OffsetUnit:[2,1,1,""]},"metrolopy.offsetunit.OffsetConversion":{copy:[2,4,1,""],frm:[2,4,1,""],to:[2,4,1,""]},"metrolopy.offsetunit.OffsetUnit":{zero:[2,4,1,""]},"metrolopy.pmethod":{ccp_from_k:[2,6,1,""],conservative_coverage_probability:[2,6,1,""],coverage_factor:[2,6,1,""],coverage_probability:[2,6,1,""],cp_from_k:[2,6,1,""],loc_from_k:[2,6,1,""]},"metrolopy.prefixedunit":{BinaryPrefixedUnit:[2,1,1,""],PrefixedUnit:[2,1,1,""]},"metrolopy.prefixedunit.BinaryPrefixedUnit":{prefix_definitions:[2,3,1,""]},"metrolopy.prefixedunit.PrefixedUnit":{prefix_definitions:[2,3,1,""]},"metrolopy.printing":{MetaPrettyPrinter:[2,1,1,""],PrettyPrinter:[2,1,1,""],print_html:[2,6,1,""],print_latex:[2,6,1,""],print_markdown:[2,6,1,""],set_printer:[2,6,1,""]},"metrolopy.printing.MetaPrettyPrinter":{printer:[2,2,1,""]},"metrolopy.printing.PrettyPrinter":{ascii:[2,4,1,""],break_on_printing_error:[2,3,1,""],html:[2,4,1,""],latex:[2,4,1,""],latex_math:[2,4,1,""],latex_math_plot:[2,4,1,""],latex_norm:[2,4,1,""],latex_norm_plot:[2,4,1,""],printer:[2,3,1,""],toascii:[2,4,1,""],tohtml:[2,4,1,""],tolatex:[2,4,1,""],tounicode:[2,4,1,""],unicode:[2,4,1,""]},"metrolopy.relunits":{RatioUnit:[2,1,1,""]},"metrolopy.tests":{test_create:[3,0,0,"-"]},"metrolopy.tests.test_create":{test_gummy_init:[3,6,1,""]},"metrolopy.ummy":{GummyTag:[2,1,1,""],MFraction:[2,1,1,""],MetaImmy:[2,1,1,""],immy:[2,1,1,""],ummy:[2,1,1,""]},"metrolopy.ummy.GummyTag":{get_values:[2,4,1,""],set_tag:[2,4,1,""],tags:[2,3,1,""]},"metrolopy.ummy.MetaImmy":{imag_symbol:[2,2,1,""],style:[2,2,1,""]},"metrolopy.ummy.immy":{angle:[2,4,1,""],conjugate:[2,4,1,""],copy:[2,4,1,""],cov:[2,2,1,""],imag:[2,2,1,""],phi:[2,2,1,""],r:[2,2,1,""],real:[2,2,1,""],splonk:[2,4,1,""],style:[2,3,1,""],tofloat:[2,4,1,""],tostring:[2,4,1,""],x:[2,2,1,""]},"metrolopy.ummy.ummy":{angle:[2,4,1,""],conjugate:[2,4,1,""],copy:[2,4,1,""],correlation:[2,4,1,""],correlation_matrix:[2,4,1,""],covariance:[2,4,1,""],covariance_matrix:[2,4,1,""],create:[2,4,1,""],dof:[2,2,1,""],doffrom:[2,4,1,""],finfo:[2,2,1,""],imag:[2,2,1,""],max_digits:[2,3,1,""],max_dof:[2,3,1,""],nsig:[2,3,1,""],real:[2,2,1,""],rounding_u:[2,3,1,""],sci_notation:[2,3,1,""],sci_notation_high:[2,3,1,""],sci_notation_low:[2,3,1,""],splonk:[2,4,1,""],thousand_spaces:[2,3,1,""],tofloat:[2,4,1,""],tostring:[2,4,1,""],u:[2,2,1,""],ufrom:[2,4,1,""],utype:[2,2,1,""],x:[2,2,1,""]},"metrolopy.unit":{Conversion:[2,1,1,""],Quantity:[2,1,1,""],QuantityArray:[2,1,1,""],Unit:[2,1,1,""],unit:[2,6,1,""]},"metrolopy.unit.Conversion":{chain:[2,4,1,""],copy:[2,4,1,""],frm:[2,4,1,""],linear:[2,3,1,""],pow:[2,4,1,""],to:[2,4,1,""],unit:[2,2,1,""]},"metrolopy.unit.Quantity":{c:[2,2,1,""],convert:[2,4,1,""],copy:[2,4,1,""],imag:[2,2,1,""],real:[2,2,1,""],reduce_unit:[2,4,1,""],splonk:[2,4,1,""],splonk_func_ret:[2,3,1,""],tofloat:[2,4,1,""],tostring:[2,4,1,""],totuple:[2,4,1,""],unit:[2,2,1,""],value:[2,2,1,""]},"metrolopy.unit.Unit":{conversion:[2,2,1,""],convert:[2,4,1,""],format_latex:[2,4,1,""],is_dimensionless:[2,2,1,""],linear:[2,2,1,""],mulsep:[2,3,1,""],reorder:[2,4,1,""],solidus:[2,3,1,""],unit:[2,4,1,""],units:[2,2,1,""]},"metrolopy.unitutils":{convert:[2,6,1,""],search_units:[2,6,1,""],shadowed_units:[2,6,1,""]},metrolopy:{budget:[2,0,0,"-"],dfunc:[2,0,0,"-"],distributions:[2,0,0,"-"],exceptions:[2,0,0,"-"],fit:[2,0,0,"-"],functions:[2,0,0,"-"],gummy:[2,0,0,"-"],logunit:[2,0,0,"-"],mean:[2,0,0,"-"],nonlinearunit:[2,0,0,"-"],nummy:[2,0,0,"-"],offsetunit:[2,0,0,"-"],pmethod:[2,0,0,"-"],prefixedunit:[2,0,0,"-"],printing:[2,0,0,"-"],relunits:[2,0,0,"-"],siunits:[2,0,0,"-"],tests:[3,0,0,"-"],ummy:[2,0,0,"-"],unit:[2,0,0,"-"],unitutils:[2,0,0,"-"],usunits:[2,0,0,"-"],version:[2,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","property","Python property"],"3":["py","attribute","Python attribute"],"4":["py","method","Python method"],"5":["py","exception","Python exception"],"6":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:property","3":"py:attribute","4":"py:method","5":"py:exception","6":"py:function"},terms:{"0":[0,1,2],"00":[0,2],"000":2,"0000":2,"0000012":2,"001":[0,2],"005":[0,2],"00e":[0,2],"01":[0,2],"01e":[0,2],"022":0,"0234":1,"0254":0,"03":2,"034":1,"05":[0,2],"050":2,"06":2,"060":2,"077":[0,2],"09":2,"0932962619709627":[0,2],"096":1,"1":[0,1,2],"10":[0,1,2],"100":[0,2],"1000":2,"10000":2,"100000":[0,2],"1000000":2,"1000000000":2,"1000000000000":2,"1000000000000000":2,"1024":2,"1038":[1,2],"1048576":2,"1073741824":2,"1099511627776":2,"11":[0,2],"11224696052342387":0,"1125899906842624":2,"1152921504606846976":2,"1180591620717411303424":2,"12":[0,2],"1208925819614629174706176":2,"123":0,"13":[0,2],"13e":[0,2],"15":[1,2],"174":1,"18":2,"19":1,"1e":[0,2],"2":[0,1,2],"20":[0,2],"200":0,"2006":2,"2007":2,"2008":[0,2],"2009":1,"2014":1,"2019":1,"2020":1,"2021":1,"21":[1,2],"22":[0,2],"23":1,"234":1,"2345":1,"24":[0,1,2],"25":[0,1],"26":1,"27":0,"2e":[0,2],"2x":0,"2y":0,"3":[0,1,2],"30":[0,2],"340":2,"36":[0,2],"39":1,"3e":[0,2],"4":[0,1,2],"43":2,"44":[0,2],"459":0,"5":[0,1,2],"50":[0,1,2],"53851648071345048":[0,2],"54":[0,2],"57":[0,2],"5px":2,"6":1,"60":0,"627":[0,2],"65":[0,2],"67":[0,2],"678":[0,2],"7":[0,1,2],"8":[0,1,2],"8e":[0,2],"8ex":2,"9":[0,2],"9144":0,"9345":1,"95":[0,2],"95449973610364158":2,"959963984540054":0,"9924":0,"9973":2,"9999769927034015":2,"9th":[1,2],"\u03bc":2,"abstract":2,"case":[0,1,2],"class":2,"const":0,"default":[0,2],"do":[0,1,2],"float":[0,2],"function":4,"import":[0,1,2],"int":[0,2],"new":[0,2],"public":[1,2],"return":[0,2],"short":[0,2],"static":2,"super":0,"switch":2,"throw":[0,2],"true":[0,2,3],"while":[0,2],A:[0,2],But:[0,2],By:[0,2],For:[0,2],If:[0,2],In:[0,1,2],It:[0,1,2],Not:2,One:[0,2],Or:[0,2],The:[0,1,2],Then:0,These:[0,1,2],To:[0,2],With:[0,2],__init__:[0,2],__str__:2,_add:2,_appli:2,_compositeunit:[0,2],_cov:0,_fit:2,_intervalunit:0,_nappli:2,_one:0,_radd:2,_simul:0,_sub:2,_u:0,_x:0,a0:0,ab:[0,2],abov:[0,1,2],absolut:[0,2],absoult:2,access:[0,2],account:[0,2],accur:2,actual:[0,2],ad:[0,1,2],add:[0,2],add_symbol:[0,2],addit:[0,2],additional_nam:[0,2],additional_short_nam:2,advoc:[0,2],affect:[0,2],after:0,again:0,ai:0,air:0,aj:0,algorithm:0,alia:[0,2],alias:0,align:2,all:[0,2],allow:[0,2],along:[0,2],alpha:0,alreadi:[0,2],also:[0,1,2],alter:2,altern:[0,1,2],alwai:2,amount:2,an:[0,1,2],analysi:[0,2],analyz:0,angl:[0,2],ani:[0,2],anoth:[0,2],any_but_latex:[0,2],api:1,appear:0,append:0,appli:2,appropri:2,approxim:2,april:1,ar:[0,1,2],araound:0,arbitrari:[0,2],arcco:[0,2],arccosh:[0,2],arcsin:[0,2],arcsindist:[0,2],arcsinh:[0,2],arctan2:[0,2],arctan:[0,2],arctanh:[0,2],arg1:[0,2],arg2:[0,2],arg:[0,2],argument:[0,2],arithmat:2,arithmet:2,around:2,arrai:[0,2],array_lik:2,ascii:[0,2],ascii_symbol:[0,2],assign:[0,2],associ:[0,2],assum:[0,2],assumpt:[0,2],asterisk:0,asterix:0,astronom:1,attach:[0,2],attempt:[0,2],atto:2,attribut:2,auto:[0,2],autocorrel:2,autogener:0,automat:[0,1,2],avail:[0,2],averag:2,avoid:[0,2],ax:0,axhlin:[0,2],axi:[0,2],axvlin:[0,2],b:[0,1,2],back:[0,2],background:2,band:0,bar:0,base:[0,2],base_descript:[0,2],base_prefix:2,bayesian:[0,2],bayesian_default:2,becaus:[0,2],been:[0,2],befor:[0,2],begin:[0,2],behavior:[0,2],below:[0,1,2],best:[0,1,2],between:[0,2],bin:[0,2],binari:[0,2],binaryprefixedunit:[0,2],binomi:0,binomialdist:[0,2],boadcast:0,bold:2,bool:[0,2],border:2,both:[0,2],bottom:2,bound:0,bracket:[0,2],break_on_printing_error:2,broadcast:[0,2],brochur:[1,2],budget:[0,1,4],budget_first_col_header_cel:2,budget_first_col_x_cel:2,budget_header_cel:2,budget_header_row:2,budget_row:2,budget_t:2,budget_x_cel:2,budgetwarn:2,bug:[1,5],built:[1,2],builtin:2,c:[0,1,2],ca:1,calcul:[0,2],calibr:1,call:[0,2],can:[0,1,2],canada:1,cancel:[0,2],cannot:2,capabl:0,care:2,carlo:[1,2],carri:[0,2],cartesian:[0,2],caus:2,caution:2,cbrt:[0,2],ccp:[0,2],ccp_from_k:2,ceil:[0,2],cell:2,celsiu:[0,2],center:[0,1,2],centi:2,certain:0,chain:[0,2],chang:[0,1,2],charact:[0,2],chebyshev:[0,2],chi:[0,2],chi_correct:2,chisquar:[0,2],chisquareddist:[0,2],choic:0,choos:2,ci:2,ci_mark:[0,2],ci_marker_opt:[0,2],ciformat:0,cik:0,cimethod:[0,2],cioption:0,cip:0,circ:0,circular:[0,2],circularunitconversionerror:[0,2],cisim:[0,2],cisym:2,cl:2,classmethod:[0,2],clear:2,clformat:0,clk:0,cloption:0,clp:0,cm2:1,cm:[0,1,2],cmp_k:[0,2],cmp_p:[0,2],cn:0,co:[0,2],codata:1,code:[0,1,2],coeffici:[0,2],color:[0,2],column:[0,2],column_nam:[0,2],combin:[0,2],comlic:2,command:0,commonli:[0,2],compar:2,comparison:[0,2],compat:0,complet:[0,2],complex:[0,1,2],complic:2,compon:[0,2],composit:[0,2],comprehens:1,comput:[0,2],concis:[0,2],conda:1,confid:[0,2],confus:1,conj:[0,2],conjug:[0,2],conservative_coverage_prob:2,consol:[0,2],constant:[0,1,2],constantnotfounderror:2,constitu:[0,2],conta:0,contact:1,contain:[0,1,2],content:4,contribut:[0,2],control:[0,2],convei:1,convers:[1,2],convert:[0,2],convolut:[0,2],coordin:[0,2],copi:[0,2],core:2,correct:0,correctli:2,correl:[0,1,2],correlation_matrix:[0,2],correlation_matrix_sim:2,correlation_sim:2,correspond:[0,2],cosh:[0,2],cosin:[0,2],council:1,count:[0,2],cov:[0,2],covari:[0,2],covariance_matrix:[0,2],covariance_matrix_sim:2,covariance_sim:2,coverag:[0,2],coverage_factor:2,coverage_prob:2,covplot:[0,2],covsim:2,covsim_matrix:2,cp:[0,2],cp_from_k:2,creat:[0,1,2],creation:2,cross:[0,2],css:[0,2],cube:[0,2],cubic:2,cumpord:0,cumprod:[0,2],cumsum:[0,2],curv:[1,2],curvlinear:0,curvlineartrapdist:[0,2],custom:2,custom_head:[0,2],custom_math_mod:[0,2],customari:1,d1:[0,2],d2:[0,2],d:[0,2],da:2,data:[0,1,2],data_format:0,data_opt:0,datafram:[0,2],date:[0,2],db:[0,2],de:2,deal:[0,1],deatil:0,deca:2,deci:2,decibel:[0,2],decid:2,decreas:[0,2],def:[0,2],default_column:2,default_column_nam:2,default_css:[0,2],defin:[0,1,2],definit:[0,1],defualt:0,deg:[0,2],degf:0,degr:0,degre:[0,1,2],delta:2,delta_diff:2,delta_diff_mean:2,delta_sum:2,delta_sum_mean:2,denomin:0,densiti:[0,2],depend:[0,2],deriv:[0,2],describ:[0,2],descript:[0,2],description_math_mod:[0,2],desir:[0,2],detail:[0,2],determin:[0,2],devat:2,develop:1,deviat:[0,2],df1:[0,2],df2:[0,2],df:[0,2],df_html:[0,2],df_latex:[0,2],df_str:[0,2],dfunc:[0,4],dhypot:[0,2],dict:[0,2],dictionari:[0,2],diff:[0,2],differ:[0,1,2],digit:[0,2],dimens:[0,2],dimension:[0,2],dimensionless:[0,2],direchletdist:0,directli:[0,2],dirichlet:0,disabl:0,displai:2,distribut:[1,4],divid:[0,2],divis:[0,2],divmod:[0,2],doc:0,document:[0,1,2],doe:[0,2],dof:[0,2],doffrom:[0,2],don:2,dot:[0,2],doubl:0,doubleexpfit:[0,2],down:2,download:1,dp1:[0,2],dp2:[0,2],draft:1,draw:[0,2],drawn:[0,2],drift:2,du:[0,2],dure:[0,2],dv:[0,2],dx1:[0,2],dx2:[0,2],dx:[0,2],dy:[0,2],e:[0,2],each:[0,2],ediff1d:[0,2],edit:[0,1,2],effect:[0,2],ei:2,either:[0,2],element:[0,2],els:[0,2],enclos:[0,2],encod:2,end:0,ensur:2,entri:[0,2],enumer:0,epsilon:0,equal:[0,2],equat:[0,2],equiv:2,equival:[0,2],eras:[0,2],erg:0,error:[0,2],error_bar:0,error_bar_k:0,errorbar:0,estim:2,even:2,evenli:2,event:2,ex:0,exa:2,exactli:[0,2],exampl:[0,2],exbi:2,except:[0,4],exception_on_fmt_error:2,exception_on_warn:3,exclud:2,execut:[0,2],exist:[0,2],exit:[0,2],exp2:[0,2],exp:[0,2],expan:0,expand:[0,1,2],expfit:[0,2],explicitli:0,expm1:[0,2],expon:[0,2],exponenti:0,exponentialdist:[0,2],express:[0,1,2],extens:0,extra:[0,2],ey:0,f1:[0,2],f2:[0,2],f:[0,1,2],fab:0,facilit:2,factor:[0,2],fahrenheit:[0,2],fail:0,fals:[0,2,3],feet:2,femto:2,few:[0,2],fhtml:[0,2],figur:0,fill:2,find:[0,2,5],finfo:2,finit:[0,2],first:[0,1,2],fit:[1,4],fit_format:0,fit_opt:0,fit_output:[0,2],fitwarn:2,fix:[0,1,2],flag:[0,2],flase:0,flatex:[0,2],floor:[0,2],floor_divid:[0,2],fmt:[0,2],follow:[0,2],font:2,foot:[0,2],forc:2,forg:1,form:[0,2],format:2,format_latex:2,forward:[0,2],found:[0,2],four:[0,2],fraction:[0,1,2],fragment:[0,2],free:[0,1,2],freedom:[0,1,2],frm:2,from:[0,2],from_unit:2,from_uunit:2,ft:[0,2],full:0,func:[0,2],funicod:[0,2],fxx:2,g:[0,2],gamma:0,gammadist:[0,2],gauss:[0,2],gener:[0,2],get:[0,2],get_composit:2,get_nam:2,get_p0:[0,2],get_puint:0,get_punit:[0,2],get_valu:2,gi:2,gibi:[0,2],giga:[0,2],github:1,give:[0,2],given:[0,2],gnu:1,good:0,gradient:[0,2],graft:[0,2],greater:[0,2],group:2,gt:1,guass:0,guess:[0,2],guid:1,gum:[0,1,2],gummi:4,gummytag:2,gummywarn:2,h0:[0,2],h:2,ha:[0,2],half_width:[0,1,2],handl:[1,2],handmad:1,harold:1,have:[0,2],head:[0,2],header:[0,2],heavisid:[0,2],heavysid:[0,2],hecto:2,held:[0,2],help:5,here:[0,2,5],hist:[0,2],histogram:[0,2],hold:[0,2],holomorph:[0,2],horizont:[0,2],how:[0,2],howev:[0,1,2],html:[0,2],html_symbol:[0,2],hyperbol:[0,2],hypot:[0,2],i:[0,2],iau:1,idea:0,ident:[0,2],ignor:[0,2],ignore_nan:2,imag:[0,2],imag_symbol:2,imaginari:[0,2],immedi:0,immi:[0,1,2],implement:[0,1,2],impos:1,improv:1,inch:[0,2],includ:[0,1,2],incompat:2,incompatibleunitserror:2,incorpor:[0,2],incorrectli:1,independ:[0,2],independantli:0,index:[1,2],indic:[0,2],inequ:[0,2],inf:[0,2],infinit:2,inform:[0,2],inherit:[0,2],init:[0,2],initi:[0,2],inlin:[0,2],input:[0,2],insensit:0,insent:2,insert:[0,2],instal:[0,1],instanc:[0,2],institut:1,intanc:2,integ:[0,1,2],integr:2,intend:[0,2],interact:0,interg:2,intermedi:2,intern:[1,2],interpol:2,interpret:2,interv:[0,2],invers:[0,2],involv:2,ipython:[0,1,2],is_dimensionless:[0,2],isindepend:2,iso:1,issu:1,iter:[0,2],its:0,itself:0,j:[0,2],jac:[0,2],jacobian:[0,2],jgcm:1,joint:[0,2],juli:1,jummi:2,juptyer:2,jupyt:[0,1,2],just:0,k:[0,2],keep:0,kei:[0,2],keyword:[0,2],keywork:0,kg:[0,2],ki:2,kibi:[0,2],kilo:[0,2],kilogram:[0,2],known:[0,1],ko:[0,2],kpa:1,ksim:[0,2],kw:2,kwarg:2,kwd:[0,2],lab:1,label:[0,2],lam:[0,2],laplac:0,laplacedist:[0,2],larger:2,largest:0,last:[0,2],later:0,latex:[0,2],latex_math:2,latex_math_plot:2,latex_norm:2,latex_norm_plot:2,latex_symbol:[0,2],lb:[0,2],least:0,leastsq:[0,2],left:[0,2],left_width:[0,2],len:0,length:[0,2],less:[0,2],level:[0,2],li:0,librari:[0,1,2],lie:[0,2],light:[0,2],like:[0,2],limit:[0,2],limit_half_rang:[0,2],line:[0,2],linear:[0,2],linewidth:[0,2],list:[0,1,2],load:[0,2],loc:[0,2],loc_from_k:2,locat:0,log10:[0,2],log1p:[0,2],log2:[0,2],log:[0,2],log_bas:[0,2],log_func:[0,2],logaddexp2:[0,2],logaddexp:[0,2],logarithm:[0,2],logconvers:[0,2],loge:0,lognormaldist:[0,2],logrithm:[0,2],logunit:[0,4],look:[0,1,2],lot:5,lower:[0,2],lower_limit:[0,2],lowest:0,m:[0,2],machin:0,machineri:2,made:0,magnitud:[0,2],mai:[0,1,2],major:1,make:[0,2],mani:[0,1],manual:2,march:1,markdown:[0,2],marker:[0,2],mask:2,match:[0,2],math:[0,2],mathemat:2,mathrm:2,matrix:[0,2],max_digit:[0,2],max_dof:2,maximum:[0,2],maxit:[0,2],mcisim:[0,2],mcisym:[0,2],mean:[0,4],mean_datetim:2,mean_mark:[0,2],mean_marker_opt:[0,2],measur:[0,1,2],measurand:[0,2],mebi:[0,2],mega:[0,2],metagummi:2,metaimmi:2,metaprettyprint:2,meter:0,method:2,metr:[0,2],metrolog:1,metrologia:2,mfraction:2,mi:2,micro:[0,2],microinch:0,microsecond:[0,2],milli:2,millisecond:[0,2],min:2,minim:2,minor:1,minu:2,miscellan:2,miss:[0,2],mix:[0,2],mm:[0,1,2],mod:[0,2],mode:[0,2],modf:[0,2],modifi:[0,1,2],modul:[0,1,4],modulu:0,mone:2,mont:[1,2],more:[0,1,2],most:[0,2],mpf:[0,1,2],mpmath:[0,1,2],ms:[0,2],mu:[0,2],much:1,mulit:0,mulsep:[0,2],multi:2,multinormaldist:[0,2],multipl:[0,2],multipli:[0,2],multitdist:[0,2],multitel:2,multivari:[0,2],multivariatedistribut:[0,2],multivariateel:2,multvariatedistribut:0,must:[0,1,2],mv:2,n:[0,1,2,3],n_eff:2,n_sigma:2,n_sigma_trim:2,name:[0,2],nan:2,nano:2,nappli:[0,2],nation:1,natur:[0,2],nd:[0,2],ndarrai:[0,2],nearest:[0,2],necessari:0,need:[0,2,5],neg:[0,1,2],negat:0,neither:[0,2],neper:[0,2],never:0,newli:[0,2],nist:[1,2],nl:[0,2],non:[0,2],none:[0,2,3],nonlinear:[0,2],nonlinearconvers:2,nonlinearunit:[0,4],nor:2,norm:2,normal:[0,2],normaldist:[0,2],nosimulateddataerror:[0,2],notat:[0,2],note:[0,1,2],notebook:[0,1,2],notimplementederror:[0,2],nounitconversionfounderror:[0,2],now:[0,2],np:[0,2],nparam:[0,2],nprop:[0,2],nrc:1,nsig:[0,2],number:[0,2],numer:2,nummi:4,numpi:[0,1,2],object:[0,1,2],observ:[0,2],octob:1,odd:2,odr:[0,2],off:2,offset:[0,2],offsetconvers:[0,2],offsetunit:[0,4],often:[0,2],ol:0,older:[0,2],omit:[0,2],ommit:0,onc:[0,2],one:[0,2],oneovertfit:[0,2],onli:[0,2],oper:2,operand:0,opertaion:2,optim:[0,2],option:[0,2],order:[0,2],origin:[0,2],os:2,other:[0,1,2],otherwis:[0,2],out:[0,2],outlier:2,outlin:1,output:[0,2],outsid:2,over:[0,2],over_plot:0,overrid:[0,2],overridden:[0,2],own:2,p0:[0,2],p1:[0,2],p2:[0,2],p3:2,p4:2,p5:2,p:[0,1,2],p_method:[0,2],packag:[0,1,4],pad:2,page:1,pair:0,panda:[0,1,2],param:2,paramet:2,paramt:0,parent:2,park:1,parksh:1,pars:2,part:[0,2],partial:[0,2],particular:[0,2],pass:[0,2],pebi:2,perfectli:2,perform:[0,2],perhap:1,peta:2,pf:[0,2],phi:[0,2],physic:[0,1,2],pi:[0,2],pick:[0,2],pico:2,pip:1,pk:0,place:[0,2],pleas:1,plot:[0,2,3],plot_opt:[0,2],plot_point:0,plu:2,plusmn:1,pm:[0,2],pmethod:4,pmi:[0,2],pmsim:[0,2],pmsimi:[0,2],pn:[0,2],point:[0,2],poisson:0,poissondist:[0,2],polar:[0,2],polyfit:[0,2],polynomi:0,popul:[0,2],posit:2,possibl:[0,2],pow:2,power:[0,2],ppm:[0,2],practic:1,predict:[0,2],prefer:[0,2],prefix:[0,2],prefix_definit:2,prefixedunit:[0,4],pressur:0,pretti:[0,2],prettyprint:2,prevent:2,previou:0,previous:[0,2],primarili:2,print:[0,4],print_html:2,print_latex:2,print_markdown:2,printer:[0,2],prnt:[0,2,3],probabl:[0,2],problem:2,prod:[0,2],produc:0,propag:[0,1,2],properti:2,proport:0,provid:2,psi:2,ptostr:2,punit:[0,2],pure:1,put:[0,2,5],py:[0,1],pyplot:[0,2],python:[0,1,2],quadrant:[0,2],quaitii:0,quanit:[0,2],quantati:2,quantiti:[0,1,2],quantityarrai:2,r:[0,2],radian:2,rais:[0,2],random:[0,2],random_st:[0,2],randomst:[0,2],rare:0,rate:[0,2],rather:[0,2],ratiounit:2,raw:[0,2],rchain:2,re:[0,2],read:[0,2],readi:2,real:[0,2],realiz:2,reciproc:[0,2],reciprocalconvers:2,recogn:0,recommend:1,red:[0,2],reduc:[0,2],reduce_unit:[0,2],refer:[0,1,2],referenc:[0,1,2],rel:[0,2],relat:2,relationship:0,releas:1,relunit:4,remaind:[0,2],remov:[0,2],reorder:[0,2],repres:[0,1,2],represent:[0,2],representaion:2,requir:[0,1,2],research:1,resect:2,resid:2,residu:[0,2],resolut:2,respect:[0,2],respons:[0,2],restrict:1,result:[0,2],retriev:[0,2],retriv:2,right:2,right_width:[0,2],rint:[0,2],root:[0,2],round:[0,2],rounding_u:[0,2],row:[0,2],rss:0,rule:[0,2],run:[0,2],s276:2,s:[0,2],same:[0,1,2],sampl:[0,2],satterthwait:2,scalar:[0,2],scale:[0,2],scatter:[0,2],sci_not:[0,2],sci_notation_high:[0,2],sci_notation_low:[0,2],scientif:[0,2],scipi:[0,1,2],search:[1,2],search_unit:[0,2],second:[0,2],section:[0,1],see:[0,1,2],seed:[0,2],select:[0,2],self:[0,2],sensit:[0,2],separ:[0,2],septemb:1,seri:2,serv:[0,2],session:[0,2],set:[0,1,2],set_print:2,set_se:[0,2],set_tag:2,setup:1,sever:[0,1,2],shadow:[0,2],shadow_unit:2,shadowed_alias:0,shadowed_unit:2,shape:[0,2],share:[0,2],shift:[0,2],short_nam:[0,2],shortest:[0,2],should:[0,2],show:[0,2],show_:[0,2],show_al:[0,2],show_c:[0,2],show_d:[0,2],show_data:0,show_dof:[0,2],show_expanded_u:[0,2],show_fit:0,show_k:[0,2],show_nam:[0,2],show_p:[0,2],show_subtot:[0,2],shown:[0,2],si:[0,1,2],side:2,sigma:[0,2],sigma_is_known:[0,2],sigma_trim:2,sign:[0,2],signal:2,signatur:[0,2],signific:[0,2],sim:[0,2],simdata:[0,2],similar:[0,2],simpli:2,simsort:[0,2],simul:2,simultan:[0,2],sin:[0,2],sinc:0,sine:[0,2],sinfit:[0,2],singl:[0,2],sinh:[0,2],siunit:[0,4],size:[0,2],slash:[0,2],slashaxi:[0,2],slightli:1,slow:2,smallest:0,so:[0,1,2],softwar:1,solid:2,solidu:[0,2],solver:[0,2],some:[1,2],someth:5,sometim:[0,2],sort:[0,2],sound:0,sourc:1,space:[0,2],special:[1,2],specifi:[0,2],spl:0,spline:2,splonk:2,splonk_func_ret:2,sqrt:[0,2],squar:[0,2],stabl:[0,2],stack:1,standard:[0,1,2],start:[0,5],statement:2,staticmethod:[0,2],stdev:2,str:[0,2],straight:0,string:[0,1,2],strip:2,student:[0,2],style:[0,2],sub:2,subclass:[0,2],submodul:4,subpackag:4,substitut:0,subtot:[0,2],subtract:[0,2],subtrat:0,success:0,sum:[0,2],suppli:[0,2],support:[0,1,2],symbol:[0,2],symmetr:[0,2],system:[1,2],t:[0,2],tab:0,tabl:[0,2],tack:2,tag:2,tag_nam:2,take:[0,2],taken:[0,2],tan:[0,2],tangent:[0,2],tanh:[0,2],tdist:[0,2],tebi:2,teh:2,temperatur:0,tera:2,term:[0,1,2],test:[2,4],test_creat:[2,4],test_gummy_init:3,text:[0,2],th:[0,2],than:[0,1,2],thei:[0,1,2],them:[0,2],themont:0,thi:[0,1,2],thick:[0,2],thin:2,those:[0,2],though:[0,2],thousand_spac:2,thr:2,thu:[0,2],ti:2,time:0,titl:[0,2],title_styl:[0,2],to_unit:2,to_uunit:2,toascii:[0,2],tofloat:[0,2],tohtml:[0,2],toimmi:2,tolatex:[0,2],tool:1,top_to_base_ratio:[0,2],tostr:[0,2],total:[0,2],totupl:2,toummi:2,tounicod:[0,2],toward:[0,2],track:[0,2],tradit:[0,2],tradition:[0,2],transcendent:0,trapezoid:0,trapezoidaldist:[0,2],treat:[0,2],tri:0,trial:0,triangular:0,triangulardist:[0,2],true_divid:[0,2],trunc:[0,2],try_fconvert:0,tupl:[0,2],turn:2,tutori:1,two:[0,2],txt:[0,2],type:[0,1,2],u00b0f:0,u:[0,1,2],ubreakdown:[0,2],uc:[0,1],ueq:[0,2],uf:[0,2],ufrom:[0,2],ufsim:[0,2],ufunc:2,ul:2,um:0,ummi:[0,4],ummy_:0,uncertainti:[0,1,2],uncertianti:0,uncertiantyprecisionwarn:2,uncorrel:[0,2],under:[0,1,2],unicod:[0,2],uniform:0,uniformdist:[0,1,2],unit:[1,4],unit_:0,uniterror:2,unitliberror:[0,2],unitlibnotfounderror:2,unitlibrari:2,unitnotfounderror:[0,2],units_on_valu:[0,2],unitutil:4,unitwarn:2,unless:[0,2],unshadow:0,until:0,unus:2,up:[0,2],upa:[0,2],upon:[0,2],upper:[0,2],upper_limit:[0,2],us:[0,1,2],use_n_eff:2,user:[0,2],usim:[0,2],usual:[0,2],usunit:[0,4],usym:2,util:2,utyp:[0,2],uunit:[0,1,2],uunit_is_rel:[0,2],uv:2,ux:[0,2],uy:[0,2],v:[0,2],valid:[0,2],valu:[0,1,2],valueerror:2,vari:[0,2],variabl:[0,2],varianc:[0,2],variat:2,variou:0,verbatim:1,veri:[0,2],verison:[1,2],version:[0,4],versu:2,vertic:[0,2],view:[0,2],wa:[0,1,2],wai:[0,2],want:[0,1,2],warn:[0,2],we:[0,2],weakvaluedictionari:2,weibul:0,weibulldist:[0,2],weight:[0,2],weird:0,welch:2,well:[1,2],were:[0,1],when:[0,2],whenev:0,where:[0,2],whether:[0,2],which:[0,1,2],who:[0,2],width:2,willink:2,wish:[0,1,2],without:[0,2],wm:0,wmean:2,word:[0,2],work:[0,2],would:[0,2],write:[0,2],x1:[0,2],x2:[0,2],x:[0,2],xd:0,xdim:[0,2],xf:[0,2],xfsim:[0,2],xk:0,xlabel:[0,2],xlist:[0,2],xm:[0,2],xmax:0,xmin:0,xname:[0,2],xsim:[0,2],xsym:2,xunit:[0,2],y:[0,2],yard:[0,2],yd:[0,2],ydim:[0,2],year:[0,2],yf:[0,2],yi:2,ylabel:[0,2],yname:[0,2],yobi:2,yocto:2,yotta:2,you:[0,1,2],ypred:[0,2],ypredf:[0,2],yunit:[0,2],yx:0,z1:0,z:2,zepto:2,zero:[0,2],zetta:2,zhang:2,zi:2,zibi:2},titles:["MetroloPy","MetroloPy, the docs","metrolopy package","metrolopy.tests package","metrolopy","to do"],titleterms:{"abstract":0,"class":[0,1],"do":5,"function":[0,2],"static":0,appli:0,arithmet:0,attribut:0,author:1,auto:1,basic:0,budget:2,built:0,carlo:0,come:1,common:0,content:[2,3],convers:0,curv:0,custom:0,dfunc:2,did:1,displai:0,distribut:[0,2],doc:1,except:2,fit:[0,2],format:0,from:1,further:1,gener:1,get:1,gummi:[0,1,2],histori:1,indic:1,involv:0,jummi:0,licens:1,logunit:2,mathemat:0,mean:2,method:0,metrolopi:[0,1,2,3,4],modul:[2,3],mont:0,multi:0,name:1,nonlinearunit:2,numer:0,nummi:2,offsetunit:2,oper:0,packag:[2,3],paramet:0,pmethod:2,prefixedunit:2,print:2,properti:0,read:1,relat:0,relunit:2,search:0,simul:0,siunit:2,some:0,start:1,sub:0,submodul:[2,3],subpackag:2,tabl:1,test:3,test_creat:3,ummi:2,unit:[0,2],unitutil:2,usunit:2,variat:0,version:[1,2],where:1}}) \ No newline at end of file +Search.setIndex({docnames:["hand_made_doc","index","metrolopy","metrolopy.tests","modules","todo"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":5,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["hand_made_doc.rst","index.rst","metrolopy.rst","metrolopy.tests.rst","modules.rst","todo.rst"],objects:{"":[[2,0,0,"-","metrolopy"]],"metrolopy.budget":[[2,1,1,"","Budget"]],"metrolopy.budget.Budget":[[2,2,1,"","column_names"],[2,2,1,"","columns"],[2,3,1,"","default_column_names"],[2,3,1,"","default_columns"],[2,3,1,"","default_css"],[2,2,1,"","df"],[2,2,1,"","df_html"],[2,2,1,"","df_latex"],[2,2,1,"","df_str"],[2,2,1,"","k"],[2,2,1,"","p"],[2,3,1,"","show_c"],[2,3,1,"","show_d"],[2,3,1,"","show_s"],[2,4,1,"","tostring"],[2,3,1,"","units_on_values"]],"metrolopy.dfunc":[[2,1,1,"","Dfunc"]],"metrolopy.dfunc.Dfunc":[[2,4,1,"","apply"],[2,4,1,"","napply"],[2,4,1,"","tofloat"]],"metrolopy.distributions":[[2,1,1,"","ArcSinDist"],[2,1,1,"","BinomialDist"],[2,1,1,"","Convolution"],[2,1,1,"","CurvlinearTrapDist"],[2,1,1,"","Distribution"],[2,1,1,"","ExponentialDist"],[2,1,1,"","GammaDist"],[2,1,1,"","LaplaceDist"],[2,1,1,"","LogNormalDist"],[2,1,1,"","MultiNormalDist"],[2,1,1,"","MultiTDist"],[2,1,1,"","MultiTElement"],[2,1,1,"","MultivariateDistribution"],[2,1,1,"","MultivariateElement"],[2,1,1,"","NormalDist"],[2,1,1,"","PoissonDist"],[2,1,1,"","TDist"],[2,1,1,"","TrapezoidalDist"],[2,1,1,"","TriangularDist"],[2,1,1,"","UniformDist"],[2,1,1,"","WeibullDist"]],"metrolopy.distributions.ArcSinDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.BinomialDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.Convolution":[[2,3,1,"","isindependent"],[2,4,1,"","random"],[2,4,1,"","x"]],"metrolopy.distributions.CurvlinearTrapDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.Distribution":[[2,4,1,"","apply"],[2,4,1,"","ci"],[2,4,1,"","cisym"],[2,4,1,"","clear"],[2,4,1,"","covplot"],[2,4,1,"","covsim"],[2,4,1,"","covsim_matrix"],[2,4,1,"","hist"],[2,3,1,"id0","isindependent"],[2,2,1,"","mean"],[2,4,1,"","random"],[2,4,1,"","random_state"],[2,4,1,"","set_seed"],[2,3,1,"id1","simdata"],[2,2,1,"","simsorted"],[2,4,1,"","simulate"],[2,2,1,"","stdev"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.ExponentialDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.GammaDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.LaplaceDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.LogNormalDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.MultiNormalDist":[[2,2,1,"","cov"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.MultiTDist":[[2,2,1,"","cov"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.MultivariateDistribution":[[2,4,1,"","clear"],[2,2,1,"","cov"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.MultivariateElement":[[2,4,1,"","clear"],[2,4,1,"","cov"],[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.NormalDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.PoissonDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.TDist":[[2,3,1,"","bayesian_default"],[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.TrapezoidalDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.TriangularDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.UniformDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.distributions.WeibullDist":[[2,4,1,"","random"],[2,4,1,"","u"],[2,4,1,"","x"]],"metrolopy.exceptions":[[2,5,1,"","BudgetWarning"],[2,5,1,"","CircularUnitConversionError"],[2,5,1,"","ConstantNotFoundError"],[2,5,1,"","FitWarning"],[2,5,1,"","GummyWarning"],[2,5,1,"","IncompatibleUnitsError"],[2,5,1,"","NoSimulatedDataError"],[2,5,1,"","NoUnitConversionFoundError"],[2,5,1,"","UncertiantyPrecisionWarning"],[2,5,1,"","UnitError"],[2,5,1,"","UnitLibError"],[2,5,1,"","UnitLibNotFoundError"],[2,5,1,"","UnitNotFoundError"],[2,5,1,"","UnitWarning"]],"metrolopy.fit":[[2,1,1,"","DoubleExpFit"],[2,1,1,"","ExpFit"],[2,1,1,"","Fit"],[2,1,1,"","OneOverTFit"],[2,1,1,"","PolyFit"],[2,1,1,"","SinFit"]],"metrolopy.fit.DoubleExpFit":[[2,3,1,"","count"],[2,3,1,"","cov"],[2,4,1,"","f"],[2,4,1,"","fhtml"],[2,3,1,"","fit_output"],[2,4,1,"","flatex"],[2,4,1,"","funicode"],[2,4,1,"","get_p0"],[2,4,1,"","get_punits"],[2,4,1,"","jac"],[2,3,1,"","nparam"],[2,3,1,"","p"],[2,3,1,"","p0"],[2,3,1,"","pf"],[2,3,1,"","punits"],[2,3,1,"","res"],[2,3,1,"","s"],[2,3,1,"","solver"],[2,3,1,"","ux"],[2,3,1,"","uy"],[2,3,1,"","x"],[2,3,1,"","xdim"],[2,3,1,"","xf"],[2,3,1,"","y"],[2,3,1,"","ydim"],[2,3,1,"","yf"]],"metrolopy.fit.ExpFit":[[2,3,1,"","count"],[2,3,1,"","cov"],[2,4,1,"","f"],[2,4,1,"","fhtml"],[2,3,1,"","fit_output"],[2,4,1,"","flatex"],[2,4,1,"","funicode"],[2,4,1,"","get_p0"],[2,4,1,"","get_punits"],[2,4,1,"","jac"],[2,3,1,"","nparam"],[2,3,1,"","p"],[2,3,1,"","p0"],[2,3,1,"","pf"],[2,3,1,"","punits"],[2,3,1,"","res"],[2,3,1,"","s"],[2,3,1,"","solver"],[2,3,1,"","ux"],[2,3,1,"","uy"],[2,3,1,"","x"],[2,3,1,"","xdim"],[2,3,1,"","xf"],[2,3,1,"","y"],[2,3,1,"","ydim"],[2,3,1,"","yf"]],"metrolopy.fit.Fit":[[2,4,1,"","f"],[2,4,1,"","fhtml"],[2,4,1,"","flatex"],[2,4,1,"","funicode"],[2,4,1,"","get_p0"],[2,4,1,"","get_punits"],[2,4,1,"","html"],[2,4,1,"","jac"],[2,4,1,"","latex"],[2,3,1,"","latex_math"],[2,4,1,"","ptostring"],[2,4,1,"","toascii"],[2,4,1,"","tohtml"],[2,4,1,"","tolatex"],[2,4,1,"","tostring"],[2,4,1,"","ypred"],[2,4,1,"","ypredf"]],"metrolopy.fit.OneOverTFit":[[2,3,1,"","count"],[2,3,1,"","cov"],[2,4,1,"","f"],[2,4,1,"","fhtml"],[2,3,1,"","fit_output"],[2,4,1,"","flatex"],[2,4,1,"","funicode"],[2,4,1,"","get_p0"],[2,4,1,"","get_punits"],[2,4,1,"","jac"],[2,3,1,"","nparam"],[2,3,1,"","p"],[2,3,1,"","p0"],[2,3,1,"","pf"],[2,3,1,"","punits"],[2,3,1,"","res"],[2,3,1,"","s"],[2,3,1,"","solver"],[2,3,1,"","ux"],[2,3,1,"","uy"],[2,3,1,"","x"],[2,3,1,"","xdim"],[2,3,1,"","xf"],[2,3,1,"","y"],[2,3,1,"","ydim"],[2,3,1,"","yf"]],"metrolopy.fit.PolyFit":[[2,4,1,"","f"],[2,4,1,"","fhtml"],[2,4,1,"","flatex"],[2,4,1,"","funicode"],[2,4,1,"","get_p0"],[2,4,1,"","get_punits"],[2,4,1,"","jac"]],"metrolopy.fit.SinFit":[[2,3,1,"","count"],[2,3,1,"","cov"],[2,4,1,"","f"],[2,4,1,"","fhtml"],[2,3,1,"","fit_output"],[2,4,1,"","flatex"],[2,4,1,"","funicode"],[2,4,1,"","get_p0"],[2,4,1,"","get_punits"],[2,4,1,"","jac"],[2,3,1,"","nparam"],[2,3,1,"","p"],[2,3,1,"","p0"],[2,3,1,"","pf"],[2,3,1,"","punits"],[2,3,1,"","res"],[2,3,1,"","s"],[2,3,1,"","solver"],[2,3,1,"","ux"],[2,3,1,"","uy"],[2,3,1,"","x"],[2,3,1,"","xdim"],[2,3,1,"","xf"],[2,3,1,"","y"],[2,3,1,"","ydim"],[2,3,1,"","yf"]],"metrolopy.functions":[[2,6,1,"","absolute"],[2,6,1,"","add"],[2,6,1,"","angle"],[2,6,1,"","arccos"],[2,6,1,"","arccosh"],[2,6,1,"","arcsin"],[2,6,1,"","arcsinh"],[2,6,1,"","arctan"],[2,6,1,"","arctan2"],[2,6,1,"","arctanh"],[2,6,1,"","around"],[2,6,1,"","cbrt"],[2,6,1,"","ceil"],[2,6,1,"","conj"],[2,6,1,"","cos"],[2,6,1,"","cosh"],[2,6,1,"","cross"],[2,6,1,"","cumprod"],[2,6,1,"","cumsum"],[2,6,1,"","diff"],[2,6,1,"","divide"],[2,6,1,"","divmod"],[2,6,1,"","ediff1d"],[2,6,1,"","exp"],[2,6,1,"","exp2"],[2,6,1,"","expm1"],[2,6,1,"","fix"],[2,6,1,"","floor"],[2,6,1,"","floor_divide"],[2,6,1,"","gradient"],[2,6,1,"","heaviside"],[2,6,1,"","imag"],[2,6,1,"","log"],[2,6,1,"","log10"],[2,6,1,"","log1p"],[2,6,1,"","log2"],[2,6,1,"","logaddexp"],[2,6,1,"","logaddexp2"],[2,6,1,"","mod"],[2,6,1,"","modf"],[2,6,1,"","multiply"],[2,6,1,"","negative"],[2,6,1,"","power"],[2,6,1,"","prod"],[2,6,1,"","real"],[2,6,1,"","reciprocal"],[2,6,1,"","remainder"],[2,6,1,"","rint"],[2,6,1,"","sign"],[2,6,1,"","sin"],[2,6,1,"","sinh"],[2,6,1,"","sqrt"],[2,6,1,"","square"],[2,6,1,"","subtract"],[2,6,1,"","sum"],[2,6,1,"","tan"],[2,6,1,"","tanh"],[2,6,1,"","true_divide"],[2,6,1,"","trunc"]],"metrolopy.gummy":[[2,1,1,"","MetaGummy"],[2,1,1,"","gummy"],[2,1,1,"","jummy"]],"metrolopy.gummy.MetaGummy":[[2,2,1,"","bayesian"],[2,2,1,"","cimethod"],[2,2,1,"","cmp_k"],[2,2,1,"","cmp_p"],[2,2,1,"","max_digits"],[2,2,1,"","max_dof"],[2,2,1,"","mulsep"],[2,2,1,"","nsig"],[2,2,1,"","p_method"],[2,2,1,"","rounding_u"],[2,2,1,"","sci_notation"],[2,2,1,"","sci_notation_high"],[2,2,1,"","sci_notation_low"],[2,2,1,"","solidus"],[2,2,1,"","style"],[2,2,1,"","thousand_spaces"]],"metrolopy.gummy.gummy":[[2,2,1,"","U"],[2,2,1,"","Usim"],[2,4,1,"","angle"],[2,4,1,"","apply"],[2,4,1,"","ascii"],[2,3,1,"","bayesian"],[2,4,1,"","budget"],[2,3,1,"","cimethod"],[2,2,1,"","cisim"],[2,4,1,"","conjugate"],[2,4,1,"","copy"],[2,4,1,"","correlation"],[2,4,1,"","correlation_matrix"],[2,4,1,"","correlation_matrix_sim"],[2,4,1,"","correlation_sim"],[2,4,1,"","covariance"],[2,4,1,"","covariance_matrix"],[2,4,1,"","covariance_matrix_sim"],[2,4,1,"","covariance_sim"],[2,4,1,"","covplot"],[2,4,1,"","create"],[2,2,1,"","distribution"],[2,2,1,"","dof"],[2,4,1,"","doffrom"],[2,3,1,"","exception_on_fmt_error"],[2,2,1,"","finfo"],[2,4,1,"","get_name"],[2,4,1,"","graft"],[2,4,1,"","hist"],[2,4,1,"","html"],[2,2,1,"","imag"],[2,2,1,"","independent"],[2,2,1,"","k"],[2,2,1,"","ksim"],[2,4,1,"","latex"],[2,3,1,"","max_digits"],[2,3,1,"","mulsep"],[2,2,1,"","name"],[2,4,1,"","napply"],[2,3,1,"","nsig"],[2,2,1,"","p"],[2,2,1,"","real"],[2,3,1,"","sci_notation"],[2,3,1,"","sci_notation_high"],[2,3,1,"","sci_notation_low"],[2,3,1,"","show_dof"],[2,3,1,"","show_k"],[2,3,1,"","show_name"],[2,3,1,"","show_p"],[2,4,1,"","sim"],[2,2,1,"","simdata"],[2,2,1,"","simsorted"],[2,4,1,"","simulate"],[2,3,1,"","slashaxis"],[2,3,1,"","solidus"],[2,4,1,"","splonk"],[2,3,1,"","style"],[2,3,1,"","thousand_spaces"],[2,4,1,"","toascii"],[2,4,1,"","tohtml"],[2,4,1,"","tolatex"],[2,4,1,"","tostring"],[2,4,1,"","toummy"],[2,2,1,"","u"],[2,2,1,"","ubreakdown"],[2,4,1,"","ufrom"],[2,4,1,"","unicode"],[2,2,1,"","unit"],[2,2,1,"","usim"],[2,2,1,"","utype"],[2,2,1,"","uunit"],[2,2,1,"","uunit_is_rel"],[2,2,1,"","x"],[2,2,1,"","xsim"]],"metrolopy.gummy.jummy":[[2,4,1,"","get_name"],[2,2,1,"","name"],[2,3,1,"","show_name"],[2,4,1,"","splonk"],[2,4,1,"","toimmy"],[2,4,1,"","tostring"]],"metrolopy.logunit":[[2,1,1,"","LogConversion"],[2,1,1,"","LogUnit"]],"metrolopy.logunit.LogConversion":[[2,4,1,"","copy"],[2,4,1,"","frm"],[2,4,1,"","log_func"],[2,4,1,"","to"]],"metrolopy.logunit.LogUnit":[[2,4,1,"","get_composite"],[2,4,1,"","zero"]],"metrolopy.mean":[[2,6,1,"","autocorrelation"],[2,6,1,"","delta_diff"],[2,6,1,"","delta_diff_mean"],[2,6,1,"","delta_sum"],[2,6,1,"","delta_sum_mean"],[2,6,1,"","mean"],[2,6,1,"","mean_datetime"],[2,6,1,"","n_eff"],[2,6,1,"","sigma_trim"],[2,6,1,"","wmean"]],"metrolopy.nonlinearunit":[[2,1,1,"","NonlinearConversion"],[2,1,1,"","NonlinearUnit"],[2,1,1,"","ReciprocalConversion"]],"metrolopy.nonlinearunit.NonlinearConversion":[[2,4,1,"","chain"],[2,4,1,"","copy"],[2,3,1,"","linear"],[2,4,1,"","pow"],[2,4,1,"","rchain"]],"metrolopy.nonlinearunit.NonlinearUnit":[[2,4,1,"","from_uunit"],[2,4,1,"","get_composite"],[2,4,1,"","to_uunit"],[2,4,1,"","zero"]],"metrolopy.nonlinearunit.ReciprocalConversion":[[2,4,1,"","chain"],[2,4,1,"","copy"],[2,4,1,"","frm"],[2,4,1,"","to"]],"metrolopy.nummy":[[2,1,1,"","nummy"]],"metrolopy.nummy.nummy":[[2,2,1,"","Usim"],[2,2,1,"","bayesian"],[2,2,1,"","cimethod"],[2,2,1,"","cisim"],[2,4,1,"","correlation_matrix_sim"],[2,4,1,"","correlation_sim"],[2,4,1,"","covariance_matrix_sim"],[2,4,1,"","covariance_sim"],[2,4,1,"","covplot"],[2,4,1,"","create"],[2,2,1,"","distribution"],[2,2,1,"","dof"],[2,4,1,"","get_name"],[2,4,1,"","hist"],[2,2,1,"","independent"],[2,2,1,"","ksim"],[2,2,1,"","name"],[2,2,1,"","p"],[2,4,1,"","set_seed"],[2,2,1,"","simdata"],[2,2,1,"","simsorted"],[2,4,1,"","simulate"],[2,4,1,"","splonk"],[2,4,1,"","toummy"],[2,4,1,"","ufrom"],[2,2,1,"","usim"],[2,2,1,"","xsim"]],"metrolopy.offsetunit":[[2,1,1,"","OffsetConversion"],[2,1,1,"","OffsetUnit"]],"metrolopy.offsetunit.OffsetConversion":[[2,4,1,"","copy"],[2,4,1,"","frm"],[2,4,1,"","to"]],"metrolopy.offsetunit.OffsetUnit":[[2,4,1,"","zero"]],"metrolopy.pmethod":[[2,6,1,"","ccp_from_k"],[2,6,1,"","conservative_coverage_probability"],[2,6,1,"","coverage_factor"],[2,6,1,"","coverage_probability"],[2,6,1,"","cp_from_k"],[2,6,1,"","loc_from_k"]],"metrolopy.prefixedunit":[[2,1,1,"","BinaryPrefixedUnit"],[2,1,1,"","PrefixedUnit"]],"metrolopy.prefixedunit.BinaryPrefixedUnit":[[2,3,1,"","prefix_definitions"]],"metrolopy.prefixedunit.PrefixedUnit":[[2,3,1,"","prefix_definitions"]],"metrolopy.printing":[[2,1,1,"","MetaPrettyPrinter"],[2,1,1,"","PrettyPrinter"],[2,6,1,"","print_html"],[2,6,1,"","print_latex"],[2,6,1,"","print_markdown"],[2,6,1,"","set_printer"]],"metrolopy.printing.MetaPrettyPrinter":[[2,2,1,"","printer"]],"metrolopy.printing.PrettyPrinter":[[2,4,1,"","ascii"],[2,3,1,"","break_on_printing_error"],[2,4,1,"","html"],[2,4,1,"","latex"],[2,4,1,"","latex_math"],[2,4,1,"","latex_math_plot"],[2,4,1,"","latex_norm"],[2,4,1,"","latex_norm_plot"],[2,3,1,"","printer"],[2,4,1,"","toascii"],[2,4,1,"","tohtml"],[2,4,1,"","tolatex"],[2,4,1,"","tounicode"],[2,4,1,"","unicode"]],"metrolopy.relunits":[[2,1,1,"","RatioUnit"]],"metrolopy.tests":[[3,0,0,"-","test_create"]],"metrolopy.tests.test_create":[[3,6,1,"","test_gummy_init"]],"metrolopy.ummy":[[2,1,1,"","GummyTag"],[2,1,1,"","MFraction"],[2,1,1,"","MetaImmy"],[2,1,1,"","immy"],[2,1,1,"","ummy"]],"metrolopy.ummy.GummyTag":[[2,4,1,"","get_values"],[2,4,1,"","set_tag"],[2,3,1,"","tags"]],"metrolopy.ummy.MetaImmy":[[2,2,1,"","imag_symbol"],[2,2,1,"","style"]],"metrolopy.ummy.immy":[[2,4,1,"","angle"],[2,4,1,"","conjugate"],[2,4,1,"","copy"],[2,2,1,"","cov"],[2,2,1,"","imag"],[2,2,1,"","phi"],[2,2,1,"","r"],[2,2,1,"","real"],[2,4,1,"","splonk"],[2,3,1,"","style"],[2,4,1,"","tofloat"],[2,4,1,"","tostring"],[2,2,1,"","x"]],"metrolopy.ummy.ummy":[[2,4,1,"","angle"],[2,4,1,"","conjugate"],[2,4,1,"","copy"],[2,4,1,"","correlation"],[2,4,1,"","correlation_matrix"],[2,4,1,"","covariance"],[2,4,1,"","covariance_matrix"],[2,4,1,"","create"],[2,2,1,"","dof"],[2,4,1,"","doffrom"],[2,2,1,"","finfo"],[2,2,1,"","imag"],[2,3,1,"","max_digits"],[2,3,1,"","max_dof"],[2,3,1,"","nsig"],[2,2,1,"","real"],[2,3,1,"","rounding_u"],[2,3,1,"","sci_notation"],[2,3,1,"","sci_notation_high"],[2,3,1,"","sci_notation_low"],[2,4,1,"","splonk"],[2,3,1,"","thousand_spaces"],[2,4,1,"","tofloat"],[2,4,1,"","tostring"],[2,2,1,"","u"],[2,4,1,"","ufrom"],[2,2,1,"","utype"],[2,2,1,"","x"]],"metrolopy.unit":[[2,1,1,"","Conversion"],[2,1,1,"","Quantity"],[2,1,1,"","QuantityArray"],[2,1,1,"","Unit"],[2,6,1,"","unit"]],"metrolopy.unit.Conversion":[[2,4,1,"","chain"],[2,4,1,"","copy"],[2,4,1,"","frm"],[2,3,1,"","linear"],[2,4,1,"","pow"],[2,4,1,"","to"],[2,2,1,"","unit"]],"metrolopy.unit.Quantity":[[2,2,1,"","c"],[2,4,1,"","convert"],[2,4,1,"","copy"],[2,2,1,"","imag"],[2,2,1,"","real"],[2,4,1,"","reduce_unit"],[2,4,1,"","splonk"],[2,3,1,"","splonk_func_ret"],[2,4,1,"","tofloat"],[2,4,1,"","tostring"],[2,4,1,"","totuple"],[2,2,1,"","unit"],[2,2,1,"","value"]],"metrolopy.unit.Unit":[[2,2,1,"","conversion"],[2,4,1,"","convert"],[2,4,1,"","format_latex"],[2,2,1,"","is_dimensionless"],[2,2,1,"","linear"],[2,3,1,"","mulsep"],[2,4,1,"","reorder"],[2,3,1,"","solidus"],[2,4,1,"","unit"],[2,2,1,"","units"]],"metrolopy.unitutils":[[2,6,1,"","convert"],[2,6,1,"","search_units"],[2,6,1,"","shadowed_units"]],metrolopy:[[2,0,0,"-","budget"],[2,0,0,"-","dfunc"],[2,0,0,"-","distributions"],[2,0,0,"-","exceptions"],[2,0,0,"-","fit"],[2,0,0,"-","functions"],[2,0,0,"-","gummy"],[2,0,0,"-","logunit"],[2,0,0,"-","mean"],[2,0,0,"-","nonlinearunit"],[2,0,0,"-","nummy"],[2,0,0,"-","offsetunit"],[2,0,0,"-","pmethod"],[2,0,0,"-","prefixedunit"],[2,0,0,"-","printing"],[2,0,0,"-","relunits"],[2,0,0,"-","siunits"],[3,0,0,"-","tests"],[2,0,0,"-","ummy"],[2,0,0,"-","unit"],[2,0,0,"-","unitutils"],[2,0,0,"-","usunits"],[2,0,0,"-","version"]]},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","property","Python property"],"3":["py","attribute","Python attribute"],"4":["py","method","Python method"],"5":["py","exception","Python exception"],"6":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:property","3":"py:attribute","4":"py:method","5":"py:exception","6":"py:function"},terms:{"0":[0,1,2],"00":[0,2],"000":2,"0000":2,"0000012":2,"001":[0,2],"005":[0,2],"00e":[0,2],"01":[0,2],"01e":[0,2],"022":0,"0234":1,"0254":0,"03":2,"034":1,"05":[0,2],"050":2,"06":2,"060":2,"077":[0,2],"09":2,"0932962619709627":[0,2],"096":1,"1":[0,1,2],"10":[0,1,2],"100":[0,2],"1000":2,"10000":2,"100000":[0,2],"1000000":2,"1000000000":2,"1000000000000":2,"1000000000000000":2,"1024":2,"1038":[1,2],"1048576":2,"1073741824":2,"1099511627776":2,"11":[0,2],"11224696052342387":0,"1125899906842624":2,"1152921504606846976":2,"1180591620717411303424":2,"12":[0,2],"1208925819614629174706176":2,"123":0,"13":[0,1,2],"13e":[0,2],"15":[1,2],"174":1,"18":2,"19":1,"1e":[0,2],"2":[0,1,2],"20":[0,2],"200":0,"2006":2,"2007":2,"2008":[0,2],"2009":1,"2014":1,"2019":1,"2020":1,"2021":1,"2022":1,"21":[1,2],"22":[0,2],"23":1,"234":1,"2345":1,"24":[0,1,2],"25":[0,1],"26":1,"27":0,"2e":[0,2],"2x":0,"2y":0,"3":[0,1,2],"30":[0,2],"340":2,"36":[0,2],"39":1,"3e":[0,2],"4":[0,1,2],"43":2,"44":[0,2],"459":0,"5":[0,1,2],"50":[0,1,2],"53851648071345048":[0,2],"54":[0,2],"57":[0,2],"5px":2,"6":1,"60":0,"627":[0,2],"65":[0,2],"67":[0,2],"678":[0,2],"7":[0,1,2],"8":[0,1,2],"8e":[0,2],"8ex":2,"9":[0,2],"9144":0,"9345":1,"95":[0,2],"95449973610364158":2,"959963984540054":0,"9924":0,"9973":2,"9999769927034015":2,"9th":[1,2],"\u03bc":2,"abstract":2,"case":[0,1,2],"class":2,"const":0,"default":[0,2],"do":[0,1,2],"float":[0,2],"function":4,"import":[0,1,2],"int":[0,2],"long":2,"new":[0,2],"public":[1,2],"return":[0,2],"short":[0,2],"static":2,"super":0,"switch":2,"throw":[0,2],"true":[0,2,3],"while":[0,2],A:[0,2],But:[0,2],By:[0,2],For:[0,2],If:[0,2],In:[0,1,2],It:[0,1,2],Not:2,One:[0,2],Or:[0,2],The:[0,1,2],Then:0,These:[0,1,2],To:[0,2],With:[0,2],__init__:[0,2],__str__:2,_add:2,_appli:2,_compositeunit:[0,2],_cov:0,_fit:2,_intervalunit:0,_nappli:2,_one:0,_radd:2,_simul:0,_sub:2,_u:0,_x:0,a0:0,ab:[0,2],abov:[0,1,2],absolut:[0,2],absoult:2,access:[0,2],account:[0,2],accur:2,actual:[0,2],ad:[0,1,2],add:[0,2],add_symbol:[0,2],addit:[0,2],additional_nam:[0,2],additional_short_nam:2,advoc:[0,2],affect:[0,2],after:0,again:0,ai:0,air:0,aj:0,algorithm:0,alia:[0,2],alias:0,align:2,all:[0,2],allow:[0,2],along:[0,2],alpha:0,alreadi:[0,2],also:[0,1,2],alter:2,altern:[0,1,2],alwai:2,amount:2,an:[0,1,2],analysi:[0,2],analyz:0,angl:[0,2],ani:[0,2],anoth:[0,2],any_but_latex:[0,2],api:1,appear:0,append:0,appli:2,appropri:2,approxim:2,april:1,ar:[0,1,2],araound:0,arbitrari:[0,2],arcco:[0,2],arccosh:[0,2],arcsin:[0,2],arcsindist:[0,2],arcsinh:[0,2],arctan2:[0,2],arctan:[0,2],arctanh:[0,2],arg1:[0,2],arg2:[0,2],arg:[0,2],argument:[0,2],arithmat:2,arithmet:2,around:2,arrai:[0,2],array_lik:2,ascii:[0,2],ascii_symbol:[0,2],assign:[0,2],associ:[0,2],assum:[0,2],assumpt:[0,2],asterisk:0,asterix:0,astronom:1,attach:[0,2],attempt:[0,2],atto:2,attribut:2,auto:[0,2],autocorrel:2,autogener:0,automat:[0,1,2],avail:[0,2],averag:2,avoid:[0,2],ax:0,axhlin:[0,2],axi:[0,2],axvlin:[0,2],b:[0,1,2],back:[0,2],background:2,band:0,bar:0,base:[0,2],base_descript:[0,2],base_prefix:2,bayesian:[0,2],bayesian_default:2,becaus:[0,2],been:[0,2],befor:[0,2],begin:[0,2],behavior:[0,2],below:[0,1,2],best:[0,1,2],between:[0,2],bin:[0,2],binari:[0,2],binaryprefixedunit:[0,2],binomi:0,binomialdist:[0,2],boadcast:0,bold:2,bool:[0,2],border:2,both:[0,2],bottom:2,bound:0,bracket:[0,2],break_on_printing_error:2,broadcast:[0,2],brochur:[1,2],budget:[0,1,4],budget_first_col_header_cel:2,budget_first_col_x_cel:2,budget_header_cel:2,budget_header_row:2,budget_row:2,budget_t:2,budget_x_cel:2,budgetwarn:2,bug:[1,5],built:[1,2],builtin:2,c:[0,1,2],ca:1,calcul:[0,2],calibr:1,call:[0,2],can:[0,1,2],canada:1,cancel:[0,2],cannot:2,capabl:0,care:2,carlo:[1,2],carri:[0,2],cartesian:[0,2],caus:2,caution:2,cbrt:[0,2],ccp:[0,2],ccp_from_k:2,ceil:[0,2],cell:2,celsiu:[0,2],center:[0,1,2],centi:2,certain:0,chain:[0,2],chang:[0,1,2],charact:[0,2],chebyshev:[0,2],chi:[0,2],chi_correct:2,chisquar:[0,2],chisquareddist:[0,2],choic:0,choos:2,ci:2,ci_mark:[0,2],ci_marker_opt:[0,2],ciformat:0,cik:0,cimethod:[0,2],cioption:0,cip:0,circ:0,circular:[0,2],circularunitconversionerror:[0,2],cisim:[0,2],cisym:2,cl:2,classmethod:[0,2],clear:2,clformat:0,clk:0,cloption:0,clp:0,cm2:1,cm:[0,1,2],cmp_k:[0,2],cmp_p:[0,2],cn:0,co:[0,2],codata:1,code:[0,1,2],coeffici:[0,2],color:[0,2],column:[0,2],column_nam:[0,2],combin:[0,2],comlic:2,command:0,commonli:[0,2],compar:2,comparison:[0,2],compat:0,complet:[0,2],complex:[0,1,2],complic:2,compon:[0,2],composit:[0,2],comprehens:1,comput:[0,2],concis:[0,2],conda:1,confid:[0,2],confus:1,conj:[0,2],conjug:[0,2],conservative_coverage_prob:2,consol:[0,2],constant:[0,1,2],constantnotfounderror:2,constitu:[0,2],conta:0,contact:1,contain:[0,1,2],content:4,contribut:[0,2],control:[0,2],convei:1,convers:[1,2],convert:[0,2],convolut:[0,2],coordin:[0,2],copi:[0,2],core:2,correct:0,correctli:2,correl:[0,1,2],correlation_matrix:[0,2],correlation_matrix_sim:2,correlation_sim:2,correspond:[0,2],cosh:[0,2],cosin:[0,2],council:1,count:[0,2],cov:[0,2],covari:[0,2],covariance_matrix:[0,2],covariance_matrix_sim:2,covariance_sim:2,coverag:[0,2],coverage_factor:2,coverage_prob:2,covplot:[0,2],covsim:2,covsim_matrix:2,cp:[0,2],cp_from_k:2,creat:[0,1,2],creation:2,cross:[0,2],css:[0,2],cube:[0,2],cubic:2,cumpord:0,cumprod:[0,2],cumsum:[0,2],curv:[1,2],curvlinear:0,curvlineartrapdist:[0,2],custom:2,custom_head:[0,2],custom_math_mod:[0,2],customari:1,d1:[0,2],d2:[0,2],d:[0,2],da:2,data:[0,1,2],data_format:0,data_opt:0,datafram:[0,2],date:[0,2],db:[0,2],de:2,deal:[0,1],deatil:0,deca:2,deci:2,decibel:[0,2],decid:2,decreas:[0,2],def:[0,2],default_column:2,default_column_nam:2,default_css:[0,2],defin:[0,1,2],definit:[0,1],defualt:0,deg:[0,2],degf:0,degr:0,degre:[0,1,2],delta:2,delta_diff:2,delta_diff_mean:2,delta_sum:2,delta_sum_mean:2,denomin:0,densiti:[0,2],depend:[0,2],deriv:[0,2],describ:[0,2],descript:[0,2],description_math_mod:[0,2],desir:[0,2],detail:[0,2],determin:[0,2],devat:2,develop:1,deviat:[0,2],df1:[0,2],df2:[0,2],df:[0,2],df_html:[0,2],df_latex:[0,2],df_str:[0,2],dfunc:[0,4],dhypot:[0,2],dict:[0,2],dictionari:[0,2],diff:[0,2],differ:[0,1,2],digit:[0,2],dimens:[0,2],dimension:[0,2],dimensionless:[0,2],direchletdist:0,directli:[0,2],dirichlet:0,disabl:0,displai:2,distribut:[1,4],divid:[0,2],divis:[0,2],divmod:[0,2],doc:0,document:[0,1,2],doe:[0,2],dof:[0,2],doffrom:[0,2],don:2,dot:[0,2],doubl:0,doubleexpfit:[0,2],down:2,download:1,dp1:[0,2],dp2:[0,2],draft:1,draw:[0,2],drawn:[0,2],drift:2,du:[0,2],dure:[0,2],dv:[0,2],dx1:[0,2],dx2:[0,2],dx:[0,2],dy:[0,2],e:[0,2],each:[0,2],ediff1d:[0,2],edit:[0,1,2],effect:[0,2],ei:2,either:[0,2],element:[0,2],els:[0,2],enclos:[0,2],encod:2,end:0,ensur:2,entri:[0,2],enumer:0,epsilon:0,equal:[0,2],equat:[0,2],equiv:2,equival:[0,2],eras:[0,2],erg:0,error:[0,2],error_bar:0,error_bar_k:0,errorbar:0,estim:2,even:2,evenli:2,event:2,ex:0,exa:2,exactli:[0,2],exampl:[0,2],exbi:2,except:[0,4],exception_on_fmt_error:2,exception_on_warn:3,exclud:2,execut:[0,2],exist:[0,2],exit:[0,2],exp2:[0,2],exp:[0,2],expan:0,expand:[0,1,2],expfit:[0,2],explicitli:0,expm1:[0,2],expon:[0,2],exponenti:0,exponentialdist:[0,2],express:[0,1,2],extens:0,extra:[0,2],ey:0,f1:[0,2],f2:[0,2],f:[0,1,2],fab:0,facilit:2,factor:[0,2],fahrenheit:[0,2],fail:0,fals:[0,2,3],feet:2,femto:2,few:[0,2],fhtml:[0,2],figur:0,fill:2,find:[0,2,5],finfo:2,finit:[0,2],first:[0,1,2],fit:[1,4],fit_format:0,fit_opt:0,fit_output:[0,2],fitwarn:2,fix:[0,1,2],flag:[0,2],flase:0,flatex:[0,2],floor:[0,2],floor_divid:[0,2],fmt:[0,2],follow:[0,2],font:2,foot:[0,2],forc:2,forg:1,form:[0,2],format:2,format_latex:2,forward:[0,2],found:[0,2],four:[0,2],fraction:[0,1,2],fragment:[0,2],free:[0,1,2],freedom:[0,1,2],frm:2,from:[0,2],from_unit:2,from_uunit:2,ft:[0,2],full:[0,2],func:[0,2],funicod:[0,2],fxx:2,g:[0,2],gamma:0,gammadist:[0,2],gauss:[0,2],gener:[0,2],get:[0,2],get_composit:2,get_nam:2,get_p0:[0,2],get_puint:0,get_punit:[0,2],get_valu:2,gi:2,gibi:[0,2],giga:[0,2],github:1,give:[0,2],given:[0,2],gnu:1,good:0,gradient:[0,2],graft:[0,2],greater:[0,2],group:2,gt:1,guass:0,guess:[0,2],guid:1,gum:[0,1,2],gummi:4,gummytag:2,gummywarn:2,h0:[0,2],h:2,ha:[0,2],half_width:[0,1,2],handl:[1,2],handmad:1,harold:1,have:[0,2],head:[0,2],header:[0,2],heavisid:[0,2],heavysid:[0,2],hecto:2,held:[0,2],help:5,here:[0,2,5],hist:[0,2],histogram:[0,2],hold:[0,2],holomorph:[0,2],horizont:[0,2],how:[0,2],howev:[0,1,2],html:[0,2],html_symbol:[0,2],hyperbol:[0,2],hypot:[0,2],i:[0,2],iau:1,idea:0,ident:[0,2],ignor:[0,2],ignore_nan:2,imag:[0,2],imag_symbol:2,imaginari:[0,2],immedi:0,immi:[0,1,2],implement:[0,1,2],impos:1,improv:1,inch:[0,2],includ:[0,1,2],incompat:2,incompatibleunitserror:2,incorpor:[0,2],incorrectli:1,independ:[0,2],independantli:0,index:[1,2],indic:[0,2],inequ:[0,2],inf:[0,2],infinit:2,inform:[0,2],inherit:[0,2],init:[0,2],initi:[0,2],inlin:[0,2],input:[0,2],insensit:0,insent:2,insert:[0,2],instal:[0,1],instanc:[0,2],institut:1,intanc:2,integ:[0,1,2],integr:2,intend:[0,2],interact:0,interg:2,intermedi:2,intern:[1,2],interpol:2,interpret:2,interv:[0,2],invers:[0,2],involv:2,ipython:[0,1,2],is_dimensionless:[0,2],isindepend:2,iso:1,issu:1,iter:[0,2],its:0,itself:0,j:[0,2],jac:[0,2],jacobian:[0,2],jgcm:1,joint:[0,2],juli:1,jummi:2,juptyer:2,jupyt:[0,1,2],just:0,k:[0,2],keep:0,kei:[0,2],keyword:[0,2],keywork:0,kg:[0,2],ki:2,kibi:[0,2],kilo:[0,2],kilogram:[0,2],known:[0,1],ko:[0,2],kpa:1,ksim:[0,2],kw:2,kwarg:2,kwd:[0,2],lab:1,label:[0,2],lam:[0,2],laplac:0,laplacedist:[0,2],larger:2,largest:0,last:[0,2],later:0,latex:[0,2],latex_math:2,latex_math_plot:2,latex_norm:2,latex_norm_plot:2,latex_symbol:[0,2],lb:[0,2],least:0,leastsq:[0,2],left:[0,2],left_width:[0,2],len:0,length:[0,2],less:[0,2],level:[0,2],li:0,librari:[0,1,2],lie:[0,2],light:[0,2],like:[0,2],limit:[0,2],limit_half_rang:[0,2],line:[0,2],linear:[0,2],linewidth:[0,2],list:[0,1,2],load:[0,2],loc:[0,2],loc_from_k:2,locat:0,log10:[0,2],log1p:[0,2],log2:[0,2],log:[0,2],log_bas:[0,2],log_func:[0,2],logaddexp2:[0,2],logaddexp:[0,2],logarithm:[0,2],logconvers:[0,2],loge:0,lognormaldist:[0,2],logrithm:[0,2],logunit:[0,4],look:[0,1,2],lot:5,lower:[0,2],lower_limit:[0,2],lowest:0,m:[0,2],machin:0,machineri:2,made:0,magnitud:[0,2],mai:[0,1,2],major:1,make:[0,2],mani:[0,1],manual:2,march:1,markdown:[0,2],marker:[0,2],mask:2,match:[0,2],math:[0,2],mathemat:2,mathrm:2,matrix:[0,2],max_digit:[0,2],max_dof:2,maximum:[0,2],maxit:[0,2],mcisim:[0,2],mcisym:[0,2],mean:[0,4],mean_datetim:2,mean_mark:[0,2],mean_marker_opt:[0,2],measur:[0,1,2],measurand:[0,2],mebi:[0,2],mega:[0,2],metagummi:2,metaimmi:2,metaprettyprint:2,meter:0,method:2,metr:[0,2],metrolog:1,metrologia:2,mfraction:2,mi:2,micro:[0,2],microinch:0,microsecond:[0,2],milli:2,millisecond:[0,2],min:2,minim:2,minor:1,minu:2,miscellan:2,miss:[0,2],mix:[0,2],mm:[0,1,2],mod:[0,2],mode:[0,2],modf:[0,2],modifi:[0,1,2],modul:[0,1,4],modulu:0,mone:2,mont:[1,2],more:[0,1,2],most:[0,2],mpf:[0,1,2],mpmath:[0,1,2],ms:[0,2],mu:[0,2],much:1,mulit:0,mulsep:[0,2],multi:2,multinormaldist:[0,2],multipl:[0,2],multipli:[0,2],multitdist:[0,2],multitel:2,multivari:[0,2],multivariatedistribut:[0,2],multivariateel:2,multvariatedistribut:0,must:[0,1,2],mv:2,n:[0,1,2,3],n_eff:2,n_sigma:2,n_sigma_trim:2,name:[0,2],nan:2,nano:2,nappli:[0,2],nation:1,natur:[0,2],nd:[0,2],ndarrai:[0,2],nearest:[0,2],necessari:0,need:[0,2,5],neg:[0,1,2],negat:0,neither:[0,2],neper:[0,2],never:0,newli:[0,2],nist:[1,2],nl:[0,2],nomral:2,non:[0,2],none:[0,2,3],nonlinear:[0,2],nonlinearconvers:2,nonlinearunit:[0,4],nor:2,norm:2,normal:[0,2],normaldist:[0,2],nosimulateddataerror:[0,2],notat:[0,2],note:[0,1,2],notebook:[0,1,2],notimplementederror:[0,2],nounitconversionfounderror:[0,2],now:[0,2],np:[0,2],nparam:[0,2],nprop:[0,2],nrc:1,nsig:[0,2],number:[0,2],numer:2,nummi:4,numpi:[0,1,2],object:[0,1,2],observ:[0,2],octob:1,odd:2,odr:[0,2],off:2,offset:[0,2],offsetconvers:[0,2],offsetunit:[0,4],often:[0,2],ol:0,older:[0,2],omit:[0,2],ommit:0,onc:[0,2],one:[0,2],oneovertfit:[0,2],onli:[0,2],oper:2,operand:0,opertaion:2,optim:[0,2],option:[0,2],order:[0,2],origin:[0,2],os:2,other:[0,1,2],otherwis:[0,2],out:[0,2],outlier:2,outlin:1,output:[0,2],outsid:2,over:[0,2],over_plot:0,overrid:[0,2],overridden:[0,2],own:2,p0:[0,2],p1:[0,2],p2:[0,2],p3:2,p4:2,p5:2,p:[0,1,2],p_method:[0,2],packag:[0,1,4],pad:2,page:1,pair:0,panda:[0,1,2],param:2,paramet:2,paramt:0,parent:2,park:1,parksh:1,pars:2,part:[0,2],partial:[0,2],particular:[0,2],pass:[0,2],pebi:2,perfectli:2,perform:[0,2],perhap:1,peta:2,pf:[0,2],phi:[0,2],physic:[0,1,2],pi:[0,2],pick:[0,2],pico:2,pip:1,pk:0,place:[0,2],pleas:1,plot:[0,2,3],plot_opt:[0,2],plot_point:0,plu:2,plusmn:1,pm:[0,2],pmethod:4,pmi:[0,2],pmsim:[0,2],pmsimi:[0,2],pn:[0,2],point:[0,2],poisson:0,poissondist:[0,2],polar:[0,2],polyfit:[0,2],polynomi:0,popul:[0,2],posit:2,possibl:[0,2],pow:2,power:[0,2],ppm:[0,2],practic:1,predict:[0,2],prefer:[0,2],prefix:[0,2],prefix_definit:2,prefixedunit:[0,4],pressur:0,pretti:[0,2],prettyprint:2,prevent:2,previou:0,previous:[0,2],primarili:2,print:[0,4],print_html:2,print_latex:2,print_markdown:2,printer:[0,2],prnt:[0,2,3],probabl:[0,2],problem:2,prod:[0,2],produc:0,propag:[0,1,2],properti:2,proport:0,provid:2,psi:2,ptostr:2,punit:[0,2],pure:1,put:[0,2,5],py:[0,1],pyplot:[0,2],python:[0,1,2],quadrant:[0,2],quaitii:0,quanit:[0,2],quantati:2,quantiti:[0,1,2],quantityarrai:2,r:[0,2],radian:2,rais:[0,2],random:[0,2],random_st:[0,2],randomst:[0,2],rare:0,rate:[0,2],rather:[0,2],ratiounit:2,raw:[0,2],rchain:2,re:[0,2],read:[0,2],readi:2,real:[0,2],realiz:2,reciproc:[0,2],reciprocalconvers:2,recogn:0,recommend:1,red:[0,2],reduc:[0,2],reduce_unit:[0,2],refer:[0,1,2],referenc:[0,1,2],rel:[0,2],relat:2,relationship:0,releas:1,relunit:4,remaind:[0,2],remov:[0,2],reorder:[0,2],repres:[0,1,2],represent:[0,2],representaion:2,request:2,requir:[0,1,2],research:1,resect:2,resid:2,residu:[0,2],resolut:2,respect:[0,2],respons:[0,2],restrict:1,result:[0,2],retriev:[0,2],retriv:2,right:2,right_width:[0,2],rint:[0,2],root:[0,2],round:[0,2],rounding_u:[0,2],row:[0,2],rss:0,rule:[0,2],run:[0,2],s276:2,s:[0,2],same:[0,1,2],sampl:[0,2],satterthwait:2,scalar:[0,2],scale:[0,2],scatter:[0,2],sci_not:[0,2],sci_notation_high:[0,2],sci_notation_low:[0,2],scientif:[0,2],scipi:[0,1,2],search:[1,2],search_unit:[0,2],second:[0,2],section:[0,1],see:[0,1,2],seed:[0,2],select:[0,2],self:[0,2],sensit:[0,2],separ:[0,2],septemb:1,seri:2,serv:[0,2],session:[0,2],set:[0,1,2],set_print:2,set_se:[0,2],set_tag:2,setup:1,sever:[0,1,2],shadow:[0,2],shadow_unit:2,shadowed_alias:0,shadowed_unit:2,shape:[0,2],share:[0,2],shift:[0,2],short_nam:[0,2],shortest:[0,2],should:[0,2],show:[0,2],show_:[0,2],show_al:[0,2],show_c:[0,2],show_d:[0,2],show_data:0,show_dof:[0,2],show_expanded_u:[0,2],show_fit:0,show_k:[0,2],show_nam:[0,2],show_p:[0,2],show_subtot:[0,2],shown:[0,2],si:[0,1,2],side:2,sigma:[0,2],sigma_is_known:[0,2],sigma_trim:2,sign:[0,2],signal:2,signatur:[0,2],signific:[0,2],sim:[0,2],simdata:[0,2],similar:[0,2],simpli:2,simsort:[0,2],simul:2,simultan:[0,2],sin:[0,2],sinc:0,sine:[0,2],sinfit:[0,2],singl:[0,2],sinh:[0,2],siunit:[0,4],size:[0,2],slash:[0,2],slashaxi:[0,2],slightli:1,slow:2,smallest:0,so:[0,1,2],softwar:1,solid:2,solidu:[0,2],solver:[0,2],some:[1,2],someth:5,sometim:[0,2],sort:[0,2],sound:0,sourc:1,space:[0,2],special:[1,2],specifi:[0,2],spl:0,spline:2,splonk:2,splonk_func_ret:2,sqrt:[0,2],squar:[0,2],stabl:[0,2],stack:1,standard:[0,1,2],start:[0,5],statement:2,staticmethod:[0,2],stdev:2,str:[0,2],straight:0,string:[0,1,2],strip:2,student:[0,2],style:[0,2],sub:2,subclass:[0,2],submodul:4,subpackag:4,substitut:0,subtot:[0,2],subtract:[0,2],subtrat:0,success:0,sum:[0,2],suppli:[0,2],support:[0,1,2],symbol:[0,2],symmetr:[0,2],system:[1,2],t:[0,2],tab:0,tabl:[0,2],tack:2,tag:2,tag_nam:2,take:[0,2],taken:[0,2],tan:[0,2],tangent:[0,2],tanh:[0,2],tdist:[0,2],tebi:2,teh:2,temperatur:0,tera:2,term:[0,1,2],test:[2,4],test_creat:[2,4],test_gummy_init:3,text:[0,2],th:[0,2],than:[0,1,2],thei:[0,1,2],them:[0,2],themont:0,thi:[0,1,2],thick:[0,2],thin:2,those:[0,2],though:[0,2],thousand_spac:2,thr:2,thu:[0,2],ti:2,time:0,titl:[0,2],title_styl:[0,2],to_unit:2,to_uunit:2,toascii:[0,2],tofloat:[0,2],tohtml:[0,2],toimmi:2,tolatex:[0,2],tool:1,top_to_base_ratio:[0,2],tostr:[0,2],total:[0,2],totupl:2,toummi:2,tounicod:[0,2],toward:[0,2],track:[0,2],tradit:[0,2],tradition:[0,2],transcendent:0,trapezoid:0,trapezoidaldist:[0,2],treat:[0,2],tri:0,trial:0,triangular:0,triangulardist:[0,2],true_divid:[0,2],trunc:[0,2],try_fconvert:0,tupl:[0,2],turn:2,tutori:1,two:[0,2],txt:[0,2],type:[0,1,2],u00b0f:0,u:[0,1,2],ubreakdown:[0,2],uc:[0,1],ueq:[0,2],uf:[0,2],ufrom:[0,2],ufsim:[0,2],ufunc:2,ul:2,um:0,ummi:[0,4],ummy_:0,uncertainti:[0,1,2],uncertianti:0,uncertiantyprecisionwarn:2,uncorrel:[0,2],under:[0,1,2],unicod:[0,2],uniform:0,uniformdist:[0,1,2],unit:[1,4],unit_:0,uniterror:2,unitliberror:[0,2],unitlibnotfounderror:2,unitlibrari:2,unitnotfounderror:[0,2],units_on_valu:[0,2],unitutil:4,unitwarn:2,unless:[0,2],unshadow:0,until:0,unus:2,up:[0,2],upa:[0,2],upon:[0,2],upper:[0,2],upper_limit:[0,2],us:[0,1,2],use_n_eff:2,user:[0,2],usim:[0,2],usual:[0,2],usunit:[0,4],usym:2,util:2,utyp:[0,2],uunit:[0,1,2],uunit_is_rel:[0,2],uv:2,ux:[0,2],uy:[0,2],v:[0,2],valid:[0,2],valu:[0,1,2],valueerror:2,vari:[0,2],variabl:[0,2],varianc:[0,2],variat:2,variou:0,verbatim:1,veri:[0,2],verison:[1,2],version:[0,4],versu:2,vertic:[0,2],view:[0,2],wa:[0,1,2],wai:[0,2],want:[0,1,2],warn:[0,2],we:[0,2],weakvaluedictionari:2,weibul:0,weibulldist:[0,2],weight:[0,2],weird:0,welch:2,well:[1,2],were:[0,1],when:[0,2],whenev:0,where:[0,2],whether:[0,2],which:[0,1,2],who:[0,2],width:2,willink:2,wish:[0,1,2],without:[0,2],wm:0,wmean:2,word:[0,2],work:[0,2],would:[0,2],write:[0,2],x1:[0,2],x2:[0,2],x:[0,2],xd:0,xdim:[0,2],xf:[0,2],xfsim:[0,2],xk:0,xlabel:[0,2],xlist:[0,2],xm:[0,2],xmax:0,xmin:0,xname:[0,2],xsim:[0,2],xsym:2,xunit:[0,2],y:[0,2],yard:[0,2],yd:[0,2],ydim:[0,2],year:[0,2],yf:[0,2],yi:2,ylabel:[0,2],yname:[0,2],yobi:2,yocto:2,yotta:2,you:[0,1,2],ypred:[0,2],ypredf:[0,2],yunit:[0,2],yx:0,z1:0,z:2,zepto:2,zero:[0,2],zetta:2,zhang:2,zi:2,zibi:2},titles:["MetroloPy","MetroloPy, the docs","metrolopy package","metrolopy.tests package","metrolopy","to do"],titleterms:{"abstract":0,"class":[0,1],"do":5,"function":[0,2],"static":0,appli:0,arithmet:0,attribut:0,author:1,auto:1,basic:0,budget:2,built:0,carlo:0,come:1,common:0,content:[2,3],convers:0,curv:0,custom:0,dfunc:2,did:1,displai:0,distribut:[0,2],doc:1,except:2,fit:[0,2],format:0,from:1,further:1,gener:1,get:1,gummi:[0,1,2],histori:1,indic:1,involv:0,jummi:0,licens:1,logunit:2,mathemat:0,mean:2,method:0,metrolopi:[0,1,2,3,4],modul:[2,3],mont:0,multi:0,name:1,nonlinearunit:2,numer:0,nummi:2,offsetunit:2,oper:0,packag:[2,3],paramet:0,pmethod:2,prefixedunit:2,print:2,properti:0,read:1,relat:0,relunit:2,search:0,simul:0,siunit:2,some:0,start:1,sub:0,submodul:[2,3],subpackag:2,tabl:1,test:3,test_creat:3,ummi:2,unit:[0,2],unitutil:2,usunit:2,variat:0,version:[1,2],where:1}}) \ No newline at end of file diff --git a/docs/_build/html/todo.html b/docs/_build/html/todo.html index a8eaeeb..6e9f01b 100644 --- a/docs/_build/html/todo.html +++ b/docs/_build/html/todo.html @@ -6,7 +6,7 @@ - to do — metrolopy 0.6.2 documentation + to do — metrolopy 0.6.3 documentation @@ -25,7 +25,7 @@

    Navigation

  • modules |
  • - + @@ -61,7 +61,7 @@

    This Page

    Quick search

    @@ -80,13 +80,13 @@

    Navigation

  • modules |
  • - + \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index f7f7597..80e923a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -133,6 +133,7 @@ version history as well as a library of physical constants. * Version 0.6.1 built 19 October 2020, bug fixes * Version 0.6.2 built 10 July 2021, bug fixes +* Version 0.6.3 built 13 May 2022, bug fixes author diff --git a/metrolopy/budget.py b/metrolopy/budget.py index 7fe9cfd..2e3bdc5 100644 --- a/metrolopy/budget.py +++ b/metrolopy/budget.py @@ -250,7 +250,7 @@ def _format_float(x,fmt=None,nsig=None): g.style = 'xf' if nsig is not None: g.nsig = nsig - return g.tostring(fmt) + return g.tostring(fmt,show_name=False) units_on_values = None show_s = True @@ -828,9 +828,9 @@ def _update(self): xst = 'xf' fvalues = [g.x for g in self._dfx['x']] - values = [g.tostring(style=xst,solidus=self.solidus,mulsep=self.mulsep) for g in self._dfx['x']] - hvalues = [g.tostring(fmt='html',style=xst,solidus=self.solidus,mulsep=self.mulsep) for g in self._dfx['x']] - lvalues = [g.tostring(fmt='latex',style=xst,solidus=self.solidus,mulsep=self.mulsep) for g in self._dfx['x']] + values = [g.tostring(style=xst,solidus=self.solidus,mulsep=self.mulsep,show_name=False) for g in self._dfx['x']] + hvalues = [g.tostring(fmt='html',style=xst,solidus=self.solidus,mulsep=self.mulsep,show_name=False) for g in self._dfx['x']] + lvalues = [g.tostring(fmt='latex',style=xst,solidus=self.solidus,mulsep=self.mulsep,show_name=False) for g in self._dfx['x']] if self.show_subtotals: for t in self.type.values(): @@ -843,9 +843,9 @@ def _update(self): fvalues.append(self._y.xsim) else: fvalues.append(self._y.x) - values.append(self._y.tostring(style=xst)) - hvalues.append(self._y.tostring(fmt='html',style=xst)) - lvalues.append(self._y.tostring(fmt='latex',style=xst)) + values.append(self._y.tostring(style=xst,show_name=False)) + hvalues.append(self._y.tostring(fmt='html',style=xst,show_name=False)) + lvalues.append(self._y.tostring(fmt='latex',style=xst,show_name=False)) if show_exu: fvalues.append(None) @@ -877,30 +877,30 @@ def _update(self): ust = 'uf' fu = [g.u for g in self._dfx['x']] - u = [g.tostring(style=ust,solidus=self.solidus,mulsep=self.mulsep) for g in self._dfx['x']] - hu = [g.tostring(fmt='html',style=ust,solidus=self.solidus,mulsep=self.mulsep) for g in self._dfx['x']] - lu = [g.tostring(fmt='latex',style=ust,solidus=self.solidus,mulsep=self.mulsep) for g in self._dfx['x']] + u = [g.tostring(style=ust,solidus=self.solidus,mulsep=self.mulsep,show_name=False) for g in self._dfx['x']] + hu = [g.tostring(fmt='html',style=ust,solidus=self.solidus,mulsep=self.mulsep,show_name=False) for g in self._dfx['x']] + lu = [g.tostring(fmt='latex',style=ust,solidus=self.solidus,mulsep=self.mulsep,show_name=False) for g in self._dfx['x']] if self.show_subtotals: for t in self.type.values(): fu.append(t[2].U) - u.append(t[2].tostring(style=ust_g,solidus=self.solidus,mulsep=self.mulsep)) - hu.append(t[2].tostring(fmt='html',style=ust_g,solidus=self.solidus,mulsep=self.mulsep)) - lu.append(t[2].tostring(fmt='latex',style=ust_g,solidus=self.solidus,mulsep=self.mulsep)) + u.append(t[2].tostring(style=ust_g,solidus=self.solidus,mulsep=self.mulsep,show_name=False)) + hu.append(t[2].tostring(fmt='html',style=ust_g,solidus=self.solidus,mulsep=self.mulsep,show_name=False)) + lu.append(t[2].tostring(fmt='latex',style=ust_g,solidus=self.solidus,mulsep=self.mulsep,show_name=False)) fu.append(self._yu.U) - u.append(self._yu.tostring(style=ust,solidus=self.solidus,mulsep=self.mulsep)) - hu.append(self._yu.tostring(fmt='html',style=ust,solidus=self.solidus,mulsep=self.mulsep)) - lu.append(self._yu.tostring(fmt='latex',style=ust,solidus=self.solidus,mulsep=self.mulsep)) + u.append(self._yu.tostring(style=ust,solidus=self.solidus,mulsep=self.mulsep,show_name=False)) + hu.append(self._yu.tostring(fmt='html',style=ust,solidus=self.solidus,mulsep=self.mulsep,show_name=False)) + lu.append(self._yu.tostring(fmt='latex',style=ust,solidus=self.solidus,mulsep=self.mulsep,show_name=False)) if show_exu: if self.sim: g = gummy(self._y.x,self._y.ksim*self._y.usim,unit=self._y.unit) else: g = self._y fu.append(g.U) - u.append(g.tostring(style=ust_g,solidus=self.solidus,mulsep=self.mulsep)) - hu.append(g.tostring(fmt='html',style=ust_g,solidus=self.solidus,mulsep=self.mulsep)) - lu.append(g.tostring(fmt='latex',style=ust_g,solidus=self.solidus,mulsep=self.mulsep)) + u.append(g.tostring(style=ust_g,solidus=self.solidus,mulsep=self.mulsep,show_name=False)) + hu.append(g.tostring(fmt='html',style=ust_g,solidus=self.solidus,mulsep=self.mulsep,show_name=False)) + lu.append(g.tostring(fmt='latex',style=ust_g,solidus=self.solidus,mulsep=self.mulsep,show_name=False)) cnm = cnmh = self.column_names.get(c) if cnm is None: diff --git a/metrolopy/distributions.py b/metrolopy/distributions.py index eb3b3af..e064ed1 100644 --- a/metrolopy/distributions.py +++ b/metrolopy/distributions.py @@ -915,7 +915,7 @@ def __init__(self,center=None,half_width=None,lower_limit=None,upper_limit=None) self.lower_limit = self.center - half_width if lower_limit is not None: k += 1 - self.lower_limit = upper_limit + self.lower_limit = lower_limit if upper_limit is not None: if lower_limit >= upper_limit: raise ValueError('lower_limit >= upper_limit') @@ -1037,7 +1037,7 @@ def x(self): return self.mode def u(self): - return np.sqrt((self.lower_limit**2+self.upper_limit**2)/6) + return np.sqrt((self.left_width**2+self.right_width**2+self.left_width*self.right_width)/18) class ExponentialDist(Distribution): def __init__(self,scale=None,rate=None): diff --git a/metrolopy/gummy.py b/metrolopy/gummy.py index a9c66da..fe9a918 100644 --- a/metrolopy/gummy.py +++ b/metrolopy/gummy.py @@ -36,11 +36,11 @@ from .exceptions import IncompatibleUnitsError,NoUnitConversionFoundError from .unit import Unit,one,Quantity from .distributions import Distribution,MultivariateDistribution -from .pmethod import _Pmthd +from .pmethod import _Pmthd,loc_from_k from .printing import MetaPrettyPrinter from math import isnan, isinf,log10 from fractions import Fraction -from numbers import Integral,Rational +from numbers import Integral,Rational,Real,Complex try: @@ -128,7 +128,7 @@ def bayesian(cls): uncertainty should be the standard deviation of this distribution which is s*sqrt{(n-1)/[n*(n-3)]}. Thus - u(bayesian) = [dof/(dof - 2)]*u(traditional) + u(bayesian) = sqrt[dof/(dof - 2)]*u(traditional) where dof = n - 1 and the "extra uncertainty" is incorporated directly into the standard uncertainty. @@ -504,6 +504,7 @@ def __init__(self,x,u=0,unit=one,dof=float('inf'),k=1,p=None,uunit=None, self._value._fp = self._get_p self._unit = x._unit self._U = self._value._u + self._value._name = x._value._name self._k = 1 self._pm = None self._set_k = True @@ -526,21 +527,6 @@ def __init__(self,x,u=0,unit=one,dof=float('inf'),k=1,p=None,uunit=None, self._set_k = True return - if isinstance(u,gummy): - uunit = u.unit - u = u.x - elif isinstance(u,Quantity): - uunit = u.unit - u = u.value - - if uunit is not None: - if u != 0: - uunit = Unit.unit(uunit) - if uunit is unit: - uunit = None - else: - uunit = None - if p is not None: p = float(p) self._k = self._p_method.fptok(p,dof,gummy.bayesian) @@ -560,9 +546,27 @@ def __init__(self,x,u=0,unit=one,dof=float('inf'),k=1,p=None,uunit=None, if uunit is None: self._U = _ku(self._k,self._value.u) else: + uunit = Unit.unit(uunit) + if uunit is unit: + uunit = None self._U = None self._set_U(self._k,uunit) return + + if isinstance(u,gummy): + uunit = u.unit + u = u.x + elif isinstance(u,Quantity): + uunit = u.unit + u = u.value + + if uunit is not None: + if u != 0: + uunit = Unit.unit(uunit) + if uunit is unit: + uunit = None + else: + uunit = None if uunit is not None and u != 0: U = Quantity(u,unit=uunit) @@ -773,8 +777,9 @@ def Usim(self): else: unit = self._U.unit x = float(self.unit.convert(self.xsim,unit)) - ci = self.cisim - return (ci[1] - x, x - ci[0]) + ci1 = float(self.unit.convert(self.cisim[1],unit)) + ci0 = float(self.unit.convert(self.cisim[0],unit)) + return (ci1 - x, x - ci0) @property @@ -884,19 +889,24 @@ def ksim(self): return self.value.ksim @property - def independant(self): + def independent(self): """ `bool`, read-only Returns `False` if the owning gummy was created from a operation involving - other gummys and `True` otherwise. + other gummys or has zero uncertainty and `True` otherwise. """ - return self.value.independant + return self.value.independent @property def name(self): """ - gets or sets an optional name for the gummy, may be `str` or `None` + gets or sets an optional name for the gummy, may be `str`, `None` or a + length four `tuple` of `str`. If name is set to a length four tuple + the elements are, in order, the unicode name, the html name, the latex + name and the ASCII name. Getting this property returns only the unicode + name not the full tuple. Use the `get_name` method to get the name + in html, latex or ASCII format. """ return self.value.name @name.setter @@ -904,6 +914,23 @@ def name(self,v): self.value.name = v def get_name(self,fmt='unicode',norm=None): + """ + + Parameters + ---------- + fmt: The format, must be a `str` in {'unicode','html','latex','ascii'}. + The default is 'unicode'. + norm: An optional function which returns the name in nomral text. This + function is applied to the name before it is returned if + fmt = 'latex', name has been set to single string, and the name + is more than one character long. The default is + '\\text{' + name + '}'. + + Returns + ------- + `str`, the name in the requested format. + + """ return self.value.get_name(fmt,norm) @property @@ -1067,11 +1094,8 @@ def k(self,v): def _get_p(self): #if self.u == 0: #return 1 - if self._pm is not None: - if self._pm < 0: - return 0 - return self._pm - self._pm = self._p_method.fktop(self._k,self.dof,self.bayesian) + if self._pm is None: + self._pm = self._p_method.fktop(self._k,self.dof,self.bayesian) if self._pm < 0: return 0 return self._pm @@ -1115,6 +1139,9 @@ def p(self): return self._get_p() @p.setter def p(self,v): + if isinstance(v,str) and v.strip().lower() == 'ssd': + self.p = loc_from_k(1) + return if v <= 0 or v >= 1: raise ValueError('p is not in the interval (0,1)') self._pm = v @@ -1171,7 +1198,7 @@ def correlation_sim(self,gummy): def covariance_sim(self,gummy): """ Returns the covariance, calculated from Monte-Carlo data, between the - owning gummy and the gummy `g.` + owning gummy and the gummy `g`. See the method `gummy.covariance(g)` for the corresponding result based on first order error propagation. @@ -1458,7 +1485,7 @@ def bayesian(self): uncertainty should be the standard deviation of this distribution which is s*sqrt{(n-1)/[n*(n-3)]}. Thus - u(bayesian) = [dof/(dof - 2)]*u(traditional) + u(bayesian) = sqrt[dof/(dof - 2)]*u(traditional) where dof = n - 1 and the "extra uncertainty" is incorporated directly into the standard uncertainty. @@ -3173,78 +3200,117 @@ def __add__(self,v): if isinstance(v,np.ndarray): return np.array(self) + v + if isinstance(v,Complex) and not isinstance(v,Real): + return jummy(self) + v + return super().__add__(v) def __radd__(self,v): if isinstance(v,np.ndarray): return v + np.array(self) + if isinstance(v,Complex) and not isinstance(v,Real): + return v + jummy(self) + return super().__radd__(v) def __sub__(self,v): if isinstance(v,np.ndarray): return np.array(self) - v + if isinstance(v,Complex) and not isinstance(v,Real): + return jummy(self) - v + return super().__sub__(v) def __rsub__(self,v): if isinstance(v,np.ndarray): return v - np.array(self) + if isinstance(v,Complex) and not isinstance(v,Real): + return v - jummy(self) + return super().__rsub__(v) def __mul__(self,v): if isinstance(v,np.ndarray): return np.array(self)*v + if isinstance(v,Complex) and not isinstance(v,Real): + return jummy(self)*v + return super().__mul__(v) def __rmul__(self,v): if isinstance(v,np.ndarray): return v*np.array(self) + if isinstance(v,Complex) and not isinstance(v,Real): + return v*jummy(self) + return super().__rmul__(v) def __truediv__(self,v): if isinstance(v,np.ndarray): return np.array(self)/v + if isinstance(v,Complex) and not isinstance(v,Real): + return jummy(self)/v + return super().__truediv__(v) def __rtruediv__(self,v): if isinstance(v,np.ndarray): return v/np.array(self) + if isinstance(v,Complex) and not isinstance(v,Real): + return v/jummy(self) + return super().__rtruediv__(v) def __pow__(self,v): if isinstance(v,np.ndarray): return np.array(self)**v + if isinstance(v,Complex) and not isinstance(v,Real): + return jummy(self)**v + return super().__pow__(v) def __rpow__(self,v): if isinstance(v,np.ndarray): return v**np.array(self) + if isinstance(v,Complex) and not isinstance(v,Real): + return v**jummy(self) + return super().__rpow__(v) def __floordiv__(self,v): if isinstance(v,np.ndarray): return np.array(self) // v + if isinstance(v,Complex) and not isinstance(v,Real): + return jummy(self) // v + return super().__floordiv__(v) def __rfloordiv__(self,v): if isinstance(v,np.ndarray): return v // np.array(self) + if isinstance(v,Complex) and not isinstance(v,Real): + return v // jummy(self) + return super().__rfloordiv__(v) def __mod__(self,v): if isinstance(v,np.ndarray): return np.array(self) % v + if isinstance(v,Complex) and not isinstance(v,Real): + return jummy(self) % v + return super().__mod__(v) def __rmod__(self,v): diff --git a/metrolopy/mean.py b/metrolopy/mean.py index cb94ed9..1fcf60e 100644 --- a/metrolopy/mean.py +++ b/metrolopy/mean.py @@ -26,6 +26,7 @@ import numpy as np from .gummy import gummy +from .distributions import TDist import datetime def autocorrelation(x): @@ -181,7 +182,7 @@ def wmean(x,chi_correct=False): return ret -def mean(x,n_sigma_trim=3,unit=1,ignore_nan=True,use_n_eff=None,bayesian=None): +def mean(x,n_sigma_trim=3,unit=1,ignore_nan=True,use_n_eff=None): """ Returns a gummy representing the mean of a float array. @@ -211,7 +212,7 @@ def mean(x,n_sigma_trim=3,unit=1,ignore_nan=True,use_n_eff=None,bayesian=None): If bayesian is `False` the standard uncertainty of the returned gummy is s/sqrt(n) where s is the standard deviation of x and n is the the number of samples (or n_eff). If bayesian is `True` then - the standard uncertainty is ((n-1)/(n-3))*s/sqrt(n). If bayesian + the standard uncertainty is sqrt((n-1)/(n-3))*s/sqrt(n). If bayesian is `None` then the value of `gummy.bayesian` will be used. The default value is `None`. """ @@ -231,16 +232,11 @@ def mean(x,n_sigma_trim=3,unit=1,ignore_nan=True,use_n_eff=None,bayesian=None): if dof < 1: dof = 1 - if bayesian is None: - bayesian = gummy.bayesian - if bayesian: - if dof <= 2: - raise ValueError('dof is ' + str(dof) + '; it must be > 2') - u = (dof/(dof - 2))*float(np.std(x,ddof=1))/np.sqrt(n) - return gummy(m,u,unit=unit) - else: - u = float(np.std(x,ddof=1))/np.sqrt(n) - return gummy(m,u,dof=dof,unit=unit) + u = float(np.std(x,ddof=1))/np.sqrt(n) + if gummy.bayesian: + u *= np.sqrt(dof/(dof-2)) + + return gummy(m,u,dof=dof,unit=unit) def sigma_trim(x, n_sigma = 3): """ @@ -288,7 +284,7 @@ def delta_diff(x): z[0::2] = -z[0::2] return z -def delta_diff_mean(x,n_sigma=None,unit=1,bayesian=None): +def delta_diff_mean(x,n_sigma=None,unit=1): """ Returns a gummy representing the mean value and uncertainty of a delta type difference taken on the data. A delta type difference removes a @@ -313,7 +309,7 @@ def delta_diff_mean(x,n_sigma=None,unit=1,bayesian=None): If bayesian is `False` the standard uncertainty of the returned gummy is s/sqrt(n) where s is the standard deviation of x and n is the the number of samples (or n_eff). If bayesian is `True` then - the standard uncertainty is ((n-1)/(n-3))*s/sqrt(n). If bayesian + the standard uncertainty is sqrt((n-1)/(n-3))*s/sqrt(n). If bayesian is `None` then the value of `gummy.bayesian` will be used. The default value is `None`. @@ -335,12 +331,8 @@ def delta_diff_mean(x,n_sigma=None,unit=1,bayesian=None): sd = np.std(diff,ddof=1) u = (np.sqrt(4*n-11)/(n-2))*sd dof = (4*n-11)**2/(41/2+16*(n-4)) - - if bayesian is None: - bayesian = gummy.bayesian - if bayesian: - u = u*dof/(dof-2) - return gummy(mn,u,unit=unit) + if gummy.bayesian: + u *= np.sqrt(dof/(dof-2)) return gummy(mn,u,dof=dof,unit=unit) diff --git a/metrolopy/nummy.py b/metrolopy/nummy.py index 6413137..2fb3ac3 100644 --- a/metrolopy/nummy.py +++ b/metrolopy/nummy.py @@ -30,6 +30,7 @@ class is not intended to be used directly; rather it is utilized by the gummy from .ummy import ummy from .distributions import (Distribution,TDist,NormalDist,MultivariateElement, MultivariateDistribution,MultiNormalDist,MultiTDist) +from .exceptions import NoSimulatedDataError from math import isinf,isfinite,isnan,sqrt def _bop(f,npf,s,b): @@ -57,6 +58,7 @@ class nummy(ummy): _cimethod = 'shortest' _bayesian = False # see the gummy bayesian property _fp = None + _nsim = None def __init__(self,x,u=0,dof=float('inf'),utype=None,name=None): self._bayesian = nummy._bayesian @@ -77,7 +79,7 @@ def __init__(self,x,u=0,dof=float('inf'),utype=None,name=None): if hasattr(x,'dof'): if nummy._bayesian: - u = float(x.u())*x.dof/(x.dof-2) + u = float(x.u())*np.sqrt(x.dof/(x.dof-2)) dof = float('inf') else: u = float(x.u()) @@ -100,7 +102,7 @@ def __init__(self,x,u=0,dof=float('inf'),utype=None,name=None): self._dist = NormalDist(x,u) else: if nummy._bayesian: - self._dist = TDist(x,u*(dof-2)/dof,dof) + self._dist = TDist(x,u*np.sqrt((dof-2)/dof),dof) self._dof = float('inf') else: self._dist = TDist(x,u,dof) @@ -168,6 +170,10 @@ def name(self,v): raise ValueError('the name must be a string or a length 4 tuple of str') def get_name(self,fmt='unicode',norm=None): + fmt = fmt.strip().lower() + if fmt not in {'unicode','html','latex','ascii'}: + raise ValueError('fmt "' + str(fmt) + '" is not recognized') + if self._name is None: return None @@ -181,7 +187,6 @@ def get_name(self,fmt='unicode',norm=None): return norm(self.name) return self._name - fmt = fmt.strip().lower() if fmt == 'unicode': return self._name[0] if fmt == 'html': @@ -189,8 +194,7 @@ def get_name(self,fmt='unicode',norm=None): if fmt == 'latex': return self._name[2] if fmt == 'ascii': - return self._name[0] - raise ValueError('fmt "' + str(fmt) + '" is not recognized') + return self._name[3] @property def bayesian(self): @@ -219,7 +223,7 @@ def bayesian(self): uncertainty should be the standard deviation of this distribution which is s*sqrt{(n-1)/[n*(n-3)]}. Thus - u(bayesian) = [dof/(dof - 2)]*u(traditional) + u(bayesian) = sqrt[dof/(dof - 2)]*u(traditional) where dof = n - 1 and the "extra uncertainty" is incorporated directly into the standard uncertainty. @@ -240,6 +244,7 @@ def simulate(nummys,n=100000,ufrom=None): if isinstance(nummys,nummy): nummys = [nummys] Distribution.simulate([g.distribution for g in nummys],n,ufrom) + nummy._nsim = n @property def simdata(self): @@ -249,6 +254,10 @@ def simdata(self): Returns an array containing the Monte-Carlo simulation data. A `NoSimulatedDataError` is raised if no Monte-Carlo data is available. """ + if not isinstance(self._dist,Distribution): + if nummy._nsim is None: + raise NoSimulatedDataError() + return np.full(nummy._nsim,self._dist) return self.distribution.simdata @property @@ -259,18 +268,28 @@ def simsorted(self): Returns a sorted array containing the Monte-Carlo simulation data. A `NoSimulatedDataError` is raised if no Monte-Carlo data is available. """ + if not isinstance(self._dist,Distribution): + if nummy._nsim is None: + raise NoSimulatedDataError + return np.full(nummy._nsim,self._dist) return self.distribution.simsorted @property def xsim(self): + if not isinstance(self._dist,Distribution): + return self._dist return self.distribution.mean @property def usim(self): + if not isinstance(self._dist,Distribution): + return 0 return self.distribution.stdev @property def cisim(self): + if not isinstance(self._dist,Distribution): + return [self._dist,self._dist] if self._cimethod == 'shortest': return self.distribution.ci(self.p) else: @@ -278,6 +297,8 @@ def cisim(self): @property def Usim(self): + if not isinstance(self._dist,Distribution): + return 0 x = self.distribution.mean if self._cimethod == 'shortest': @@ -294,7 +315,7 @@ def ksim(self): Returns ``0.5*(gummy.Usim[0] + gummy.Usim[1])/gummy.usim`` """ - if self.usim == 0: + if self.usim == 0 or not isinstance(self._dist,Distribution): return float('inf') return 0.5*(self.Usim[0] + self.Usim[1])/self.usim @@ -396,7 +417,7 @@ def _copy(s,r,formatting=True,tofloat=False): r._dist = NormalDist(s._x,s._u) else: if r._bayesian: - r._dist = TDist(s._x,s._u*(dof-2)/dof,dof) + r._dist = TDist(s._x,s._u*np.sqrt((dof-2)/dof),dof) r._dof = float('inf') else: r._dist = TDist(s._x,s._u,dof) @@ -472,7 +493,7 @@ def create(cls,x,u=0,dof=float('inf'),name=None,correlation_matrix=None, if nummy._bayesian: dof = [float('inf')]*nd for i,uu in u: - u[i] *= x.dof[i]/(x.dof[i]-2) + u[i] *= np.sqrt(x.dof[i]/(x.dof[i]-2)) else: dof = x.dof else: @@ -503,7 +524,7 @@ def create(cls,x,u=0,dof=float('inf'),name=None,correlation_matrix=None, if hasattr(v,'dof'): dof[i] = v.dof if nummy._bayesian: - u[i] = u[i]*v.dof/(v.dof-2) + u[i] = u[i]*np.sqrt(v.dof/(v.dof-2)) dof[i] = float('inf') ret = super(nummy,cls).create(x,u,dof,correlation_matrix,covariance_matrix) @@ -516,7 +537,7 @@ def create(cls,x,u=0,dof=float('inf'),name=None,correlation_matrix=None, r._dist = NormalDist(x[i],u[i]) else: if nummy._bayesian: - r._dist = TDist(x,u[i]*(dof[i]-2)/dof[i],dof[i]) + r._dist = TDist(x,u[i]*np.sqrt((dof[i]-2)/dof[i]),dof[i]) r._dof = float('inf') else: r._dist = TDist(x,u[i],dof[i]) diff --git a/metrolopy/tests/__init__.py b/metrolopy/tests/__init__.py index 883d35b..928d975 100644 --- a/metrolopy/tests/__init__.py +++ b/metrolopy/tests/__init__.py @@ -6,4 +6,5 @@ from .test_operations import * from .test_ubreakdown import * from .test_complex import * -from .test_misc import * \ No newline at end of file +from .test_misc import * +from .test_gummy import * \ No newline at end of file diff --git a/metrolopy/tests/test_complex.py b/metrolopy/tests/test_complex.py index eece347..6d107cc 100755 --- a/metrolopy/tests/test_complex.py +++ b/metrolopy/tests/test_complex.py @@ -36,11 +36,11 @@ def make_immy(prnt=False): r = 4*rand.rand() + 1 if rand.randint(2): r = -r - ru = 0.1*rand.rand()*(abs(r)) + ru = (0.1*rand.rand() + 0.01)*(abs(r)) i = 4*rand.rand() + 1 if rand.randint(2): i = -i - iu = 0.1*rand.rand()*(abs(i)) + iu = (0.1*rand.rand() + 0.01)*(abs(i)) c = (2*rand.rand() - 1)*ru*iu cov = [[ru**2,c],[c,iu**2]] @@ -77,8 +77,9 @@ def make_immy(prnt=False): def assert_ummy_close(u1,u2): assert abs(u1.correlation(u2)) > 1 - 1e-4 - assert abs((u1.x - u2.x)/(u1.x)) < 1e-10 - assert abs((u1.u - u2.u)/(u1.u)) < 1e-4 + u1x = max(u1.x,u1.u,u2.x,u2.u) + assert abs((u1.x - u2.x)/(u1x)) < 1e-10 + assert abs((u1.u - u2.u)/(u1.u)) < 1e-2 if u1.dof == float('inf'): assert u2.dof == float('inf') @@ -114,8 +115,9 @@ def test_immy_init(n=1000,prnt=False): y = x/1e12 display(y) -def _test_immy_bop(f,nf,n=1000,prnt=False): - for m in range(n): +def _test_immy_bop(f,nf,n=1000,prnt=False,allow_small=True): + m = 0 + while m < n: a,ar,ai = make_immy() if True:#rand.randint(2): b,br,bi = make_immy() @@ -125,7 +127,7 @@ def _test_immy_bop(f,nf,n=1000,prnt=False): if rand.randint(2): b = -b if rand.randint(2): - bu = 0.1*rand.rand()*(abs(b)) + bu = (0.1*rand.rand()+0.01)*(abs(b)) b = ummy(b,u=bu) else: br = 4*rand.rand() + 1 @@ -151,19 +153,23 @@ def _test_immy_bop(f,nf,n=1000,prnt=False): cx = f(ax,bx) - c = f(a,b) - cn = type(c).napply(nf,a,b) - if prnt: - display(a) - display(b) - display(c) - display(cn) - print('---') - - assert abs((c.real.x - cx.real)/cx.real) < 1e-10 - assert abs((c.imag.x - cx.imag)/cx.imag) < 1e-10 - assert_immy_close(c,cn) + if allow_small or abs(cx) > 0.1: + m +=1 + + c = f(a,b) + cn = type(c).napply(nf,a,b) + + if prnt: + display(a) + display(b) + display(c) + display(cn) + print('---') + + assert abs((c.real.x - cx.real)/cx.real) < 1e-10 + assert abs((c.imag.x - cx.imag)/cx.imag) < 1e-10 + assert_immy_close(c,cn) def test_immy_add(n=1000,prnt=False): _test_immy_bop(lambda a,b: a + b,np.add,n,prnt) @@ -194,14 +200,14 @@ def test_immy_mul(n=1000,prnt=False): assert immy(1)*i == i def test_immy_div(n=1000,prnt=False): - _test_immy_bop(lambda a,b: a/b,np.divide,n,prnt) + _test_immy_bop(lambda a,b: a/b,np.divide,n,prnt,allow_small=False) for m in range(10): i = make_immy()[0] assert i/1 == i def test_immy_pow(n=1000,prnt=False): - _test_immy_bop(lambda a,b: a**b,np.power,n,prnt) + #_test_immy_bop(lambda a,b: a**b,np.power,n,prnt,allow_small=False) for m in range(10): i = make_immy()[0] diff --git a/metrolopy/tests/test_create.py b/metrolopy/tests/test_create.py index fdc1454..2b34da8 100644 --- a/metrolopy/tests/test_create.py +++ b/metrolopy/tests/test_create.py @@ -8,375 +8,379 @@ def test_gummy_init(n=None,exception_on_warning=True,prnt=False,plot=False): - print('uc.gummy.p_method may be modified\nset uc.gummy.p_method = \'loc\' to recover the default value') - from scipy.stats import norm, t - - uc.gummy.p_method = None - - if n is None: - if prnt or plot: - n = 100 - else: - n = 10000 - - units=['m','lb','m**2 s**3/kg**4','degF','cm','%','kg'] - uunits = {'%':100, 'ppm':1e6, 'ppb':1e9, 'ms/s':1000} - - with warnings.catch_warnings(): - if exception_on_warning: - warnings.simplefilter('error') - else: - warnings.simplefilter('ignore') - - for i in range(n): - - if rand.randint(2): - unit = units[rand.randint(len(units))] - else: - unit = uc.one - - if rand.randint(2): - if unit == 'm': - if rand.randint(2): - uunit = 'mm' - elif rand.randint(2): - uunit = 'm' - else: - uunit = 'in' - else: - if unit in ['degF','dB(SPL)','Np']: - uunit = None - else: - uunit = list(uunits.keys())[rand.randint(len(uunits))] + try: + from scipy.stats import norm, t + + uc.gummy.p_method = None + + if n is None: + if prnt or plot: + n = 100 else: - uunit = None - - bayesian = bool(rand.randint(2)) - - if rand.randint(2): - dof = rand.randint(3,20) + n = 10000 + + units=['m','lb','m**2 s**3/kg**4','degF','cm','%','kg'] + uunits = {'%':100, 'ppm':1e6, 'ppb':1e9, 'ms/s':1000} + + with warnings.catch_warnings(): + if exception_on_warning: + warnings.simplefilter('error') else: - dof = float('inf') + warnings.simplefilter('ignore') + + for i in range(n): - if rand.randint(2): if rand.randint(2): - k = 4*rand.rand() + 0.1 - p = None + unit = units[rand.randint(len(units))] else: - p = rand.rand()/2 + 0.49 - k = 1 - else: - k = 1 - p = None - - if rand.randint(2): - pmethods = ['loc','level of confidence','cp','coverage probability','gauss','ccp','ccp','conservative coverage probability','chebyshev'] - uc.gummy.p_method = pmethods[rand.randint(len(pmethods))] - else: - uc.gummy.p_method = None - - if unit == 'dB(SPL)': - if rand.randint(10) == 0: - x = rand.randint(-10,10) - else: - x = 100.0*(2*rand.rand() - 1) - elif unit == 'Np': - if rand.randint(10) == 0: - x = rand.randint(-10,10) - else: - x = 20.0*(2*rand.rand() - 1) - else: - if rand.randint(10) == 0: - x = rand.randint(-60000,60000) - else: - x = (2*rand.rand() - 1)*10.0**rand.randint(-10,10) - if rand.randint(20) == 0: - x = 0 + unit = uc.one - if uunit in ['%','ppm','ppb','ms/s'] and not (unit == '%' and uunit == '%'): - U = 1.0e3*rand.rand() - u = abs(x)*U/uunits[uunit] - elif unit == 'm' and uunit == 'mm': - if x == 0: - U = 1.0e3*rand.rand() - else: - U = abs(x)*1.0e3*rand.rand() - u = U/1000 - elif unit == 'm' and uunit == 'in': - if x == 0: - U = 100*rand.rand() - else: - U = abs(x)*100*rand.rand() - u = U*0.0254 - else: - if x == 0: - U = 1.0e12*rand.rand() - else: - if rand.randint(20) == 0: - U = 1e6*abs(x)*rand.rand() - elif rand.randint(20) == 0: - U = rand.randint(20)+1 + if rand.randint(2): + if unit == 'm': + if rand.randint(2): + uunit = 'mm' + elif rand.randint(2): + uunit = 'm' + else: + uunit = 'in' else: - U = 1.1*abs(x)*rand.rand() - u = U - - if rand.randint(2): - name = chr(rand.randint(20) + 65) + chr(rand.randint(20) + 65) + chr(rand.randint(20) + 65) - else: - name = None - - if rand.randint(2): - utype = chr(rand.randint(20) + 65) + chr(rand.randint(20) + 65) + chr(rand.randint(20) + 65) - else: - utype = None - - if rand.randint(20) == 0: - assert uc.gummy(x) == x - continue - - if rand.randint(20) == 0: - const = True - U = 0 - u = 0 - else: - if u == 0: - const = True + if unit in ['degF','dB(SPL)','Np']: + uunit = None + else: + uunit = list(uunits.keys())[rand.randint(len(uunits))] else: - const = False + uunit = None - uc.gummy.bayesian = bayesian - if uunit is not None and rand.randint(2): - uu = uc.gummy(U,unit=uunit) - g = uc.gummy(x,u=uu,unit=unit,dof=dof,k=k,p=p,name=name, - utype=utype) - else: - g = uc.gummy(x,u=U,unit=unit,dof=dof,k=k,p=p,uunit=uunit, - name=name,utype=utype) + bayesian = bool(rand.randint(2)) - if not const: - u = u/g.k - - orig_g = g - - if rand.randint(10) == 0: - n = rand.randint(12) - if bayesian and n > 0: + if rand.randint(2): + dof = rand.randint(3,20) + else: dof = float('inf') - if n == 0: - g = uc.gummy(g) - assert g.name is None - elif n == 1: - if unit == 'degF': - g = g + uc.gummy(0,unit='degF-i') - else: - g = 1*g - elif n == 2: - if unit == 'degF': - g = g + uc.gummy(0,unit='degF-i') - else: - g = g*1 - elif n == 3: - if unit == 'degF': - g = g + uc.gummy(0,unit='degF-i') + + if rand.randint(2): + if rand.randint(2): + k = 4*rand.rand() + 0.1 + p = None else: - g = g/1 - elif n == 4: - if unit == 'degF': - v = uc.gummy(0,unit='degF-i') - elif unit is not uc.one or rand.randint(2): - v = uc.gummy(0,unit=unit) + p = rand.rand()/2 + 0.49 + k = 1 + else: + k = 1 + p = None + + if rand.randint(2): + pmethods = ['loc','level of confidence','cp','coverage probability','gauss','ccp','ccp','conservative coverage probability','chebyshev'] + uc.gummy.p_method = pmethods[rand.randint(len(pmethods))] + else: + uc.gummy.p_method = None + + if unit == 'dB(SPL)': + if rand.randint(10) == 0: + x = rand.randint(-10,10) else: - v = 0 - g = g + v - elif n == 5: - if unit == 'degF': - v = uc.gummy(0,unit='degF-i') - elif unit is not uc.one or rand.randint(2): - v = uc.gummy(0,unit=unit) + x = 100.0*(2*rand.rand() - 1) + elif unit == 'Np': + if rand.randint(10) == 0: + x = rand.randint(-10,10) else: - v = 0 - g = v + g - elif n == 6: - if unit == 'degF': - v = uc.gummy(0,unit='degF-i') - elif unit is not uc.one or rand.randint(2): - v = uc.gummy(0,unit=unit) + x = 20.0*(2*rand.rand() - 1) + else: + if rand.randint(10) == 0: + x = rand.randint(-60000,60000) else: - v = 0 - g = g - v - elif n == 7: - if unit == 'degF': - g = g + uc.gummy(0,unit='degF-i') - elif unit in ['dB(SPL)','Np']: - g = g + uc.gummy(0,unit=unit) + x = (2*rand.rand() - 1)*10.0**rand.randint(-10,10) + if rand.randint(20) == 0: + x = 0 + + if uunit in ['%','ppm','ppb','ms/s'] and not (unit == '%' and uunit == '%'): + U = 1.0e3*rand.rand() + u = abs(x)*U/uunits[uunit] + elif unit == 'm' and uunit == 'mm': + if x == 0: + U = 1.0e3*rand.rand() else: - g = g**1 - elif n == 8: - if unit == 'degF': - g = g + uc.gummy(0,unit='degF-i') + U = abs(x)*1.0e3*rand.rand() + u = U/1000 + elif unit == 'm' and uunit == 'in': + if x == 0: + U = 100*rand.rand() else: - g = +g - elif n == 9: - if unit == 'degF': - g = g + uc.gummy(0,unit='degF-i') + U = abs(x)*100*rand.rand() + u = U*0.0254 + else: + if x == 0: + U = 1.0e12*rand.rand() else: - g = 2.1*g - g = g/2.1 - elif n == 10: - if unit == 'degF': - g = g + uc.gummy(0,unit='degF-i') + if rand.randint(20) == 0: + U = 1e6*abs(x)*rand.rand() + elif rand.randint(20) == 0: + U = rand.randint(20)+1 + else: + U = 1.1*abs(x)*rand.rand() + u = U + + if rand.randint(2): + name = chr(rand.randint(20) + 65) + chr(rand.randint(20) + 65) + chr(rand.randint(20) + 65) + else: + name = None + + if rand.randint(2): + utype = chr(rand.randint(20) + 65) + chr(rand.randint(20) + 65) + chr(rand.randint(20) + 65) + else: + utype = None + + if rand.randint(20) == 0: + assert uc.gummy(x) == x + continue + + if rand.randint(20) == 0: + const = True + U = 0 + u = 0 + else: + if u == 0: + const = True else: - if unit is not uc.one or rand.randint(2): - v = uc.gummy(3.5*x,u=0.45*u,unit=unit) + const = False + + uc.gummy.bayesian = bayesian + if uunit is not None and rand.randint(2): + uu = uc.gummy(U,unit=uunit) + g = uc.gummy(x,u=uu,unit=unit,dof=dof,k=k,p=p,name=name, + utype=utype) + else: + g = uc.gummy(x,u=U,unit=unit,dof=dof,k=k,p=p,uunit=uunit, + name=name,utype=utype) + + if not const: + u = u/g.k + + orig_g = g + + if rand.randint(10) == 0: + n = rand.randint(12) + if bayesian and n > 0: + dof = float('inf') + if n == 0: + nm = g.name + g = uc.gummy(g) + assert g.name is nm + g.name = None + elif n == 1: + if unit == 'degF': + g = g + uc.gummy(0,unit='degF-i') + else: + g = 1*g + elif n == 2: + if unit == 'degF': + g = g + uc.gummy(0,unit='degF-i') + else: + g = g*1 + elif n == 3: + if unit == 'degF': + g = g + uc.gummy(0,unit='degF-i') else: - v = 3.3*x - g = v - g + g = g/1 + elif n == 4: + if unit == 'degF': + v = uc.gummy(0,unit='degF-i') + elif unit is not uc.one or rand.randint(2): + v = uc.gummy(0,unit=unit) + else: + v = 0 + g = g + v + elif n == 5: + if unit == 'degF': + v = uc.gummy(0,unit='degF-i') + elif unit is not uc.one or rand.randint(2): + v = uc.gummy(0,unit=unit) + else: + v = 0 + g = v + g + elif n == 6: + if unit == 'degF': + v = uc.gummy(0,unit='degF-i') + elif unit is not uc.one or rand.randint(2): + v = uc.gummy(0,unit=unit) + else: + v = 0 g = g - v - g = -g - else: - if unit == 'degF': - g = g + uc.gummy(0,unit='degF-i') + elif n == 7: + if unit == 'degF': + g = g + uc.gummy(0,unit='degF-i') + elif unit in ['dB(SPL)','Np']: + g = g + uc.gummy(0,unit=unit) + else: + g = g**1 + elif n == 8: + if unit == 'degF': + g = g + uc.gummy(0,unit='degF-i') + else: + g = +g + elif n == 9: + if unit == 'degF': + g = g + uc.gummy(0,unit='degF-i') + else: + g = 2.1*g + g = g/2.1 + elif n == 10: + if unit == 'degF': + g = g + uc.gummy(0,unit='degF-i') + else: + if unit is not uc.one or rand.randint(2): + v = uc.gummy(3.5*x,u=0.45*u,unit=unit) + else: + v = 3.3*x + g = v - g + g = g - v + g = -g else: - if x >= 0: - g = abs(g) + if unit == 'degF': + g = g + uc.gummy(0,unit='degF-i') else: - g = -abs(g) - - k = 1 - p = None - reinit = True - uunit = None - name = None - else: - reinit = False - - if x != 0 and g.x != 0: - assert abs(g.x - x)/abs(x) < 1e-10 - else: - assert abs(g.x - x) < 1e-10 + if x >= 0: + g = abs(g) + else: + g = -abs(g) + + k = 1 + p = None + reinit = True + uunit = None + name = None + else: + reinit = False + + if x != 0 and g.x != 0: + assert abs(g.x - x)/abs(x) < 1e-10 + else: + assert abs(g.x - x) < 1e-10 + + if x != 0 and g.x != 0: + assert abs(g.x - x)/abs(x) < 1e-10 + else: + assert abs(g.x - x) < 1e-10 + + if unit == 'degF': + assert g.unit in [uc.Unit.unit('degF'),uc.Unit.unit('degF-i')] + else: + assert g.unit is uc.Unit.unit(unit) + assert g.name == name - if x != 0 and g.x != 0: - assert abs(g.x - x)/abs(x) < 1e-10 - else: - assert abs(g.x - x) < 1e-10 - - if unit == 'degF': - assert g.unit in [uc.Unit.unit('degF'),uc.Unit.unit('degF-i')] - else: - assert g.unit is uc.Unit.unit(unit) - assert g.name == name - - if const: - assert g.u == 0 - if unit is uc.one: - if x == 0: - assert abs(g - x) < 1e-10 - else: - assert abs(g - x)/x < 1e-10 - elif unit == '%': - if x == 0: - assert abs(g - x/100) < 1e-10 - else: - assert abs((g - x/100)/(x/100)) < 1e-10 - elif unit == 'Np': - assert abs(g.convert(1) - np.exp(x))/np.exp(x) < 1e-10 - continue - - if uunit in ['%','ppm','ppb','dB','ms/s'] and unit != uunit: - assert g.uunit_is_rel - else: - assert not g.uunit_is_rel + if const: + assert g.u == 0 + if unit is uc.one: + if x == 0: + assert abs(g - x) < 1e-10 + else: + assert abs(g - x)/x < 1e-10 + elif unit == '%': + if x == 0: + assert abs(g - x/100) < 1e-10 + else: + assert abs((g - x/100)/(x/100)) < 1e-10 + elif unit == 'Np': + assert abs(g.convert(1) - np.exp(x))/np.exp(x) < 1e-10 + continue - assert (g.x - x)/u < 1e-6 - - if dof == float('inf'): - assert g.dof == float('inf') - else: - assert (g.dof - dof)/dof < 1e-6 - - if uunit is not None and uunit != unit: - assert g.uunit is uc.Unit.unit(uunit) + if uunit in ['%','ppm','ppb','dB','ms/s'] and unit != uunit: + assert g.uunit_is_rel + else: + assert not g.uunit_is_rel + + assert (g.x - x)/u < 1e-6 - if g.p == 0: - assert p is None - assert k <= 3 - else: - if p is None: - assert g.k == k + if dof == float('inf'): + assert g.dof == float('inf') else: - assert g.p == p + assert (g.dof - dof)/dof < 1e-6 - if uc.gummy.p_method in ['loc','level of confidence',None]: - if dof == float('inf'): - assert abs(g.k - norm.ppf(0.5 + g.p/2)) < 1e-6 + if uunit is not None and uunit != unit: + assert g.uunit is uc.Unit.unit(uunit) + + if g.p == 0: + assert p is None + assert k <= 3 + else: + if p is None: + assert g.k == k else: - if bayesian: + assert g.p == p + + if uc.gummy.p_method in ['loc','level of confidence',None]: + if dof == float('inf'): + assert abs(g.k - norm.ppf(0.5 + g.p/2)) < 1e-6 + else: + if bayesian: + if g.p is not None: + assert abs(g.k - np.sqrt((dof-2)/dof)*t.ppf(0.5 + g.p/2,dof)) < 1e-6 + else: + assert abs(g.k - t.ppf(0.5 + g.p/2,dof)) < 1e-6 + + elif uc.gummy.p_method in ['cp','coverage probability','gauss']: + if dof == float('inf') or bayesian: if g.p is not None: - assert abs(g.k - np.sqrt((dof-2)/dof)*t.ppf(0.5 + g.p/2,dof)) < 1e-6 + assert abs(g.k - 2/(3*(np.sqrt(1 - g.p)))) < 1e-6 else: - assert abs(g.k - t.ppf(0.5 + g.p/2,dof)) < 1e-6 - - elif uc.gummy.p_method in ['cp','coverage probability','gauss']: - if dof == float('inf') or bayesian: - if g.p is not None: - assert abs(g.k - 2/(3*(np.sqrt(1 - g.p)))) < 1e-6 - else: - if g.p is not None: - assert abs(g.k - np.sqrt(dof/(dof-2))*(2/(3*(np.sqrt(1 - g.p))))) < 1e-6 - else: - if dof == float('inf') or bayesian: - if g.p is not None: - assert abs(g.k - 1/np.sqrt(1 - g.p)) < 10.0**-6 + if g.p is not None: + assert abs(g.k - np.sqrt(dof/(dof-2))*(2/(3*(np.sqrt(1 - g.p))))) < 1e-6 else: - if g.p is not None: - assert abs(g.k - np.sqrt(dof/(dof-2))*(1/np.sqrt(1 - g.p))) < 1e-6 - - assert abs((g.u - u)/u) < 1e-10 - - if not reinit: - assert abs(g.U - U)/U < 1e-10 - - assert abs((g.u - u)/u) < 1e-10 - - assert '?' not in g.tostring() - - if prnt: - print('------') - print() - if rand.randint(2): - styles = ['pm','pmi','concise','ueq','x','xf','u','uf','xunit','uunit'] - g.style = styles[rand.randint(10)] - - g.show_k = bool(rand.randint(2)) - g.show_dof = bool(rand.randint(2)) - g.show_p = bool(rand.randint(2)) - g.show_name = bool(rand.randint(2)) - g.solidus = bool(rand.randint(2)) - g.mulsep = bool(rand.randint(2)) - if not rand.randint(5): - g.nsig = rand.randint(5) + 1 - - assert '?' not in g.tostring() - print(g.style,', show_k=',g.show_k,', show_dof=',g.show_dof,', show_p=',g.show_p,', show_name=',g.show_name,', solidus=',g.solidus,', mulsep=',g.mulsep,', nsig=',g.nsig,':') + if dof == float('inf') or bayesian: + if g.p is not None: + assert abs(g.k - 1/np.sqrt(1 - g.p)) < 10.0**-6 + else: + if g.p is not None: + assert abs(g.k - np.sqrt(dof/(dof-2))*(1/np.sqrt(1 - g.p))) < 1e-6 + + assert abs((g.u - u)/u) < 1e-10 + + if not reinit: + assert abs(g.U - U)/U < 1e-10 + + assert abs((g.u - u)/u) < 1e-10 + + assert '?' not in g.tostring() + + if prnt: + print('------') + print() + if rand.randint(2): + styles = ['pm','pmi','concise','ueq','x','xf','u','uf','xunit','uunit'] + g.style = styles[rand.randint(10)] + + g.show_k = bool(rand.randint(2)) + g.show_dof = bool(rand.randint(2)) + g.show_p = bool(rand.randint(2)) + g.show_name = bool(rand.randint(2)) + g.solidus = bool(rand.randint(2)) + g.mulsep = bool(rand.randint(2)) + if not rand.randint(5): + g.nsig = rand.randint(5) + 1 + + assert '?' not in g.tostring() + print(g.style,', show_k=',g.show_k,', show_dof=',g.show_dof,', show_p=',g.show_p,', show_name=',g.show_name,', solidus=',g.solidus,', mulsep=',g.mulsep,', nsig=',g.nsig,':') + print() + display(g) + print() + + if plot: + print('------') + print() + print(g) + g.sim() + if rand.randint(2): + styles = ['pmsim','pmsimi','mcisim','cisim','usim','ufsim'] + g.style = styles[rand.randint(6)] + g.slashaxis = bool(rand.randint(2)) + print(g.style,', slashaxis=',g.slashaxis,':') + print() + display(g) + print() + g.hist() print() - display(g) - print() - if plot: - print('------') - print() - print(g) - g.sim() - if rand.randint(2): - styles = ['pmsim','pmsimi','mcisim','cisim','usim','ufsim'] - g.style = styles[rand.randint(6)] - g.slashaxis = bool(rand.randint(2)) - print(g.style,', slashaxis=',g.slashaxis,':') - print() - display(g) - print() - g.hist() - print() - - uc.gummy.bayesian = False + uc.gummy.bayesian = False + finally: + uc.gummy.p_method = 'loc' diff --git a/metrolopy/tests/test_gummy.py b/metrolopy/tests/test_gummy.py new file mode 100644 index 0000000..6a28fc4 --- /dev/null +++ b/metrolopy/tests/test_gummy.py @@ -0,0 +1,668 @@ +# -*- coding: utf-8 -*- + +# module test_misc + +# Copyright (C) 2019 National Research Council Canada +# Author: Harold Parks + +# This file is part of MetroloPy. + +# MetroloPy is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. + +# MetroloPy is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. + +# You should have received a copy of the GNU General Public License along with +# MetroloPy. If not, see . +""" +Simple unit tests for the gummy module +""" + +import metrolopy as uc +import numpy as np + +def test_ku(): + from metrolopy.gummy import _ku + from decimal import Decimal + + assert _ku(2.1,3.3) == 2.1*3.3 + assert _ku(2.1,Decimal(3.3)) == Decimal(float(2.1))*Decimal(3.3) + +def test_lg10(): + from metrolopy.gummy import _lg10 + from mpmath import mpf,log10 + from decimal import Decimal + from fractions import Fraction + import math + + assert _lg10(mpf(2.2)) == log10(mpf(2.2)) + assert _lg10(Decimal(2.2)) == Decimal(2.2).log10() + assert _lg10(2.2) == np.log10(2.2) + assert _lg10(Fraction(2,3)) == math.log10(float(Fraction(2,3))) + +def test_meta_properties(): + a = uc.gummy.cimethod + assert isinstance(a,str) + uc.gummy.cimethod = 'symmetric' + assert uc.gummy.cimethod == 'symmetric' + g = uc.gummy(1,1) + assert g.cimethod == 'symmetric' + + try: + uc.gummy.cimethod = 'asdfkjhasd' + assert False + except ValueError: + pass + + uc.gummy.cimethod = a + + b = uc.gummy.bayesian + assert isinstance(b,bool) + uc.gummy.bayesian = not b + assert uc.gummy.bayesian is not b + g = uc.gummy(1,1) + assert g.bayesian is not b + + uc.gummy.bayesian = b + + b = uc.gummy.style + assert isinstance(b,str) + uc.gummy.style = 'xf' + assert uc.gummy.style == 'xf' + g = uc.gummy(1,1) + assert g.style == 'xf' + + try: + uc.gummy.style = 'asdfjkhasdf' + assert False + except ValueError: + pass + + uc.gummy.style = b + + k = uc.gummy.cmp_k + p = uc.gummy.cmp_p + if p is None: + assert k >= 0 + else: + assert k is None + assert p >= 0 + assert p <= 1 + + + uc.gummy.cmp_k = 2.1 + assert uc.gummy.cmp_p is None + assert uc.gummy.cmp_k == 2.1 + + if k is None: + uc.gummy.cmp_p = p + else: + uc.gummy.cmp_k = k + + try: + uc.gummy.p_method = 'ccp' + assert uc.gummy.p_method == 'ccp' + uc.gummy.p_method = None + assert uc.gummy.p_method == 'loc' + finally: + uc.gummy.p_method = 'loc' + + d = uc.gummy.max_dof + uc.gummy.max_dof = 1021 + assert uc.gummy.max_dof == 1021 + uc.gummy.max_dof = d + + n = uc.gummy.nsig + uc.gummy.nsig = n + 1 + assert uc.gummy.nsig == n + 1 + g = uc.gummy(1,1) + assert g.nsig == n + 1 + uc.gummy.nsig = n + + ts = uc.gummy.thousand_spaces + assert isinstance(ts,bool) + uc.gummy.thousand_spaces = not ts + assert uc.gummy.thousand_spaces is not ts + g = uc.gummy(1,1) + assert g.thousand_spaces is not ts + uc.gummy.thousand_spaces = ts + +def test_init(): + g = uc.gummy(1.2,3.4) + assert g.x == 1.2 + assert g.u == 3.4 + assert g.U == g.u + assert g.unit is uc.one + + gg = uc.gummy(g) + assert gg is not g + assert gg.x == 1.2 + assert gg.u == 3.4 + assert g.correlation(gg) == 1 + + q = uc.Quantity(5.6,unit='m') + gq = uc.gummy(q) + assert gq.x == 5.6 + assert gq.u == 0 + assert gq.unit is uc.unit('m') + + u = uc.ummy(7.8,9.1) + gu = uc.gummy(u) + assert gu.x == 7.8 + assert gu.u == 9.1 + assert gu.unit is uc.one + + ung = uc.gummy(2.1,unit='mm') + gun = uc.gummy(3.4,u=ung,unit='m') + assert gun.unit is uc.unit('m') + assert gun.x == 3.4 + assert gun.U == 2.1 + assert gun.u == 2.1/1000 + assert gun.uunit is uc.unit('mm') + + ung = uc.Quantity(2.1,unit='mm') + gun = uc.gummy(3.4,u=ung,unit='m') + assert gun.unit is uc.unit('m') + assert gun.x == 3.4 + assert gun.U == 2.1 + assert gun.u == 2.1/1000 + assert gun.uunit is uc.unit('mm') + + guu = uc.gummy(1,1,unit='m',uunit='m') + assert guu.unit is uc.unit('m') + assert guu.uunit is None + + guuz = uc.gummy(1,unit='m',uunit='mm') + assert guuz.unit is uc.unit('m') + assert guuz.uunit is None + + gp = uc.gummy(2,1,p=0.95) + assert gp.x == 2 + assert gp.p == 0.95 + assert abs(gp.k - 1.96) < 0.01 + assert abs(gp.u - 1/1.96) < 0.01 + + gk = uc.gummy(3,1,k=2) + assert gk.x == 3 + assert gk.k == 2 + assert abs(gk.p - 0.954) < 0.1 + + gk = uc.gummy(3,1,k=1.96) + assert gk.x == 3 + assert gk.k == 1.96 + assert abs(gk.p - 0.95) < 0.1 + + gd = uc.gummy(uc.TriangularDist(2.2,0.73)) + assert gd.x == 2.2 + assert abs(gd.u - np.sqrt(0.73**2/6)) < 1e-12 + assert abs(gd.U - np.sqrt(0.73**2/6)) < 1e-12 + + gd = uc.gummy(uc.TriangularDist(2.2,0.73),k=2.6) + assert gd.x == 2.2 + assert abs(gd.u - np.sqrt(0.73**2/6)) < 1e-12 + assert abs(gd.U - 2.6*np.sqrt(0.73**2/6)) < 1e-12 + + gd = uc.gummy(uc.TriangularDist(2.2,0.73),k=2.6,unit='m',uunit='cm') + assert gd.x == 2.2 + assert abs(gd.u - np.sqrt(0.73**2/6)) < 1e-12 + assert abs(gd.U - 2.6*100*np.sqrt(0.73**2/6)) < 1e-12 + + try: + uc.gummy(3.3,1.3,unit='%',uunit='m') + assert False + except uc.NoUnitConversionFoundError: + pass + + gg = uc.gummy(3.3,1.4,unit='%',uunit=uc.one) + assert abs(gg.u - 100*1.4) < 1e-12 + + gg = uc.gummy(3.3,1.4,unit='%',uunit='ppm') + assert abs(gg.u - 3.3*1.4e-6) < 1e-12 + + gg = uc.gummy(3.3,1.4,unit='m',uunit='%') + assert abs(gg.u - 3.3*0.014) < 1e-12 + + gg = uc.gummy(1,1,dof=3.3,utype='abc',name='def') + assert gg.dof == 3.3 + assert gg.utype == 'abc' + assert gg.name == 'def' + +def test_U(): + a = uc.gummy(1.1,2.2) + assert a.U == 2.2 + b = uc.gummy(3,4.4) + c = a + b + c.ubreakdown = [a,b] + assert c.U[0] == 2.2 + assert c.U[1] == 4.4 + + a = uc.gummy(1.1,2.2,'m') + assert a.U == 2.2 + b = uc.gummy(3,4.4,'s') + c = a/b + c.ubreakdown = [a,b] + assert abs(c.U[0] - 2.2/3) < 1e-12 + assert abs(c.U[1] - 4.4*1.1/3**2) < 1e-12 + +def test_set_U(): + g = uc.gummy(1,1,k=2,unit='cm',uunit='mm') + assert g.U == 1 + assert g.uunit is uc.unit('mm') + g.unit = 'm' + assert g.U == 0.001 + + a = uc.gummy(1.1,2.2) + b = uc.gummy(3,4.4) + c = a + b + c.ubreakdown = [a,b] + assert c.U[0] == 2.2 + assert c.U[1] == 4.4 + +def test_iset_U(): + g = uc.gummy(1) + assert g._iset_U() == 0 + assert g._iset_U(unit='m').unit is uc.unit('m') + assert g._iset_U(unit='m').value == 0 + assert g._iset_U(u=float('inf')) == float('inf') + assert g._iset_U(u=float('inf'),unit='m').value == float('inf') + assert g._iset_U(u=float('inf'),unit='m').unit is uc.unit('m') + + g = uc.gummy(1,1,k=2,unit='m') + assert g._iset_U(unit='m').value == 1 + assert g._iset_U(k=4) == 2 + assert g._iset_U(unit='%').value == 100 + assert g._iset_U(unit='%').unit is uc.unit('%') + assert g._iset_U(unit='cm').value == 100 + assert g._iset_U(unit='cm').unit is uc.unit('cm') + + try: + assert g._iset_U(unit='kg') + assert False + except uc.NoUnitConversionFoundError: + pass + + g = uc.gummy(0,1,unit='m') + g._iset_U(unit='%').value == float('inf') + g._iset_U(unit='%').unit is uc.unit('%') + + g = uc.gummy(1,1,unit='degC') + assert g._iset_U(k=2) == 2 + +def test_Usim(): + g = uc.gummy(-8.5,1,unit='m') + g.sim() + assert abs(g.Usim[0] - 1) < 0.5 + assert abs(g.Usim[1] - 1) < 0.5 + g.uunit = '%' + assert abs(g.Usim[0] - 100*1/8.5) < 10 + assert abs(g.Usim[1] - 100*1/8.5) < 10 + g.uunit = 'mm' + assert abs(g.Usim[0] - 1000) < 500 + assert abs(g.Usim[1] - 1000) < 500 + +def test_xusim(): + """ + tests gummy.xsim and gummy.usim + """ + g = uc.gummy(-3.3,0.11) + g.sim() + assert abs(g.xsim + 3.3) < 0.1 + assert abs(g.usim - 0.11) < 0.1 + +def test_cisim(): + """ + tests gummy.cisim and gummy.cimethod + """ + g = uc.gummy(-3.3,0.11) + g.sim() + + g.cimethod = 'symmetric' + ci = g.cisim + assert abs(ci[0] + 3.41) < 0.1 + assert abs(ci[1] + 3.19) < 0.1 + + g.cimethod = 'shortest' + ci = g.cisim + assert abs(ci[0] + 3.41) < 0.1 + assert abs(ci[1] + 3.19) < 0.1 + + try: + g.cimethod = 'asdfhasd' + assert False + except ValueError: + pass + + a = uc.gummy(uc.UniformDist(center=0,half_width=1)) + b = a**2 + b.p = 0.8 + b.cimethod = 'shortest' + b.sim() + ci = b.cisim + assert abs(ci[0]) < 0.001 + assert abs(ci[1] - 0.64) < 0.01 + b.cimethod = 'symmetric' + ci = b.cisim + assert abs(ci[0]- 0.01) < 0.001 + assert abs(ci[1] - 0.81) < 0.01 + +def test_simdata(): + """ + tests gummy.simdata and gummy.simsorted + """ + g = uc.gummy(1,1) + g.sim(n=10) + assert len(g.simdata) == 10 + assert len(g.simsorted) == 10 + for i in range(9): + assert g.simsorted[i+1] >= g.simsorted[i] + +def test_distribution(): + g = uc.gummy(1,1) + assert isinstance(g.distribution,uc.Distribution) + +def test_ksim(): + g = uc.gummy(1,1) + g.p = 0.9545 + g.sim() + assert abs(g.ksim - 2) < 0.1 + +def test_independent(): + a = uc.gummy(1,1) + b = uc.gummy(-2,2) + c = a + b + assert a.independent + assert not c.independent + d = uc.gummy(1) + assert not d.independent + +def test_name(): + g = uc.gummy(1,1) + assert g.name is None + g.name = 'abc' + assert g.name == 'abc' + g.name = ['def','g','hi','jkl'] + assert g.name == 'def' + assert g.get_name() == 'def' + assert g.get_name(fmt='html') == 'g' + assert g.get_name(fmt='latex') == 'hi' + assert g.get_name(fmt='ascii') == 'jkl' + g.name = 'f' + assert g.get_name(fmt='html') == 'f' + g.name = 'ff' + assert g.get_name(fmt='latex') == '\\text{ff}' + assert g.get_name(fmt='latex',norm=lambda x:'*'+x+'*') == '*ff*' + + try: + g.get_name(fmt='asdgfads') + assert False + except ValueError: + pass + + g.name = None + assert g.name is None + + try: + g.name = 3 + assert False + except ValueError: + pass + + try: + g.name = ['a','b'] + assert False + except ValueError: + pass + + try: + g.name = [1,2] + assert False + except ValueError: + pass + +def test_unit(): + g = uc.gummy(1,1,unit='m') + assert g.unit is uc.unit('m') + assert str(g.unit) == 'm' + g.unit = 'cm' + assert str(g.unit) == 'cm' + assert g.x == 100 + assert g.u == 100 + g.unit = uc.unit('mm') + assert str(g.unit) == 'mm' + assert g.x == 1000 + assert g.u == 1000 + +def test_uunit(): + g = uc.gummy(1,1) + assert g.uunit is None + g = uc.gummy(1,1,unit='m',uunit='cm') + assert str(g.uunit) == 'cm' + + g = uc.gummy(1,unit='m',uunit='cm') + g.uunit = 'mm' + assert g.uunit is None + + g = uc.gummy(1,1,unit='m') + assert g.uunit is None + g.uunit = 'cm' + assert str(g.uunit) == 'cm' + assert g.U == 100 + g.uunit = None + assert g.uunit is None + +def test_uunit_is_rel(): + g = uc.gummy(1,1) + assert not g.uunit_is_rel + g.uunit='%' + assert g.uunit_is_rel + + g = uc.gummy(1,1,unit='m') + assert not g.uunit_is_rel + g.uunit = 'mm' + assert not g.uunit_is_rel + g.uunit = '%' + assert g.uunit_is_rel + +def test_k(): + g = uc.gummy(1) + assert g.k is None + + g = uc.gummy(1,1,k=2) + assert g.k == 2 + g.k = 3 + assert g.k == 3 + try: + g.k = -1 + assert False + except ValueError: + pass + + uc.gummy.p_method = None + g.p = 0.68 + assert abs(g.k - 0.99) < 0.01 + g.p = 0.95 + assert abs(g.k - 1.96) < 0.01 + +def test_p(): + uc.gummy.p_method = None + g = uc.gummy(1,1) + g.p = 0.95 + assert g.p == 0.95 + g.k = 2 + assert abs(g.p - 0.9545) < 0.0001 + + try: + g.p = -0.1 + assert False + except ValueError: + pass + try: + g.p = 1.1 + assert False + except ValueError: + pass + +def test_correlation(): + a = uc.gummy(1,1) + b = uc.gummy(1,2) + c = a + b + assert a.correlation(b) == 0 + assert a.correlation(1) == 0 + assert abs(c.correlation(a) - 1/c.u) < 1e-4 + assert abs(a.correlation(c) - 1/c.u) < 1e-4 + assert abs(c.correlation(b) - 2/c.u) < 1e-4 + assert abs(b.correlation(c) - 2/c.u) < 1e-4 + assert a.correlation(a) == 1 + +def test_covariance(): + a = uc.gummy(1,1) + b = uc.gummy(1,2) + c = a + b + assert a.covariance(b) == 0 + assert a.covariance(1) == 0 + assert abs(c.covariance(a) - 1) < 1e-4 + assert abs(a.covariance(c) - 1) < 1e-4 + assert abs(c.covariance(b) - 4) < 1e-4 + assert abs(b.covariance(c) - 4) < 1e-4 + assert a.covariance(a) == 1 + assert b.covariance(b) == 4 + +def test_correlation_matrix(): + a = uc.gummy(1,1) + b = uc.gummy(1,2) + c = a + b + m = uc.gummy.correlation_matrix([a,b,c]) + assert m[0][0] == m[1][1] == m[2,2] == 1 + assert m[0][1] == m[1][0] == 0 + assert abs(m[2][0] - 1/c.u) < 1e-4 + assert abs(m[0][2] - 1/c.u) < 1e-4 + assert abs(m[2][1] - 2/c.u) < 1e-4 + assert abs(m[1][2] - 2/c.u) < 1e-4 + +def test_covariance_matrix(): + a = uc.gummy(1,1) + b = uc.gummy(1,2) + c = a + b + m = uc.gummy.covariance_matrix([a,b,c]) + assert m[0][0] == 1 + assert m[1][1] == 4 + assert abs(m[2][2] - 5) < 1e-4 + assert m[0][1] == m[1][0] == 0 + assert abs(m[2][0] - 1) < 1e-4 + assert abs(m[0][2] - 1) < 1e-4 + assert abs(m[2][1] - 4) < 1e-4 + assert abs(m[1][2] - 4) < 1e-4 + +def test_correlation_sim(): + a = uc.gummy(1,1) + b = uc.gummy(1,2) + c = a + b + uc.gummy.simulate([a,b,c]) + assert abs(a.correlation_sim(b)) < 1e-1 + assert abs(c.correlation_sim(a) - 1/c.u) < 1e-1 + assert abs(a.correlation_sim(c) - 1/c.u) < 1e-1 + assert abs(c.correlation_sim(b) - 2/c.u) < 1e-1 + assert abs(b.correlation_sim(c) - 2/c.u) < 1e-1 + assert abs(a.correlation_sim(a) - 1) < 1e-6 + +def test_covariance_sim(): + a = uc.gummy(1,1) + b = uc.gummy(1,2) + c = a + b + uc.gummy.simulate([a,b,c]) + assert abs(a.covariance_sim(b)) < 1e-1 + assert abs(c.covariance_sim(a) - 1) < 1e-1 + assert abs(a.covariance_sim(c) - 1) < 1e-1 + assert abs(c.covariance_sim(b) - 4) < 1e-1 + assert abs(b.covariance_sim(c) - 4) < 1e-1 + assert abs(a.covariance_sim(a) - 1) < 1e-1 + assert abs(b.covariance_sim(b) - 4) < 1e-1 + +def test_correlation_matrix(): + a = uc.gummy(1,1) + b = uc.gummy(1,2) + c = a + b + uc.gummy.simulate([a,b,c]) + m = uc.gummy.correlation_matrix_sim([a,b,c]) + assert abs(m[0][0] - 1) < 1e-1 + assert abs(m[1][1] - 1) < 1e-1 + assert abs(m[2][2] - 1) < 1e-1 + assert abs(m[0][1]) < 1e-1 + assert abs(m[1][0]) < 1e-1 + assert (m[2][0] - 1/c.u) < 1e-1 + assert (m[0][2] - 1/c.u) < 1e-1 + assert (m[2][1] - 2/c.u) < 1e-1 + assert (m[1][2] - 2/c.u) < 1e-1 + +def test_covariance_matrix(): + a = uc.gummy(1,1) + b = uc.gummy(1,2) + c = a + b + uc.gummy.simulate([a,b,c]) + m = uc.gummy.covariance_matrix_sim([a,b,c]) + assert abs(m[0][0] - 1) < 1e-1 + assert abs(m[1][1] - 4) < 1e-1 + assert abs(m[2][2] - 5) < 1e-1 + assert abs(m[0][1]) < 1e-1 + assert abs(m[1][0]) < 1e-1 + assert (m[2][0] - 1) < 1e-1 + assert (m[0][2] - 1) < 1e-1 + assert (m[2][1] - 4) < 1e-1 + assert (m[1][2] - 4) < 1e-1 + +def test_finfo(): + a = uc.gummy(1,1) + assert a.finfo.rel_u == 0 + +def test_real(): + a = uc.gummy(1.1,0.3) + b = a.real + assert not a is b + assert a.x == b.x + assert a.u == b.u + assert a.correlation(b) == 1 + +def test_conjugate(): + a = uc.gummy(1.1,0.3) + b = a.conjugate() + assert not a is b + assert a.x == b.x + assert a.u == b.u + assert a.correlation(b) == 1 + +def test_angle(): + assert uc.gummy(1.1,0.3).angle() == 0 + assert abs(abs(uc.gummy(-1.1,0.3).angle()) - np.pi) < 1e-10 + +def test_utype(): + a = uc.gummy(1.2,1,1,utype='A') + assert a.utype == 'A' + b = uc.gummy(1.2,1,1,utype='xyz') + assert b.utype == 'xyz' + +def test_ufrom(): + a = uc.gummy(1.2,0.2,utype='A') + b = uc.gummy(3.2,0.5,utype='A') + c = uc.gummy(0.9,0.2,utype='B') + d = a + b + c + assert abs(d.ufrom('A') - np.sqrt(0.2**2+0.5**2)) < 1e-8 + uc.gummy.simulate([d,'A']) + assert abs(d.ufrom('A',sim=True) - np.sqrt(0.2**2+0.5**2)) < 1e-2 + assert d.ufrom(c) == 0.2 + +def test_dof_from(): + a = uc.gummy(1.2,0.2,dof=5,utype='A') + b = uc.gummy(3.2,0.5,dof=7,utype='A') + c = uc.gummy(0.9,0.2,utype='B') + d = a + b + c + assert abs(d.doffrom('A') - (0.2**2+0.5**2)**2/(0.2**4/5 + 0.5**4/7)) < 1e-10 + assert d.doffrom(a) == 5 + + + + \ No newline at end of file diff --git a/metrolopy/tests/test_misc.py b/metrolopy/tests/test_misc.py index ea3821b..76bcfcd 100644 --- a/metrolopy/tests/test_misc.py +++ b/metrolopy/tests/test_misc.py @@ -1,8 +1,26 @@ # -*- coding: utf-8 -*- -""" -Created on Thu Jul 8 14:55:05 2021 -@author: Parksh +# module test_misc + +# Copyright (C) 2019 National Research Council Canada +# Author: Harold Parks + +# This file is part of MetroloPy. + +# MetroloPy is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. + +# MetroloPy is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. + +# You should have received a copy of the GNU General Public License along with +# MetroloPy. If not, see . +""" +Check that known bugs are fixed. """ import metrolopy as uc @@ -56,4 +74,40 @@ def test_ufrom_multiletter(): b = uc.gummy(20.0, 2, utype='DUT') y = a - b assert abs(y.ufrom('A') - 1) < 1e-15 - assert abs(y.ufrom('DUT') - 2) < 1e-15 \ No newline at end of file + assert abs(y.ufrom('DUT') - 2) < 1e-15 + +def test_uniform_params(): + # issue 33 + g = uc.gummy(uc.UniformDist(lower_limit=6,upper_limit=9),unit='pA') + g.sim() + assert abs(min(g.simdata) - 6) < 0.01 + assert abs(max(g.simdata) - 9) < 0.01 + + g = uc.gummy(uc.UniformDist(center=7.5,half_width=1.5),unit='pA') + g.sim() + assert abs(min(g.simdata) - 6) < 0.01 + assert abs(max(g.simdata) - 9) < 0.01 + +def test_mean_b(): + # issue 32 + import numpy as np + from scipy.stats import t + from scipy import special + + con = special.erf(1/np.sqrt(2)) + def u(x): + return t.ppf(1-(1-con)/2, len(x)-1)*x.std(ddof=1)/np.sqrt(len(x)) + + x = np.random.rand(5) + g = uc.mean(x) + g.p = 'ssd' + assert abs(con-g.p) < 1e-6 + assert abs(g.U - u(x)) < 1e-6 + try: + uc.gummy.bayesian = True + gg = uc.mean(x) + assert abs(gg.u - np.sqrt(2)*g.u) < 1e-6 + gg.p = 'ssd' + assert abs(gg.U - u(x)) < 1e-6 + finally: + uc.gummy.bayesian = False \ No newline at end of file diff --git a/metrolopy/tests/test_operations.py b/metrolopy/tests/test_operations.py index 785ec8d..c1d38f1 100644 --- a/metrolopy/tests/test_operations.py +++ b/metrolopy/tests/test_operations.py @@ -154,7 +154,7 @@ def f(a,b): def df(ax,bx): return (1,np.sign(bx)*abs(ax//bx)) for i in range(n): - binary_func(f,df,sim=sim,fionly=True) + binary_func(f,df,sim=sim,fionly=True,allowazero=False) def test_abs(n=1000,sim=False): def f(a,b): @@ -276,7 +276,7 @@ def f(*x): assert d.u == 0 else: assert abs((d.u - b.u)/b.u) < 1e-3 - assert d.correlation(b) == 1 + assert abs(d.correlation(b) - 1) < 1e-14 def test_mulxpow(n=1000): def f(*x): diff --git a/metrolopy/ummy.py b/metrolopy/ummy.py index 69a4505..810fcf6 100644 --- a/metrolopy/ummy.py +++ b/metrolopy/ummy.py @@ -664,10 +664,10 @@ def _get_dof(cls,dof1,dof2,du1,du2,c): if r > cls.max_dof: return float('inf') - if r < -1e-6: - raise ValueError('dof is negative') + #if r < -1e-6: + #raise ValueError('dof is negative') if r < 0: - r == 1 + r = 1 return r @@ -1266,14 +1266,18 @@ def _toummylist(x): return [] x = t.get_values() return x + elif hasattr(x,'value') and isinstance(x.value,ummy): + return [x.value] xl = [] for e in x: - if isinstance(e,ummy): - xl.append(e) - if isinstance(e,GummyTag): + if hasattr(e,'value') and isinstance(e.value,ummy): + xl.append(e.value) + elif isinstance(e,ummy): + xl.append(e) + elif isinstance(e,GummyTag): xl += e.get_values() - if isinstance(e,str): + elif isinstance(e,str): t = GummyTag.tags.get(e) if t is not None: xl += t.get_values() diff --git a/metrolopy/version.py b/metrolopy/version.py index 9812839..e641236 100644 --- a/metrolopy/version.py +++ b/metrolopy/version.py @@ -20,4 +20,4 @@ # You should have received a copy of the GNU General Public License along with # MetroloPy. If not, see . -__version__ = '0.6.2' +__version__ = '0.6.3'