Lenses & opticsExplainer

Focus shift across wavelengths: why visible and SWIR won't stay sharp

Why a lens focused at visible wavelengths is soft at SWIR bands, how far the focus shift moves across the sensor, and when apochromatic correction is needed.

LumaSpec Vision10 min read Share on LinkedIn

On this page 10 sections
  1. 01Why one lens cannot hold two wavelengths
  2. 02The shift in pixels: a 25 mm lens from 550 nm to 1550 nm
  3. 03What the correction labels actually buy
  4. 04Which range your job needs
  5. 05Stopping down buys depth, not resolution
  6. 06The ten-minute bench test before you commit
  7. 07When the standard advice is wrong
  8. 08Checks before you order
  9. 09Where to start
  10. 10Questions

A lens that nails focus under white light can hand you a smear the moment the illuminator switches to a SWIR band. Nothing is broken. Glass refracts short wavelengths more strongly than long ones, so every wavelength in your sequence wants its own focal plane. For anyone sequencing visible and SWIR bands through one InGaAs camera, the question is how big that focus shift is and when it hurts. The numbers below put it in pixels: an uncorrected focus group drifts about 0.8 mm between 550 nm and 1550 nm, which is roughly 60 pixels of blur at F2.8 on a 5 µm sensor. The decision follows from that number: one narrow band per pass works with a standard SWIR lens, while interleaved bands on one sensor need a lens corrected across 400–1700 nm.

Why one lens cannot hold two wavelengths

Refractive index climbs as wavelength falls. A common crown glass reads n = 1.518 at 550 nm and n = 1.501 at 1550 nm, straight from its dispersion data. A thin lens element draws all of its power from the (n − 1) term, so its focal length stretches as the wavelength grows:

1/f = (n − 1) · K K: surface curvature term, fixed by geometry Δf ≈ f · Δn / (n − 1) focal shift between two wavelengths, one glass type

Across 550 to 1550 nm that is Δn/(n − 1) = 0.017/0.518, about 3.3% of focal length, before any correction. Blue bends hardest and focuses closest to the lens, red sits farther back, and the long-wave end sits farther still. A sensor seated on the 550 nm plane stands in front of the SWIR cone, so the SWIR channel defocuses.

Designers fight this by mixing glasses. An achromatic pair brings two wavelengths to a common focus; an apochromatic design brings three, and floating groups hold the plane as working distance changes. When a data sheet prints a span such as 400–1700 nm, that span is the maker's claim of one usable focal plane. A lens printed 900–1700 nm makes no focus promise below 900 nm, however well it transmits there. The thermal, SWIR and UV lens category sorts by exactly this span, and the SWIR and UV lens basics cover what else changes outside the visible band.

The shift in pixels: a 25 mm lens from 550 nm to 1550 nm

The inputs, with their sources:

  • Focal length 25 mm — the standard C-mount prime class in the category above.
  • Crown-glass dispersion: n = 1.518 at 550 nm and n = 1.501 at 1550 nm.
  • Sensor: InGaAs at 5 µm pitch, the common pitch for Vis-SWIR parts.
  • Aperture F2.8, focus locked on a 550 nm pass.
  • Working distance at least ten focal lengths, so the blur rule below needs no magnification term.

Three rules, in words. A single-glass group moves the focal plane by Δf ≈ f · Δn/(n − 1). The sensor tolerates a defocus of ±2λN² before the image degrades — the quarter-wave budget. A defocus Δ blurs each point into a disk of roughly Δ/N.

The arithmetic, at the long-wave end:

  • Δn = 1.518 − 1.501 = 0.017
  • Δf = 25 mm × 0.017 / 0.518 = 0.82 mm, so the SWIR plane sits 0.82 mm behind the locked 550 nm plane
  • Quarter-wave budget at that wavelength, F2.8: 2 × 1.55 µm × 2.8² = 24 µm
  • Overshoot: 820 µm / 24 µm ≈ 34 times
  • Blur disk: Δ/N = 820 µm / 2.8 = 293 µm, and 293 µm / 5 µm = 59 pixels across

Fifty-nine pixels of blur against a 24 µm budget is not a tuning problem; it is a different optical requirement. The threshold that matters: every wavelength you fire must land within ±2λN² of the shared plane, and at F2.8 on the SWIR band that budget is 24 µm. The uncorrected group misses it 34-fold. The shift grows in direct proportion to focal length — a 50 mm lens drifts about 1.6 mm — and to the glass's dispersion; only extra glass types shrink it. That leaves two routes, a lens corrected across the span or a refocus per band, and the rest of this page sorts them.

What the correction labels actually buy

Inside the band it was corrected for, an achromat holds its residual focus spread tens of times below a single glass type. Step outside that band and the correction stops helping: an achromat tuned to visible lines does not extrapolate to the long-wave end. Apochromatic designs extend the common plane over more of the spectrum, and floating-element versions hold it across working distance as well — the property a sequential-band station lives on. Read the printed span as the honest summary: 400–1700 nm for visible plus SWIR on one sensor, 900–1700 nm for SWIR-only bands, 240–1000 nm where a UV pass joins the visible.

For a station firing visible and SWIR bands through one sensor, the printed span is the first spec to shop. The 25 mm LS-SWL-0246 covers 400–1700 nm at F1.8 on a 1/2" format:

Thermal, SWIR & UV lenses25 mm SWIR lens, 400-1700 nm, 1/2", F1.8, C-mount (LS-SWL-0246)LS-SWL-0246
Sensor format
1/2"
Mount
C-mount
Resolution
Up to 3 MP
Image circle
Up to 8 mm
$945.00View partBuild a system with it

Which range your job needs

Job at the station Focus rule Lens span to demand
One SWIR band, say 1550 nm for moisture or sorting Focus once at the band, lock 900–1700 nm
Visible pass plus SWIR pass, one InGaAs sensor Every band inside one corrected span 400–1700 nm
Hyperspectral stack, 400–1000 nm Broadband span plus edge-band check Span matching the camera
UV pass plus visible on one camera UV-corrected glass 240–1000 nm

Single-band SWIR work has no conflict to correct: focus at the working wavelength and stay there. The 25 mm, 5 MP LS-SWL-0207 fits 2/3" sensors, and the 35 mm, F1.4 LS-SWL-0229 prints 900–1700 nm for 1" sensors. Pick by sensor format and field of view:

Thermal, SWIR & UV lenses25 mm, 2/3", 5 MP, C-mount SWIR lens (LS-SWL-0207)LS-SWL-0207
Type
SWIR
Sensor format
2/3"
$669.00View part
Thermal, SWIR & UV lenses35 mm SWIR lens, 900-1700 nm, 1", F1.4, C-mount (LS-SWL-0229)LS-SWL-0229
Sensor format
1"
Mount
C-mount
$715.00View part

A hyperspectral camera takes sequential bands to the limit: the LS-HSC-0004 sweeps 400–1000 nm in 1200 bands over USB3, all through one focal plane. Filter the lens list by printed span first, then make first-band and last-band sharpness a commissioning step. The planning method in spectral imaging material classification slots focus checks straight into its validation pass, and the hyperspectral imaging explainer settles whether a hyperspectral camera earns its place against RGB or filtered setups in the first place.

Stopping down buys depth, not resolution

The budget scales with the square of the f-number. At the long-wave end, on the same 5 µm sensor:

Aperture Quarter-wave budget ±2λN² Diffraction spot 2.44λN The 0.8 mm uncorrected shift
F1.4 ±6 µm 5.3 µm ≈ 1.1 px 137× over
F2.8 ±24 µm 10.6 µm ≈ 2.1 px 34× over
F5.6 ±97 µm 21 µm ≈ 4.2 px 8× over
F8 ±198 µm 30 µm ≈ 6 px 4× over

Each f-stop multiplies the budget by two and the diffraction spot by 1.4. Closing to F5.6 absorbs residuals up to about 97 µm — enough for a good broadband lens, hopeless for 0.8 mm. Past F8 the spot alone spans six pixels; if the defect you hunt is two pixels wide, diffraction erased it before defocus did. Compute the trade at your own working distance and pixel size with the depth of field calculator:

Depth of field and diffraction
Units
Depth of field
– mm
About the focus plane
– mm
Diffraction limit
– F/#
Blur limit
– µm
Diffraction spot
– µm
At this F-number
–

DOF ≈ 2 × N × c × (1 + m) / m², c = allowed blur × pixel size. Diffraction spot (Airy disk) ≈ 2.44 × wavelength × N × (1 + m); past the diffraction limit it is larger than the blur you allowed.

Browse lenses by aperture and format Open the full calculator

The ten-minute bench test before you commit

  1. Put a high-contrast target — a razor edge or a star chart — at the working distance. Light it with band A and lock focus.
  2. Swap the illumination to band B, for example a long-wave bandpass on a broadband source. Do not touch the barrel.
  3. Grab an image and measure the blur across the edge in pixels.
  4. Convert with Δ ≈ b × N. At F2.8, 12 pixels of blur on 5 µm pixels give b = 60 µm, so Δ ≈ 168 µm — well past the 24 µm budget, so band B needs its own focus or a corrected lens.
  5. Rack focus until band B sharpens and note the mechanical offset. That number is the per-band refocus, or the stage travel, your sequence would need.

Run it at both ends of your span. The strict end is the visible one: at 550 nm and F2.8 the budget shrinks to 2 × 0.55 µm × 2.8² = 8.6 µm, about a third of the SWIR figure.

When the standard advice is wrong

  • Single-band stations should not buy apochromatic glass. One wavelength means one focus point, and a band-corrected lens stays simpler and sharper in band.
  • Refocus between passes is a design, not a workaround. If a stage repeats to within half the budget — 12 µm at F2.8 — store a position per wavelength and move between them; the cost is one motion per band.
  • Focus drifts with temperature as well as wavelength. A line warming through the morning shifts the plane even at a fixed band; the infrared lens athermalization guide works that problem.
  • Choose the band before the glass. If your contrast already exists at 940 nm, the visible-versus-SWIR conflict never arises; the SWIR vs NIR vs visible guide sorts that choice first.

Checks before you order

  • The printed wavelength span covers every band in the sequence — filter by it in the lens finder.
  • The image circle covers the sensor diagonal at the working aperture.
  • The bench-tested residual at your extreme bands sits inside ±2λN², measured rather than assumed.
  • Mount and flange distance match the camera; the camera lens adapter focus guide walks the fit and focus check.
  • One afternoon on the bench settles what no spec table will: the same test-before-you-commit discipline the reflected UV inspection guide argues for.

Where to start

Shortlist by span, format and field of view in the lens configurator, or send your band sequence through the contact page and we will run the budget arithmetic with you.

Questions

Can I just refocus between the visible and SWIR passes?

Yes — the shift is deterministic. Measure the offset between your bands on the bench, then move the sensor or barrel by that amount per band. The mechanism must repeat to within half the focus budget: about 12 µm at F2.8 on a 5 µm InGaAs sensor. A motorized focus stage that repeats to a few microns does this; the cost is cycle time, one extra motion per wavelength in the sequence. At production rates, apochromatic glass removes the move entirely.

Does stopping the lens down fix the focus shift?

It buys depth at a resolution cost. The budget scales with N²: ±6 µm at F1.4, ±24 µm at F2.8 and ±97 µm at F5.6 for the SWIR band. Diffraction grows in step: 2.44 λ N spans 5.3 µm at F1.4 to 21 µm — over four pixels — at F5.6. Closing down rescues residuals of tens of microns; it can never rescue an uncorrected 0.8 mm shift between bands.

Is this the same thing as the colour fringes I see in images?

No. Color fringing is lateral chromatic aberration: each wavelength takes a slightly different magnification, so high-contrast edges grow colored skirts while staying sharp. The problem here is longitudinal: each wavelength lands at a different depth, so the centre of the image defocuses too. A lens can suppress fringing and still carry a large focus shift, which is why focus gets tested band by band rather than judged from one white-light image.

Do hyperspectral cameras have the same problem?

More than most. A scanner such as the LS-HSC-0004 records 400–1000 nm in 1200 bands through one lens, so every band shares a single focal plane; focus set mid-span leaves the edge bands carrying whatever residual the lens has. Make first-band and last-band sharpness part of commissioning rather than a surprise at the customer, and filter the lens list by printed span before you shortlist anything.

What does apochromatic actually mean for a machine vision lens?

An achromat brings two wavelengths to one focal plane; an apochromat brings three and corrects the chromatic variation of spherical aberration, so the residual focus spread across the working spectrum stays small. For Vis-SWIR work the practical test is the printed range: a lens that states 400–1700 nm is built to hold focus across that whole span, which is what sequential visible-plus-SWIR passes on one sensor need. Verify the span covers your bands before trusting the label.