{"id":15014994,"url":"https://github.com/nrc-cnrc/metrolopy","last_synced_at":"2026-03-05T16:49:53.170Z","repository":{"id":34361250,"uuid":"177786277","full_name":"nrc-cnrc/MetroloPy","owner":"nrc-cnrc","description":"Tools for uncertainty propagation and measurement unit conversion — Outils pour la propagation des incertitudes et la conversion d'unités de mesure","archived":false,"fork":false,"pushed_at":"2025-06-04T19:31:03.000Z","size":10393,"stargazers_count":35,"open_issues_count":6,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-05T23:19:48.345Z","etag":null,"topics":["curve-fitting","error-propagation","ipython","jupyter","metrology","monte-carlo-simulation","python3","uncertainties","uncertainty","uncertainty-analysis","uncertainty-propagation","uncertainty-visualisation","unit-conversion","unit-converter"],"latest_commit_sha":null,"homepage":"https://nrc-cnrc.github.io/MetroloPy","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nrc-cnrc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-26T12:41:27.000Z","updated_at":"2025-06-04T19:26:30.000Z","dependencies_parsed_at":"2025-06-04T18:51:44.734Z","dependency_job_id":"b3ba96b9-52e3-4705-8fa6-8140ef8be0e8","html_url":"https://github.com/nrc-cnrc/MetroloPy","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/nrc-cnrc/MetroloPy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrc-cnrc%2FMetroloPy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrc-cnrc%2FMetroloPy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrc-cnrc%2FMetroloPy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrc-cnrc%2FMetroloPy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nrc-cnrc","download_url":"https://codeload.github.com/nrc-cnrc/MetroloPy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrc-cnrc%2FMetroloPy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271330292,"owners_count":24740815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["curve-fitting","error-propagation","ipython","jupyter","metrology","monte-carlo-simulation","python3","uncertainties","uncertainty","uncertainty-analysis","uncertainty-propagation","uncertainty-visualisation","unit-conversion","unit-converter"],"created_at":"2024-09-24T19:46:22.194Z","updated_at":"2026-03-05T16:49:53.155Z","avatar_url":"https://github.com/nrc-cnrc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MetroloPy\n\ntools for dealing with physical quantities:  uncertainty propagation and unit conversion\n\n---\n\nMetroloPy requires Python 3.8 or later and depends on NumPy, SciPy, pandas, matplotlib and ipython.\nIt looks best in a Jupyter Notebook.\n\nInstall MetroloPy with `pip install metrolopy` or\n`conda install -c conda-forge metrolopy`.\nAlternatively, add it to your uv or pixi project.\n\nPhysical quantities can then be represented in Python as `gummy` objects with an uncertainty and (or) a unit:\n\n\u003cpre\u003e\u003ccode\u003e\u0026gt;\u0026gt;\u0026gt; import metrolopy as uc\n\u0026gt;\u0026gt;\u0026gt; a = uc.gummy(1.2345,u=0.0234,unit='cm')\n\u0026gt;\u0026gt;\u0026gt; a\n1.234(23) cm\n\n\u0026gt;\u0026gt;\u0026gt; b = uc.gummy(3.034,u=0.174,unit='mm')\n\u0026gt;\u0026gt;\u0026gt; f = uc.gummy(uc.UniformDist(center=0.9345,half_width=0.096),unit='N')\n\u0026gt;\u0026gt;\u0026gt; p = f/(a*b)\n\u0026gt;\u0026gt;\u0026gt; p\n2.50(21) N/cm\u003csup\u003e2\u003c/sup\u003e\n\n\u0026gt;\u0026gt;\u0026gt; p.unit = 'kPa'\n\u0026gt;\u0026gt;\u0026gt; p.uunit = '%'\n\u0026gt;\u0026gt;\u0026gt; p\n25.0 kPa \u0026plusmn; 8.5%\n\u003c/code\u003e\u003c/pre\u003e\n\nMetroloPy can do much more including Monte-Carlo uncertainty propagation, generating uncertainty budget tables, and curve fitting.\nIt can also handle expanded uncertainties, degrees of freedom, correlated quantities, and complex valued quantities. \nAlso gummys work with many numpy functions with no wrapping.\n\nSee:\n\n* [a tutorial](https://nrc-cnrc.github.io/MetroloPy/_build/html/_static/tutorial.html) (or  \u003ca href=\"https://nrc-cnrc.github.io/MetroloPy/_build/html/_downloads/tutorial.ipynb\" download\u003e download the tutorial as Jupyter notebook\u003c/a\u003e)\n* [the documentation](https://nrc-cnrc.github.io/MetroloPy/_build/html/index.html)\n* [the issues page on GitHub](https://github.com/nrc-cnrc/Metrolopy/issues)\n* [a list of the units built into MetroloPy](https://nrc-cnrc.github.io/MetroloPy/_static/units.html)\n* [a list of the physical constants built into MetroloPy](https://nrc-cnrc.github.io/MetroloPy/_static/constants.html)\n\n## new in version 1.0.0\n\n* The calculation of effective degrees of freedom has been improved. In\n  previous versions, in a multi-step calculation, the effective degree of freedom \n  were calculated at each step based on the degrees of freedom calculated for the \n  previous step (using a modified Welch-Satterthwaite approximation).  Now \n  effective degrees of freedom are always calculated directly from the independent \n  variables using the Welch-Satterthwaite equation.\n\n* CODATA 2022 values instead of 2018 values are used in the Constants module.\n\n* The significance value in budget table has been redefined from\n  (sensitivity coefficient * standard uncertainty/combined uncertainty) to the \n  square of that value so that the significance values in a budget sum to one.\n  \n* Units can now be raised to a fractional power and many other bug fixes.\n  \n  \n## new in version 0.6.0\n\n* A constant library has been added with physical constants that can be accessed\n  by name or alias with the `constant` function.  The `search_constants` function \n  with no argument gives a listing of all built-in constants.  Each constant \n  definition includes any correlations with other constants.\n\n* The `Quantity` class has been added to represent a general numerical value\n  multiplied by a unit and the `unit` function has been added to retrieve\n  `Unit` instances from the unit library by name or alias.  `Unit` instances \n  can now be multiplied and divided by other `Unit` instances to produce\n  composite units, can be multiplied and divided by numbers to produce \n  `Quantity` instances or multiply or divide `Quantity` instances.  The \n  `gummy` class is now a subclass of `Quantity` with a `nummy` value rather \n  than a subclass of `nummy`.  A `QuantityArray` class has been introduced\n  to represent an array of values all with the same unit.  Multiplying a `Unit`\n  instance by a list, tuple, or numpy array produces a `QuantityArray` instance.\n\n* The `immy` class has been introduced as an `ummy` valued counterpart of the \n  `jummy` class for representing complex values with uncertainties.  `immy` \n  and `jummy` values can now be displayed in a polar representation in addition \n  to a cartesian representation.  `immy` and `jummy` .r and .phi properties \n  have been added to access the magnitude and argument of the values as a \n  complement to the .real and .imag properties.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrc-cnrc%2Fmetrolopy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnrc-cnrc%2Fmetrolopy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrc-cnrc%2Fmetrolopy/lists"}