fullseye

stokes_from_jones — OPTICS polarization op

使い方

Jones vector -> Stokes vector (the four measurable intensities).

S0 = |Ex|^2 + |Ey|^2 · S1 = |Ex|^2 - |Ey|^2 · S2 = 2*Re(Ex*conj(Ey)) · S3 = 2*Im(Ex*conj(Ey)).

In this convention (exp(-i*omega*t) time dependence) S3 > 0 is right-circular: the Jones vector [1, -i]/sqrt(2) maps to [1, 0, 0, +1]. (Cross-checked 2026-09-18: pypolar’s jones_to_stokes gives the opposite S3 sign for the same vector — the other textbook convention — while the Mueller matrices of every element agree with pypolar, py-pol and polanalyser to 1e-16. See tests/test_polarization_external_diff.py.) The convention is pinned by a test rather than left to the reader, because every textbook picks a different one and a sign slip here is invisible in intensity measurements.

What the sign means on an image (2026-10-23). Ex is along the rows (+x right) and Ey down the rows (+y down), as for every camera op. The S3 > 0 vector [1, -i]/sqrt(2) has field (cos wt, -sin wt): it turns from +x toward -y, counter-clockwise on the displayed image, i.e. as seen by the camera receiving the beam. The word "right" that :func:stokes_analyze attaches to S3 > 0 is the name of the same vector in a y-up frame (where it turns clockwise as seen by the receiver); it is kept for compatibility, and tests/test_polarization_per_pixel_2026_10_23.py pins the on-screen sense by sampling E(t).

Returns a (4,) float64 vector. A Jones vector always describes fully polarised light, so the result always satisfies S0^2 = S1^2+S2^2+S3^2 exactly (degree of polarisation 1) — verified to 1e-15 in the tests. That identity is also the reason Jones cannot represent a partially polarised beam: for that, start from :func:mueller_element instead.

Raises ValueError: state is not a 1-D 2-vector, is masked, or is non-finite.

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

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

詳しい使い方ガイド

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

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

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

mueller_apply · stokes_analyze

同カテゴリ(polarization)

jones_element · jones_apply · mueller_element · mueller_partial_polarizer · mueller_apply · stokes_analyze · polarization_demosaic · polarization_demosaic_color


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

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