Guide
Ghosts in a camera lens: find them, rank them, and see what a coating is worth
A three-element camera lens with a bright source just outside the frame. Rank the reflections still landing on the sensor, then add the housing and coat the glass, and measure what each of the two was worth. Nine steps in the Illumination Analyzer, every number from our own runs.
Point a camera just off the sun and you get more than the picture. A bright source outside the frame still puts light on the sensor, by reflecting twice inside the glass, by skimming a rim, by bouncing off the sensor and back off a lens face. That light is not an aberration and it does not sharpen with a better design. Engineers call it stray light; the part of it that reflects an even number of times still forms an image, and that is a ghost. In a real lens it sets the contrast floor, and Fresnel reflection at an uncoated surface is what feeds it.
This guide takes one lens through a sequence of runs and reads what each one changed. It finds two different problems and buys a different fix for each.
What you get at the end
A ranked table of the paths that put light on the sensor, with an error bar on each row; the fraction of the sensor's light that is not the picture, under two kinds of illumination; and a measured answer, for each of them, to "what should I spend money on" — for this lens, not for lenses in general.
Importing a design as a lens prescription is a Plus feature; running the audit on the server and coating an imported element are Illumination Analyzer Pro. Every number, table and picture on this page is from our own runs, and you can read all of them without an account.
Step 1
Import the lens
Import the triplet from Designing a camera triplet, start to finish — a 100.13 mm f/4.5 lens in three catalog glasses, N-PSK53, LLF1 and TAF1 — and the Analyzer offers to build the rest of the camera around it: a source, a sensor, and a housing in three parts. Any prescription you have saved from the Ray-Optics Designer works the same way.
An imported prescription carries glass and curvature and nothing about the metal around it, so everything that is not the lens is something you choose. What each derived number comes from.
The import reports three elements, each of them coatable and none of them cemented. That matters in step 8: a cemented pair cannot take a coating between its glasses, and this lens has no such pair.
How to do this in Illumination Analyzer
- Where.
Design ▾→ Import from a lens design….- What to set.
- Pick the saved triplet, then accept the offer.
- What you should see.
- The dialog names the stop twice — Aperture stop, the surface the record names, and Stop annulus, what the mapping made of it. They are one thing seen from two sides.
Step 2
Run the lens bare
Give the sensor a 5 % reflectance, because a real sensor is a mirror at that level, and run.
Of the light the source emits, 42.2 % reaches the sensor. Almost all of it is the picture: the image lands in 2 cells of 10,880, and 1.47 % of what arrives is not the image.
Every uncoated glass-air surface reflects between 4 and 8 % of the light that hits it, so a six-surface lens has fifteen ways for light to arrive after reflecting twice.
That 1.47 % is the whole subject of the guide. It is small, it is never zero, and the rest of these steps are about where it comes from and what makes it smaller.
How to do this in Illumination Analyzer
- Where.
- The sensor element's property panel.
- What to set.
- Property Mirror, Reflectance ρ
0.05. Then Run. - What you should see.
- 16,000 rays in 16 batches, about a minute on the server, and a single bright spot under Irradiance.
Step 3
Take the aperture stop out, and put it back
Untick the stop and run. The stop is part of the lens design — it is what gives the lens its f-number and its pupil — and it is also a piece of metal that absorbs light. Those are two different jobs, and the only way to see the second one is to take the first one away.
The sensor reading goes up 69.6 % on axis.
An aperture stop enforces the clear aperture a prescription declares, and glass keeps transmitting past it.
The measurement says exactly that. With the stop in, the widest ray that forms the image crosses its plane at 10.037 mm, against a hole of 10.072 mm — it rides the edge. Take the stop out and the glass keeps transmitting to 11.061 mm, the edge of the blank, and the image gains 6.6 % of light the design never allowed for. That is what makes the f-number a real number rather than a nominal one.
With the stop out there is a second row, and it has no path at all: light that reaches the sensor without touching a single optical surface, 1.2 % of what arrives. It appears only on axis. With the source off to the side the geometry closes it, and it is absent from the ranked list entirely.
And the stop is the hardest-working piece of metal in the camera. Put it back, look at where the emitted light ends up rather than at the sensor, and the stop absorbs 41.4 % of the emitted watt on its own. There is a cleaner way to see what that means. The stop's own outer edge reaches out to 28.2 mm; shrink it to 14.2 mm and it absorbs 8.8 points less of the watt — and the sensor reading is identical to the last bit. Eight per cent of the light, intercepted, none of which was ever going to the sensor. That is the whole idea of a baffle in two numbers, and it is worth holding on to, because the housing, when it arrives, has to earn its place against this one.
Put the stop back before going on. Every number after this has it in.
How to do this in Illumination Analyzer
- Where.
- The imported lens's panel.
- What to set.
- Untick Stop as its own element, run, then tick Add the aperture stop as an element.
- What you should see.
- Unticking re-imports the lens without the annulus and reveals the second row, which puts it back at the lens's own slot. Ticking that row clears the removal in the same edit: the two controls are one decision.
Step 4
Change the source to a scene
Swap the source for one that fills the frame and run. Every run so far has used a single collimated beam, which is a laboratory source: one direction, like a star. A camera points at a scene, and a scene fills the field. The tool calls it a **Lambertian rectangle** — a flat panel that emits in every direction, which is what a lit scene does.
A single beam down the axis can only illuminate what is on the axis; a scene illuminates the inside of the tube.
Now open the energy ledger. Every arrival is filed under the sequence of surfaces it touched, and the table ranks those sequences by the power each delivers. Under a scene the ranked list has a very short story to tell: the top row is the picture, and the second row has no path at all.
A ghost is named by its path: the list of things it touched, in the order it touched them. How a path is named.
That second row is light reaching the sensor having touched nothing at all — straight past the glass, down the inside of the barrel — like the row the stop revealed in step 3, but a different one, and this time it is nine tenths of the problem. It is more than 90 % of the non-image light, and the row below it is fifty times smaller.
This is the number to write down: the contrast floor, how much non-image light sits on top of the picture. Right now it is 12 %. Twelve per cent of the picture's brightness, laid over the picture, from nothing but a lit panel in front of an unhoused lens.
How much of the light this list accounts for, and why the bars are wider
The list keeps the 4,096 strongest sequences and sweeps the remainder into one row at the bottom, printed everything else. On this run that last row is 0.043 % of the light, so the ranking is not in doubt — but the list is the strongest few thousand paths, not all of them, and the page says so rather than implying otherwise. A scene is also expensive to trace: it emits into a whole hemisphere from a meter in front of the lens, so fewer than one ray in 8,000 lands on the sensor at all. Our run traced 20,000,000 rays, the largest single run the server will take at one wavelength, and collected 2,346 arrivals in the picture. That is why this step's error bars are wider than the earlier ones — the picture is known to 2.0 % and the row under it to 6.6 %, against a few tenths of a percent in the runs before.
How to do this in Illumination Analyzer
- Where.
- The source's panel, then Energy ledger.
- What to set.
- Change the source to Lambertian rectangle, set Position (m) to
0,0,-1, Half-edge u (m) to0.1798and Half-edge v (m) to0.1198. Then Run. - What you should see.
- A ranked table whose second row carries no path at all.
Step 5
Add the housing
Tick the front ring, the barrel and the sensor shroud together and run.
The second row is gone. Not smaller — absent from all 4,096 rows. The housing removes more than 90 % of the non-image light, and the contrast floor goes from 12 % without the housing to 0.87 % with it.
A baffle cannot stop light that was never going to arrive; it earns its place on the light that was.
That is the whole case for a lens barrel in one comparison, and it is worth seeing why it worked here when the stop in step 3 did so much of the work already. The stop closes the hole the light goes through. The barrel and the shroud close the space beside it — and under a scene, the space beside it is where nine tenths of the problem was coming from.
And once they are in, the stop's outer rim stops mattering at all: shrink it back to the barrel's radius and the sensor does not change by a single bit. That is step 3's two-number result again, with the housing now doing the intercepting.
How to do this in Illumination Analyzer
- Where.
- The import offer's Housing group.
- What to set.
- Tick the front ring, the barrel and the sensor shroud together, then Run.
- What you should see.
- In Energy ledger, the row with no path has left the table.
Step 6
Give the housing a real finish
Give the housing a real finish and run it twice. So far the walls have been perfect absorbers, which is the conservative default and not a material you can buy.
Bare machined aluminum — a specular metal wall, reflectance 0.916 at 550 nm — raises the non-image light by more than a factor of four. Blackened aluminum — anodized, reflecting 11 % of what hits it — raises it by 5 %. Perfect black, bare metal, and the honest black in between.
A wall that does not absorb does not stop being in the way; it becomes a second source.
What bare metal does is not what you might expect. It does not block anything a black wall does not block — an absorber is strictly the more removing of the two. What it does is add paths: the metal wall puts new sequences into the ranked list led by the sensor shroud, the cone right in front of the sensor, and the barrel appears in the top rows for the first time in the whole guide. Blackening is not about stopping light. It is about not re-emitting it.
And the honest black costs something measurable, but only just: a real anodized wall is 5 % worse than the perfect absorber the tool assumes by default, a figure this run knows to within 2 points. Small, and it is the difference between a model and a finish.
How to do this in Illumination Analyzer
- Where.
- Each housing part's own property panel.
- What to set.
- For bare metal, property Fresnel interface, then Add a layer stack with one layer, material
Al, Thickness (nm)200. For blackened metal, property Lambertian, Reflectance ρ0.1123. - What you should see.
- The metal wall adds rows led by the sensor shroud; the black wall barely moves the table.
Step 7
Aim the source off to the side
Set the walls back to the tool's own perfect absorber — step 6 measured what a real finish costs, and from here the question is the glass — then move the source to 12° and run again. What comes back is a different problem.
The picture leaves the sensor — 12° is just outside the frame — and what is left is all stray light: 0.00103 W, a thousandth of what the source emits. The ranked list is a different shape now. There is no row without a path; the geometry closes it. Instead there are six rows within a factor of eight of each other, every one of them a sequence of reflections inside the glass. The leading row is a double reflection inside the rear element; the next is a bounce between the middle element's front and the front element's back.
A ghost reflects an even number of times, so it is still an image — just one the design never asked for.
One more thing the stop is doing, now that the source is off to the side. Take it out again here and the sensor reading is ×64 what it was: what arrives is a second, unfocused image formed by the rear element alone, from light that missed the front two, and at 12° that one path is 82 % of everything on the sensor. The stop was not only setting the f-number. Put it back.
The housing you built in steps 5 and 6 does nothing about any of them. It is still in the scene and it is not idle — it absorbs 28.7 % of the emitted watt while the stop's share falls to 17.6 %, so the three housing parts are taking real work off the stop. None of that light was reaching the sensor. Which is the whole lesson of this audit: the fix that removed nine tenths of the problem two steps ago removes none of this one, and which source you test with decides which fix you buy.
How to do this in Illumination Analyzer
- Where.
- Each housing part's property panel, then the source's.
- What to set.
- Set the three housing parts back to Absorber. Then set Aim angles (°) to 12 and press Run.
- What you should see.
- The picture leaves the sensor, and the table under Energy ledger fills with reflection sequences instead of one bright row.
Step 8
Coat the glass
Coat all six glass-air surfaces and run again. Those six surfaces are what feeds every row in the table.
A coating is designed against one glass and one wavelength, and this lens has three different glasses. So it takes three designs, not one: a two-layer V-coat on each element, tuned to 550 nm against that element's own index. Designing an AR coating, start to finish is the sibling guide that designs one of these; this one buys them.
| glass | MgF₂ | Ta₂O₅ | |
|---|---|---|---|
| Lens 1 | N-PSK53 | 78.4 nm | 111.6 nm |
| Lens 2 | LLF1 | 74.0 nm | 111.6 nm |
| Lens 3 | TAF1 | 111.9 nm | 13.6 nm |
Run it and the stray light falls by more than a factor of 2,400, while the picture gets 45 % brighter.
A ghost reflects twice, so halving a surface's reflectance quarters the ghost it feeds.
Coat one element instead and something odd happens: the total falls by only 27 %, and fifty rows in the table get brighter. That is not a mistake. A coated first element transmits more light to everything behind it, so every ghost that does not bounce off the coated surface is fed more. Coat all three and no row rises at all — every ghost now carries two reflections and both of them are on coated glass. A partial coating moves light around; a finished one removes it.
| the chain | stray light at 12° | against uncoated |
|---|---|---|
| uncoated | 0.00103 W | — |
| one element, one quarter-wave | 0.000748 W | ×0.73 |
| all three, one quarter-wave | 1.73 × 10⁻⁵ W | ×0.017 |
| all three, V-coats | 4.25 × 10⁻⁷ W | ×0.00041 |
There is a picture of this, and you have to work for it. With all three elements V-coated the ghost is so weak that at the sensor's own grid not one cell collects ten rays in a 16,000-ray run, and the tool draws nothing it has not measured. Two changes fix that: coarsen the sensor to 32 × 21 bins — the same light in cells sixteen times larger — and raise the run to 320,000 rays. Then every cell of the map is measured, each to about a quarter of its own value. A stray-light run gets harder to measure exactly as the design gets better, and that is what it costs here.
The total was solid all along — it is known to 5.5 % at 16,000 rays — the three leading paths are each known to better than 10 % of their own value, and the ghost tree is now small enough to be listed completely, 639 sequences with nothing left over.
Then put the two maps side by side on one color scale, the uncoated run's, and the comparison needs no arithmetic: the coated sensor is black. Not dimmer. Black — the dimmest cell of the uncoated sensor is nineteen times the brightest cell of the coated one, so the whole coated map lives below the bottom of the scale that draws the uncoated one. What is left of the ghost only appears when the coated map is drawn to its own peak, four hundred times lower, and then it is two small spots near one edge of the frame rather than a faint copy of what was there before.
How to do this in Illumination Analyzer
- Where.
- The imported lens's panel: Coating — Lens 1, Lens 2 and Lens 3.
- What to set.
- In each, Add a layer stack, then two layers —
MgF2first, thenTa2O5 (Gao)— at that element's two thicknesses. Type or paste each thickness; do not use the arrow keys. For the map, set the sensor's Bins across u to32and Bins across v to21, and Rays to320000. - What you should see.
- A table that has dropped three orders of magnitude, a picture that has not, and a map with no hatching left in it.
Step 9
Take the ranked table with you
Export the ranked table. It is the deliverable: every path that put measurable light on the sensor, named by the surfaces it touched, with the power it delivered and the uncertainty on that power.
How to do this in Illumination Analyzer
- Where.
- Energy ledger, under the path table.
- What to set.
- Press Download CSV.
- What you should see.
- One row per path, with its power and its error bar, in the order the table ranks them.
What this model does not include
Five things, and each of them would change a number above.
- The sensor is a 5 % mirror, flat across angle and wavelength. A real sensor has a microlens array and a cover glass, and its reflectance is neither flat nor gray.
- The housing is geometry with a surface property. No threads, no fasteners, no adhesive, no texture.
- Bulk absorption in the glass is not modeled — the catalog carries no internal-transmittance data, and the import says so on every run.
- Every run is monochromatic at 550 nm. Real ghosts are colored, and the color comes from the band edges of the coatings — a coating problem rather than a geometry one.
- A path is named by the elements it touched, not the faces. Two ghosts that reflect off different sides of the same element are one row, and the power printed for that row is their sum.
References
- E. Fest, Stray Light Analysis and Control (SPIE Press, 2013), ch. 6. The anodized-aluminum BRDF fit — Eq. (6.1) with the coefficients of Table 6.3 — whose integrated scatter at 5° incidence is the 0.1123 this guide gives the blackened wall.
- A. D. Rakić, "Algorithm for the determination of intrinsic optical constants of metal films: application to aluminum," Appl. Opt. 34, 4755 (1995). The aluminum the bare wall is made of.
- L. Gao, F. Lemarchand and M. Lequime, "Exploitation of multiple incidences spectrometric measurements for thin film reverse engineering," Opt. Express 20, 15734 (2012). The Ta₂O₅ of the V-coats.
- M. J. Dodge, "Refractive properties of magnesium fluoride," Appl. Opt. 23, 1980 (1984), ordinary ray. The MgF₂ of the V-coats and of the single-layer comparison.
- The three glasses are catalog entries — Schott N-PSK53 and LLF1, Hoya TAF1 — and the lens itself is the one designed in Designing a camera triplet, start to finish.
Open the finished camera in Illumination Analyzer, or read how every panel and number on this page is produced in the Illumination Analyzer manual.