chromatic_confocal_height — INTERFEROMETRY chromatic op

数据种类:sweepmeasurement

调用:import interferometry; interferometry.chromatic_confocal_height(spectrum, wavelength_start_nm=500.0, wavelength_step_nm=0.5, dispersion_um_per_nm=0.2, reference_wavelength_nm=600.0, mode='gaussian', subtract_background=True, min_visibility=0.3, min_peak_bins=2.0, max_carrier_fraction=0.1)(或 opsinterferometry.get("chromatic_confocal_height"))

用法

由一条共焦回光光谱求表面高度 —— 波长就是高度。

> 以下的详细说明为原文 —— 摘要与标题已翻译。

The inverse of :func:chromatic_confocal_simulate. Find the peak wavelength

of the spectrum, then::

height = (lambda_peak - reference_wavelength_nm) * dispersion_um_per_nm

No scan, no moving parts, one spectrum per point — which is why this family

reaches sampling rates a z scan cannot, and why it is limited to the axial

range the objective's chromatic spread covers.

The four *mode* estimators are :data:ESTIMATORS, identical to

:func:csi_peak_position's and sharing its implementation. `"gaussian"` is

exact for a Gaussian confocal response (measured 0.0e+00 to 3.6e-15 um),

*including when the peak is narrower than one bin and when it sits two bins

from the band edge* — the logarithm of a sampled Gaussian is a parabola

whatever its width, and the fit is local. That exactness is a property of

noiseless data only, which is what *min_peak_bins* is about.

spectrum: 1-D non-negative intensities across the spectrometer.

wavelength_start_nm / wavelength_step_nm: the spectrometer axis.

dispersion_um_per_nm: the axial chromatic calibration constant.

reference_wavelength_nm: the wavelength that focuses at height 0.

subtract_background: subtract the spectrum's median before locating the peak.

On by default because a pedestal drags the `centroid`

estimator toward the middle of the band exactly as it

drags the CSI centroid toward the middle of the scan.

min_visibility: refuse a spectrum whose peak prominence

`(max-median)/max` is below this — a flat spectrum has

no focused wavelength and its argmax is noise.

min_peak_bins: refuse a peak whose full width at half maximum spans

fewer than this many bins. Undersampling does not break

the noiseless algebra, but it destroys its noise

rejection. Measured at 1 % noise (1000 peak counts,

sigma_n = 10, 100 trials), RMS error in locating the

peak against the number of bins across its FWHM:

0.5 bins -> 0.256 nm

1.0 bins -> 0.137 nm

2.0 bins -> 0.010 nm

4.0 bins -> 0.030 nm

8.0 bins -> 0.118 nm

Two bins is the optimum and a half-bin peak is 25x

worse, from a spectrum that looks perfectly healthy —

hence the default of 2. Note the curve turns around

again: a very *broad* peak is also bad, because the

three-point fit then sits where the curvature is tiny

and noise dominates it. "More samples is better" is

false here and this operator does not claim it. Set to

0 to disable the check if you know your data is

clean.

max_carrier_fraction: refuse a spectrum whose dominant alternating component

sits above this fraction of the Nyquist frequency. A

confocal response is one smooth peak and all of its AC

content is at low frequency (measured: dominant bin at

0.010 of Nyquist for a 4 nm peak, 0.010 for a 1 nm peak,

0.015 with 5 % noise). A z-scan interferogram put in

here instead sits at 0.333 — its fringe carrier — and

without this check its carrier's argmax would come back

as a focused wavelength and therefore as a plausible,

finite, wrong height. This is the guard that lets the

two 1-D families share one type pool safely. Pass 0 to

disable.

Returns the height as a float, in micrometres. It may be negative — a height

is signed, unlike a time-of-flight distance.

Raises `ValueError`: a non-1-D / empty / too-short (< 3) / non-finite /

complex / masked *spectrum*, a *spectrum* over :data:MAX_SCAN_POINTS

elements (checked before the float64 promotion), any negative intensity

(a spectrometer cannot read negative light; clip explicitly if this is a

pre-subtracted spectrum), a non-positive step / dispersion / reference

wavelength, an unknown *mode*, a peak prominence below *min_visibility*, a

peak narrower than *min_peak_bins*, and a peak on the first or last bin

(the surface is outside the calibrated axial range, which is

`+-(band_nm/2) * dispersion_um_per_nm` about the reference).

详细使用指南

coherence_scanning 族使用指南

参考(示例数据・文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

• 算法的正典(作者・年份)与用途见上面的族使用指南

可运行的示例(实际调用该算子并已验证的样例)

coherence_scanningpy -3.11 examples/coherence_scanning.py

类型可衔接的下一个算子(可接受 measurement 作为输入)

同类别(chromatic)


*Provenance: interferometry.py — INTERFEROMETRY 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.