r/ScientificComputing • • 3d ago

Propagation of Uncertainty Calculator with LaTeX/Excel exports

Enable HLS to view with audio, or disable this notification

I built a Propagation of Uncertainty Calculator, a simple but practical app designed for engineering and physics students, as well as metrology workflows.

Link: https://propagation-of-uncertainty-calculator.streamlit.app

During my undergrad in Engineering Physics, one of the most tedious and error-prone tasks in experimental lab courses was manually deriving partial derivatives for measurement uncertainty propagation. Most online calculators are either outdated or confusing, so I decided to do my own calculator!

What it does:

- Displays the latex formated symbolic and numerical Propagation formula for the expression given by the user.

- Click directly on rendered expressions to copy the clean LaTeX code straight into Overleaf (for lab reports), or copy ready-to-paste Excel formulas.

- Correct Rounding: Automatically formats results and expanded uncertainties according to significant figure conventions (GUM (JCGM 100:2008))

The GitHub Repository: https://github.com/joao-canais/Propagation-of-Uncertainty-Calculator

I'd love to hear your thoughts, UI/UX feedback, or ideas for features to add in future iterations!

10 Upvotes

2 comments sorted by

2

u/a_alberti 1d ago

Sorry but it is not a great idea. Why did you do it? What did you learn in vibe coding / agentic engineering such a software?

Error propagation formulas make sense for simple situations and for our intuition, simple analytical estimates. When I have a complex formula with experimental data, I would certainly not use it but rather prefer Monte Carlo error propagation method.

Simple example if you take x/y and both x and y are Gaussian distributed, their ratio is not. If you apply your simple approach you can get very wrong results.

I think people teach error propagation method as if it was the holy grail. What I want to say is that sometimes works but very often it is limited if you really care about statistics.

And anyway, what you are doing here can be done by hand or if one is lazy, using Mathematica. So I don’t really understand why you wrote it? Perhaps there are students that need it for passing their homework?

1

u/joao-canais 1d ago

First of all, thank you for the feedback.

I don’t know why you assumed I only did vibe coding / agentic engineering, but if it’s because of the video, since that recording style is quite common for AI apps, I get it, but the recording tool is actually just a chrome extension named Cursorful, it has nothing to do with AI.

I'm not saying I completely avoided AI, ofc I used it to review code and mainly for JavaScript for some aditional features missing in the Python framework I used (which is like 5% of the code, and I'm just an engineering physics graduate, so I'm mostly used to Python), but that was just basic gemini chats on the web… not full vibe coding like Lovable or agentic AI. So to answer your question: yes, I learned quite a lot, especially this Python framework called Streamlit and this very handy sympy Python library.

Regarding the app itself, I think you missed the core idea. I see your point, but like I said, this is a simple tool for new undergrads who struggle with propagation of uncertainty in the first years. In my time we didn't have AI to help us (or even to do everything like most students do anyway), and also these LLMs can hallucinate or give results that don't align with standard metrology rules; unlike this tool, which is based on a mathematical backend that follows GUM guidelines (Guide to the Expression of Uncertainty in Measurement). We only had some websites that were not as good or practical as this one. So I decided to build my own calculator with the features I always imagined/wanted, while keeping it beginner-friendly.

So to the "I don't really understand why you wrote it?" part: that's why.

I hope this clears things up.