fullseye

stokes_analyze — OPTICS polarization op

使い方

Read a Stokes vector: degree of polarisation, azimuth, ellipticity.

Returns a dict: intensity S0 · dop degree of polarisation sqrt(S1^2+S2^2+S3^2)/S0 · dolp linear part sqrt(S1^2+S2^2)/S0 · docp circular part |S3|/S0 · azimuth_deg orientation of the polarisation ellipse 0.5*atan2(S2, S1) mapped into [0, 180) · ellipticity_deg 0.5*asin(S3/|S|) in [-45, +45] · handedness one of "right" / "left" / "linear".

azimuth_deg and ellipticity_deg are None when they are undefined — azimuth when the linear part is exactly zero (circular or unpolarised light has no orientation), ellipticity when the polarised part is zero (unpolarised light has no ellipse). Returning 0.0 there would be a fabricated angle; None says the truth and forces the caller to handle it.

Ground truth it reproduces exactly: [1,1,0,0] -> dop 1, azimuth 0, ellipticity 0, linear; [1,-1,0,0] -> azimuth 90; [1,0,1,0] -> azimuth 45; [1,0,0,1] -> docp 1, ellipticity +45, right-handed; [1,0,0,0] -> dop 0 with both angles None; [2,1,0,0] -> dop 0.5 (a partially polarised beam, which is exactly the case Jones algebra cannot express).

Raises ValueError: stokes is not a 1-D 4-vector, is complex / masked / non-finite, is unphysical (S0 < 0 or degree of polarisation above 1 — which is how you find out a Mueller matrix was not physical), or has S0 == 0 (no light at all: every ratio would be 0/0, and “the polarisation of darkness” is not a question with an answer).

ファミリ共通の入力契約(fail-closed)

optics の全 op は入力を検証してから計算する(黙って通さない):

詳しい使い方ガイド

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(table を入力に取れる)

abcd_matrix · wavefront_stats · paraxial_trace · seidel_coefficients · spot_stats · tolerance_analysis · wavefront_from_opd · spot_diagram

同カテゴリ(polarization)

jones_element · jones_apply · stokes_from_jones · mueller_element · mueller_apply


Provenance: optics.py — OPTICS operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。

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