How to Add a Photometric Error Lab to Your Website
LK Forge · 4 min read · Updated September 2026
You can add a full photometric error lab to any website, blog, or classroom page with a single line of code — free, with no sign-up, no plugin, and no script to install. Visitors pick a noise regime and watch the relative concentration error trace its curve, revealing how the optimal absorbance range shifts with the detector — the classic A ≈ 0.4 optimum holds only when the instrument is readout-limited, while modern array detectors are usually shot- or flicker-limited. This guide covers the fastest way to embed the Photometric Error lab, what it teaches, and where it works.
The quickest way: paste one embed snippet
An embed is just an <iframe> that loads the lab from lkforge.com, plus a small credit line. Copy this into your page’s HTML where you want the widget to appear:
<iframe src="https://lkforge.com/embed/photometric-error/"
width="100%" height="760" loading="lazy"
style="border:0;max-width:560px"
title="Photometric Error by LK Forge"></iframe>
<p><a href="https://lkforge.com/tools/chemistry/photometric-error/">Photometric Error</a>
by <a href="https://lkforge.com/">LK Forge</a></p> The <iframe> is the live lab; the <p> underneath is a plain credit link. Keep that line — the visible link is what keeps the widget free to embed. You can also copy this exact code straight from the LK Forge widget gallery.
What the widget shows
The lab opens on the shot-noise regime — the usual case for modern array detectors — with the error curve drawn, so a visitor sees the shape immediately and can then take control:
- Three noise regimes: buttons switch between detector-noise, shot-noise and source-flicker, and the error curve changes shape with each.
- Transmittance noise: a slider sets the size of the measurement noise that drives the whole curve.
- Absorbance marker: drag the marker along the curve to read the relative concentration error at any absorbance.
- The error minimum: the plot makes the dip obvious for detector- and shot-noise — and shows how it moves higher, flattens, or vanishes as you switch regimes, alongside how sharply error rises toward very low absorbance.
Pick the right height
The snippet uses height="760", which fits the plot, the controls and the readouts without clipping even on a narrow phone, where they stack into one column. On a wider page the widget centres within its max-width:560px. That single height works across screen sizes, so there is nothing to tweak for mobile.
Where it works
Because it is a standard iframe, the embed works anywhere you can add HTML:
- WordPress: add a Custom HTML block and paste the snippet.
- Squarespace: use a Code / Embed block.
- Wix: add an Embed HTML / iframe element.
- Ghost: insert an HTML card.
- Notion: paste the
/embed/photometric-error/URL and choose "Create embed". - Plain HTML, an intranet, or a lesson page: paste the snippet straight into the markup.
That’s the whole job. Copy the embed code from the widget gallery and paste it wherever an analytical-chemistry lesson or a blog post on spectrophotometry, measurement error or why you dilute a sample needs a curve students can actually explore.
Grab the embed code from the LK Forge widget gallery — free, no sign-up.
Open the Photometric Error LabFrequently asked questions
- What can visitors do with the embedded Photometric Error lab?
- They can switch between the three noise regimes — detector, shot and source-flicker — then adjust the transmittance noise level and slide an absorbance marker along the curve. The relative concentration error is plotted against absorbance, so the marker shows exactly how much error you carry at any reading.
- What does the Photometric Error lab teach?
- It shows that the best absorbance range depends on which noise dominates the instrument. Because error is measured in transmittance but concentration is read in absorbance, the relative concentration error traces a curve whose minimum sits near A ≈ 0.4 only when the instrument is readout-limited; modern array detectors are usually shot- or flicker-limited, so the optimum moves higher or disappears. Either way the error still climbs steeply at very low absorbance, which is why analysts dilute a too-strong sample.
- Is embedding the Photometric Error lab free?
- Yes. It is free to embed on any site, with no account, no API key and no usage limits. The whole simulation runs in your visitor’s own browser, so there is no server cost — we only ask that you keep the small "Photometric Error by LK Forge" credit line that comes with the embed code.
- What iframe height should I use, especially on mobile?
- The snippet ships with height="760", which is tall enough that the plot, the controls and the readouts all fit without clipping even on a narrow phone, where they stack into a single column. On a wider page the widget simply centres within its max-width of 560px. You can lower the height if you want it shorter, but 760 is the safe default across screen sizes.
- Where can I embed it — WordPress, Wix, Squarespace, Notion?
- Anywhere you can add HTML, because it is a standard iframe. In WordPress use a Custom HTML block; in Squarespace a Code/Embed block; in Wix an Embed HTML element; in Ghost an HTML card; in Notion paste the /embed/photometric-error/ URL as an embed. On a plain HTML page or an intranet, paste the snippet straight into the markup.
- Does the embedded lab track visitors or set cookies?
- No. Everything runs locally in the visitor’s browser — nothing is uploaded. The embed sets no tracking cookies and sends no analytics, so it is safe to place on a privacy-sensitive site, an intranet, or a page for students.