Allura Red Analysis — Stages 5–8

Dataset: 2026-08-31  |  Dye: Allura Red  |  Device: device_1  |  Channel: green

Empirical Beer–Lambert analysis of stepped-height microfluidic channel images acquired 2026-08-31 with 5 Allura Red concentrations (0.375, 1.0, 1.5, 2.5, 5.0 mM).

Transmittance:

T = clip( (I_dye − I_dark) / (I_light − I_dark), 10⁻⁶, 1 )

Absorbance:

A_meas = −log₁₀( ⟨T⟩_ROI )

Forward model (empirical Beer–Lambert):

A_pred(C, h) = s · C · h · [1 + η · (C·h / P_ref − 1)] where P_ref = 80 mM·µm (pivot: 1.0 mM × 80 µm capillary)

No Nanodrop spectrum or filter profile is used. The scale s absorbs all unknown proportionality factors (molar absorptivity, filter efficiency, camera sensitivity) and is determined purely from the capillary at known path length L = 80 µm.

Stage 5a — Green vs Blue Channel Comparison (Capillary)

The capillary (L = 80 µm, known path length) is used to compare measured absorbance for the green and blue camera channels against a purely linear Beer–Lambert model (no nonlinearity correction, no free parameters). Whichever channel shows smaller residuals is selected for all subsequent stages.

Conc (mM)A_greenA_blueA_linearres_greenres_blueσ_greenσ_blue
0.3750.02760.02120.0243+0.0033-0.00160.00520.0141
10.07080.06820.0648+0.0060+0.00730.00570.0172
1.50.10260.09690.0972+0.0054+0.00560.00610.0184
2.50.16740.13890.1620+0.0054-0.01330.00700.0209
50.31820.30800.3240-0.0058+0.00360.01050.0338
Selected channel: green
RMS residual from linear fit — green = 0.0053 AU, blue = 0.0075 AU.
Stage 5a channel comparison

Left: measured vs linear-fit absorbance for both channels at the capillary. Right: residuals from the linear fit. Systematic curvature in both channels indicates mild nonlinearity that is accounted for in Stage 6.

Stage 6 — Capillary Calibration: Empirical (s, η) Fit

The effective absorptivity scale s [AU/(mM·µm)] and camera nonlinearity parameter η are fit jointly from the 5 capillary measurements at known L = 80 µm using Nelder–Mead minimisation.

A_pred(C) = s · C · L · [1 + η · (C·L / P_ref − 1)]

s anchors the absolute path-length scale for all subsequent stages — knowing L = 80 µm exactly is what lets us convert from absorbance to height. η captures the systematic deviation from strict linearity; at the highest capillary condition (5 mM × 80 µm = 400 mM·µm) the correction is -8.44%.

Stage 6 fit results

ParameterValueInterpretation
s0.0008683 AU/(mM·µm)effective absorptivity scale
η-0.02111camera nonlinearity (0 = linear)
RMS residual0.00090 AUover 5 capillary measurements
Stage 6 calibration

Left: measured absorbance vs linear prediction for the green channel; the small positive deviation at high concentrations reflects η > 0. Right: residuals after fitting both s and η — the curve is removed and residuals are near zero.

Stage 7 — Joint Channel Height + Nonlinearity Fit

The 8 section heights hi and the nonlinearity η are fit jointly from the full 8×5 channel absorbance matrix (8 sections × 5 concentrations = 40 measurements), using s from Stage 6 to anchor the absolute scale.

A_pred(h_i, C_k) = s · C_k · h_i · [1 + η · (C_k·h_i / P_ref − 1)]

Degrees of freedom: 40 measurements − 9 unknowns (8 hi + η) = 31 DoF. The 6.7× concentration span (0.375–5 mM) gives strong leverage on η because it produces a wide absorbance range; s from Stage 6 anchors the absolute height scale.

Stage 7 height fit results

Sectionh_nominal (µm)h_fit (µm)h_fit / h_nom
30um3028.470.9490
40um4038.170.9543
50um5048.180.9636
70um7067.070.9581
90um9086.740.9638
120um120117.320.9777
150um150151.061.0071
200um200212.741.0637

s = 0.0008683 AU/(mM·µm) — Stage 6 capillary (fixed)
η_cap = -0.02111 — Stage 6, capillary-only fit
η_fit = -0.03570 — Stage 7, from 6.7× channel concentration span
RMS = 0.00685 AU over 40 channel measurements (31 DoF)

Stage 7 fit results

Left: residual heatmap (A_meas − A_pred). Blue = model overpredicts; red = model underpredicts. A systematic negative column at 5 mM is visible. Right: fitted vs nominal heights; all sections agree within a few µm except 200 µm, which lands at 212.7 µm.

Anomaly: the Stage 7 free fit places the 200 µm section at 212.7 µm, roughly 6% above the 200 ± 1 µm confirmed by direct measurement. All other sections (30–150 µm) fall within a few percent of their nominal depths. The residual heatmap also shows a systematic negative bias in the 5 mM column for all sections except 200 µm. Three sensitivity tests below investigate whether this reflects model error, a concentration outlier, or a true depth discrepancy.

Sensitivity Test 1 — 4 Concentrations (Excluding 5 mM)

The 5 mM column shows a clear systematic pattern in the residual heatmap: negative residuals for all sections except 200 µm (positive). One hypothesis is that the empirical quadratic correction extrapolates poorly to the highest Ch products (up to 1000 mM·µm at 5 mM × 200 µm, vs the capillary calibration pivot of 80 mM·µm). This test repeats the fit using only the four lower concentrations (0.375, 1.0, 1.5, 2.5 mM), reducing the maximum Ch to 500 mM·µm.

Degrees of freedom: 4 × 8 = 32 measurements − 9 unknowns = 23 DoF.

Sectionh_nom (µm)h_5c (µm)h_4c (µm)Δh (µm)h_5c/h_nomh_4c/h_nom
30um3028.4730.25+1.780.94901.0084
40um4038.1740.69+2.510.95431.0171
50um5048.1851.64+3.460.96361.0328
70um7067.0772.72+5.650.95811.0389
90um9086.7493.88+7.140.96381.0431
120um120117.32125.55+8.230.97771.0463
150um150151.06160.74+9.681.00711.0716
200um200212.74224.87+12.131.06371.1243

5-conc fit: η = -0.03570, RMS = 0.00685 AU (40 meas, 31 DoF)
4-conc fit: η = -0.04446, RMS = 0.00278 AU (32 meas, 23 DoF)

4-conc sensitivity test

Left: 4-conc residuals. Centre: 5-conc residuals for comparison. Right: fitted heights for both fits — orange triangles (4-conc) sit systematically above blue circles (5-conc) for every section, including 200 µm.

Finding: 4-conc fit worsens the 200 µm discrepancy.
Dropping 5 mM moves h_200 from 212.7 µm to 224.9 µm; all heights shift up ~6%. The 5 mM column is not the cause — the model is self-consistent across lower concentrations at a different (higher) scale. This rules out “5 mM is an outlier” as an explanation.

Sensitivity Test 2 — Fix h_200 = 200 µm (Option 2)

A note on concentration errors and the dilution series. All five concentrations were prepared by diluting the same 5 mM stock solution. Any error in the stock propagates as the same relative factor to every concentration. A uniform scale factor on all concentrations aliases exactly through s and cannot produce a column-specific residual pattern. The 5 mM column's systematic negative residuals therefore cannot be explained by a stock error; they point to model inadequacy at large Ch products.

This test pins h_200 = 200 µm from direct measurement and re-fits the remaining 7 heights and η from all 40 channel measurements.

Degrees of freedom: 40 measurements − 8 unknowns (7 hi + η) = 32 DoF.

Sectionh_nom (µm)h_free (µm)h_fix (µm)Δh (µm)h_free/h_nomh_fix/h_nom
30um3028.4728.45-0.020.94900.9485
40um4038.1738.13-0.040.95430.9534
50um5048.1848.10-0.080.96360.9620
70um7067.0766.89-0.180.95810.9555
90um9086.7486.39-0.360.96380.9599
120um120117.32116.54-0.780.97770.9712
150um150151.06149.57-1.491.00710.9972
200um200212.74200.00 ← fixed-12.741.06371.0000 (fixed)

Free fit: η = -0.03570, RMS = 0.00685 AU (40 meas, 31 DoF)
Fixed h_200: η = -0.03487, RMS = 0.00773 AU (40 meas, 32 DoF)
The 200 µm row residuals (blue annotations in centre heatmap) reveal whether the measured absorbances there are consistent with h = 200 µm under the fitted η.

Option 2 fix h200

Left: free-fit residuals. Centre: fixed-h_200 residuals (200 µm row annotated in blue). Right: height comparison — orange triangles (fixed) coincide with blue circles (free) for all sections except 200 µm.

Finding: 200 µm residuals are uniformly positive across all 5 concentrations.
Values range from +0.010 to +0.014 AU — concentration-independent. A concentration-dependent pattern would point to model error; a flat positive offset instead suggests the actual fabricated depth is genuinely greater than 200 µm. The fit RMS is essentially unchanged (0.00773 vs 0.00685 AU).

Sensitivity Test 3 — Channel-Only Fit (No Capillary; h_200 = 200 µm Anchor)

What if we ignore the capillary calibration entirely and let s float as a free parameter, anchored instead by pinning h_200 = 200 µm from direct measurement?

Scale degeneracy: Beer–Lambert absorbance depends on the product s·C·h. Scaling s by k and all heights by 1/k leaves every prediction unchanged — the fit is under-determined without an anchor. Pinning h_200 = 200 µm breaks this degeneracy: the absolute height scale is now set by the direct measurement, not by the capillary.

Free parameters: s, η, and h30–h150 (7 heights) — 9 unknowns from 40 measurements → 31 DoF (same as Stage 7, but capillary data play no role).

Comparing the fitted snocap to semp from the capillary quantifies how much the two anchoring methods agree on the absolute absorptivity scale.

Sectionh_nom (µm)h_free (µm)h_fix200 (µm)h_nocap (µm)nocap/nom
30um3028.4728.4526.770.8922
40um4038.1738.1335.890.8972
50um5048.1848.1045.290.9059
70um7067.0766.8963.050.9008
90um9086.7486.3981.550.9061
120um120117.32116.54110.300.9191
150um150151.06149.57142.020.9468
200um200212.74200.00200.00 ← fixed1.0000 (fixed)

Free fit (Stage 7): s = 0.0008683 AU/(mM·µm), η = -0.03570, RMS = 0.00685 AU
Fix h_200 (Option 2): s = 0.0008683 AU/(mM·µm), η = -0.03487, RMS = 0.00773 AU
Channel-only: s = 0.0009215 AU/(mM·µm), η = -0.03806, RMS = 0.00685 AU

The ratio s_nocap / s_emp = 1.0613 — the two anchoring methods disagree on the absolute scale by 6.1%.

Channel-only fit

Left: channel-only residuals (200 µm row in blue). Centre: free-fit residuals for comparison. Right: all three fits on the same height scatter plot — green squares (channel-only) sit systematically below blue circles (free fit with capillary anchor).

Keyence 3-Point Anchor Fit

The Keyence confocal distance sensor directly measured three section heights. All three are above their nominal depths, consistent with the Stage 7 free-fit placing h200 at 212.7 µm:

SectionNominal (µm)Keyence (µm)Std dev (µm)Ratio
120 µm120.0123.00.171.025
150 µm150.0155.30.501.035
200 µm200.0207.10.521.036

These three heights are pinned; s, η, and the remaining five heights (30, 40, 50, 70, 90 µm) are free — giving 40 − 7 = 33 DoF.

Sectionh_nom (µm)h_free7 (µm)h_key3 (µm)key3/nom
30um3028.4728.890.9631
40um4038.1738.740.9685
50um5048.1848.890.9778
70um7067.0768.060.9723
90um9086.7488.020.9780
120um120117.32123.00 ← fixed1.0250
150um150151.06155.30 ← fixed1.0353
200um200212.74207.10 ← fixed1.0355

s_key3 = 0.0008561 AU/(mM·µm) (s_key3 / s_emp = 0.9859)
η_key3 = -0.03512
RMS = 0.00757 AU (33 DoF; cf. 0.00685 AU for Stage 7 free, 31 DoF)

Keyence 3-pt fit

Left: Keyence 3-pt residuals heatmap; blue annotations mark the three fixed rows, dashed lines separate them. Centre: Stage 7 free residuals for comparison. Right: height scatter with all fits overlaid — the three open-circle markers show Keyence-fixed points.

Keyence 3-pt: s within 1.4% of s_emp.
Pinning h_120 = 123.0, h_150 = 155.3, h_200 = 207.1 µm yields s_key3 / s_emp = 0.9859. The capillary-derived s and the Keyence-anchored s agree to within 1.4%, far better than the 6.1% discrepancy from pinning h_200 = 200 µm (channel-only). The RMS increases modestly from 0.0069 to 0.0076 AU — expected, since 3 DoF are removed.

Keyence 4-Point Anchor Fit

A fourth Keyence measurement of the 70 µm section (67.7 ± 1.44 µm) is now available, providing a critical data point: unlike the 120–200 µm sections, the 70 µm section is below nominal (ratio 0.967).

SectionNominal (µm)Keyence (µm)Std dev (µm)Ratio
70 µm70.067.71.440.967
120 µm120.0123.00.171.025
150 µm150.0155.30.501.035
200 µm200.0207.10.521.036

These four heights are pinned; s, η, and h30, h40, h50, h90 are free — 40 − 6 = 34 DoF.

Sectionh_nom (µm)h_free7 (µm)h_key3 (µm)h_key4 (µm)key4/nom
30um3028.4728.8928.870.9622
40um4038.1738.7438.700.9676
50um5048.1848.8948.850.9769
70um7067.0768.0667.70 ← fixed0.9671
90um9086.7488.0287.940.9772
120um120117.32123.00123.00 ← fixed1.0250
150um150151.06155.30155.30 ← fixed1.0353
200um200212.74207.10207.10 ← fixed1.0355

s_key4 = 0.0008569 AU/(mM·µm) (s_key4 / s_emp = 0.9868)
η_key4 = -0.03518
RMS = 0.00758 AU (34 DoF)

Keyence 4-pt fit

Left: Keyence 4-pt residuals; four fixed rows marked. Centre: Keyence 3-pt residuals for comparison. Right: height comparison across all four fits.

Cross-validation: optical and Keyence methods agree on h₇₀ without any prior.
The 3-pt free fit already placed h_70 = 68.1 µm — within 0.4 µm of the Keyence value of 67.7 µm. Adding the 70 µm pin barely changes the cost (2.0637e-03 vs 2.0620e-03). This internal consistency check confirms both measurement methods.

Fabrication depth pattern

Four independent Keyence measurements reveal a systematic fabrication crossover:

The crossover (where fabricated depth equals nominal) lies between 90 and 120 µm. This depth-dependent sign reversal is consistent with known behaviour in UV-photopolymer layer-by-layer fabrication, where thin features may be undercut and thick features overcut relative to nominal.

Recommended heights for future concentration calculations

SectionRecommended h (µm)Source
30um28.9Keyence 4-pt fit
40um38.7Keyence 4-pt fit
50um48.8Keyence 4-pt fit
70um67.7Keyence direct
90um87.9Keyence 4-pt fit
120um123.0Keyence direct
150um155.3Keyence direct
200um207.1Keyence direct

Summary of Findings

Testh_200 (µm)s (AU/(mM·µm))RMS (AU)DoFAnchor
Stage 7 free fit212.70.00086830.0068531capillary L = 80 µm
4-conc (no 5 mM)224.90.00086830.0027823capillary L = 80 µm
Fix h_200 = 200 µm200.0 (fixed)0.00086830.0077332capillary + h_200
Channel-only200.0 (fixed)0.00092150.0068531h_200 = 200 µm only
Keyence 3-pt207.1 (fixed)0.00085610.0075733Keyence h₁₂₀, h₁₅₀, h₂₀₀
Keyence 4-pt207.1 (fixed)0.00085690.0075834Keyence h₇₀, h₁₂₀, h₁₅₀, h₂₀₀

Two self-consistent interpretations exist, differing by 6.1%:

  1. Capillary anchor (Stage 7): s is set by the capillary at L = 80 µm; the fit then requires h_200 ≈ 213 µm. If the capillary path length and concentrations are accurate, the 200 µm section was fabricated ~6% deeper than its nominal height.
  2. Direct-measurement anchor (channel-only): h_200 is fixed at 200 µm; s is then 6.1% higher than the capillary-derived value and all other heights are correspondingly lower. If the 200 µm measurement is accurate, the capillary L or the stock concentration carries a ~6% error.
Conclusion: Keyence measurements confirm a fabrication depth crossover, not a scale error.
All four Keyence-measured sections agree with the optical Beer-Lambert fit to within ≈ 1 µm. The Keyence-anchored s (0.0008569) is within 1.3% of the capillary-derived s (0.0008683), confirming the calibration is self-consistent. The 200 µm section was fabricated at 207.1 µm (+3.5% overcut), the 70 µm section at 67.7 µm (−3.3% undercut). The systematic 5 mM residuals are attributed to the quadratic η correction extrapolating to Ch ≈ 1000 mM·µm, well beyond the capillary calibration range (~400 mM·µm).