{"id":32155799,"url":"https://github.com/juliaremotesensing/transitionmatrices.jl","last_synced_at":"2026-06-10T05:01:01.590Z","repository":{"id":97378456,"uuid":"603687427","full_name":"JuliaRemoteSensing/TransitionMatrices.jl","owner":"JuliaRemoteSensing","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-04T05:04:16.000Z","size":1565,"stargazers_count":16,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-06-04T06:13:13.783Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuliaRemoteSensing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-19T09:23:30.000Z","updated_at":"2026-06-04T04:16:17.000Z","dependencies_parsed_at":"2025-09-05T13:42:17.211Z","dependency_job_id":"ed2f5ba9-1a9a-4774-8122-f4fa65cc8e17","html_url":"https://github.com/JuliaRemoteSensing/TransitionMatrices.jl","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/JuliaRemoteSensing/TransitionMatrices.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaRemoteSensing%2FTransitionMatrices.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaRemoteSensing%2FTransitionMatrices.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaRemoteSensing%2FTransitionMatrices.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaRemoteSensing%2FTransitionMatrices.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaRemoteSensing","download_url":"https://codeload.github.com/JuliaRemoteSensing/TransitionMatrices.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaRemoteSensing%2FTransitionMatrices.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34137570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-21T12:14:56.802Z","updated_at":"2026-06-10T05:01:01.583Z","avatar_url":"https://github.com/JuliaRemoteSensing.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TransitionMatrices.jl\n\n[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaRemoteSensing.github.io/TransitionMatrices.jl/dev/)\n[![Build Status](https://github.com/JuliaRemoteSensing/TransitionMatrices.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaRemoteSensing/TransitionMatrices.jl/actions/workflows/CI.yml?query=branch%3Amain)\n[![Coverage](https://codecov.io/gh/JuliaRemoteSensing/TransitionMatrices.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaRemoteSensing/TransitionMatrices.jl)\n\nThe transition matrix method, or **T-Matrix method**, is one of the most powerful and widely used tools for rigorously computing electromagnetic scattering by single and compounded particles. `TransitionMatrices.jl` is a generic, arbitrary-precision Julia implementation focused on this method.\n\n📖 **[Documentation](https://JuliaRemoteSensing.github.io/TransitionMatrices.jl/dev/)**\n\n## Installation\n\n`TransitionMatrices.jl` requires Julia ≥ 1.10. In the Julia REPL's package mode (press `]`):\n\n```julia-repl\npkg\u003e add TransitionMatrices\n```\n\nTo track the development version, or if the package is not yet in your registry, add it by URL:\n\n```julia-repl\npkg\u003e add https://github.com/JuliaRemoteSensing/TransitionMatrices.jl\n```\n\n## Quick start\n\n```julia\nusing TransitionMatrices\n\n# A prolate spheroid: semi-axes a = 1, c = 2, relative refractive index m = 1.5 + 0.01im\ns = Spheroid(1.0, 2.0, 1.5 + 0.01im)\n\n# Auto-converged (classic EBCM) T-matrix at wavelength λ = 2π\n𝐓 = transition_matrix(s, 2π)\n\n# Orientation-averaged far-field observables\nQsca = scattering_cross_section(𝐓, 2π)\nQext = extinction_cross_section(𝐓, 2π)\nω    = albedo(𝐓)\ng    = asymmetry_parameter(𝐓, 2π)\n```\n\n## Features\n\n- Calculate the T-Matrix of various types of scatterers\n  - Homogeneous spheres (via `bhmie`)\n  - Coated spheres (via `bhcoat`)\n  - Homogeneous axisymmetric shapes (via EBCM and IITM)\n    - Spheroids\n    - Cylinders\n    - Chebyshev particles\n  - Arbitrary shapes (via IITM)\n    - Prisms\n- Calculate far-field scattering properties using the T-Matrix\n  - Cross sections and single scattering albedo (SSA)\n  - Amplitude scattering matrix\n  - Phase matrix\n  - Scattering matrix\n- Compute Jacobians through the linearization framework\n  - Numerical automatic differentiation for user-defined scalar workflows via `ForwardDiff.jl`\n  - Analytical Mie linearization for size, refractive-index, and wavelength variables\n  - Analytical EBCM slices for spheroids, cylinders, and Chebyshev particles\n  - Analytical fixed-geometry IITM material/wavelength slices for axisymmetric,\n    n-fold, and arbitrary-shape solvers\n\nCompared to existing packages, `TransitionMatrices.jl` is special in that it is generic and supports various floating-point types, e.g.:\n\n- `Float64` and `BigFloat` from [`Base`](https://docs.julialang.org/en/v1/base/)\n- `Double64` from [`DoubleFloats.jl`](https://github.com/JuliaMath/DoubleFloats.jl) when `DoubleFloats` is loaded\n- `Float128` from [`Quadmath.jl`](https://github.com/JuliaMath/Quadmath.jl) when `Quadmath` is loaded\n- `Arb` and `Acb` from [`Arblib.jl`](https://github.com/kalmarek/Arblib.jl)\n\nBy using higher-precision floating-point types, the maximum size parameter that can be handled is greatly improved.\n\nThe precision types `Arb` and `Acb` are re-exported by `TransitionMatrices.jl`.\nThe `DoubleFloats.jl` and `Quadmath.jl` precision types are optional: load them\nexplicitly with `using DoubleFloats` or `using Quadmath` before constructing\n`Double64`, `Float128`, or `ComplexF128` values.\n\nThe `0.6` compatibility line keeps `Quadmath.jl` 1.x and `Wigxjpf.jl` 0.3.x,\nand moves `DoubleFloats.jl`, `Quadmath.jl`, and `GenericFFT.jl` to optional\npackage extensions.\n\n## How to cite\n\nIf you use `TransitionMatrices.jl` in your research, please cite it — a\n[`CITATION.bib`](CITATION.bib) is provided in this repository. Please also cite\nthe original publication(s) for the specific method you use; see\n[Methods \u0026 references](#methods--references) below.\n\n## Methods \u0026 references\n\nEach solver and numerical trick follows the published literature below; the\nin-source docstrings and comments point to the specific equations used.\n\n**T-Matrix framework \u0026 far-field conventions**\n\n- P. C. Waterman, *Symmetry, unitarity, and geometry in electromagnetic\n  scattering*, [Phys. Rev. D **3**, 825–839 (1971)](https://doi.org/10.1103/PhysRevD.3.825)\n  — the null-field / EBCM origin of the T-Matrix method.\n- M. I. Mishchenko, L. D. Travis \u0026 A. A. Lacis, *Scattering, Absorption, and\n  Emission of Light by Small Particles*, Cambridge University Press (2002) — the\n  amplitude / phase / scattering matrices, cross sections, asymmetry parameter,\n  T-Matrix rotation, analytic random-orientation average, and the Wigner-d\n  recursions (the pervasive `Eq. (x.y)` references throughout the source).\n\n**Mie \u0026 coated spheres** (`bhmie`, `bhcoat`)\n\n- C. F. Bohren \u0026 D. R. Huffman, *Absorption and Scattering of Light by Small\n  Particles*, Wiley (1983) — the `bhmie` and `bhcoat` algorithms. The Mie\n  T-Matrix uses Mishchenko et al. (2002), Eqs. (5.42)–(5.44).\n\n**EBCM for axisymmetric shapes** (spheroids, cylinders, Chebyshev particles)\n\n- P. C. Waterman (1971), above.\n- M. I. Mishchenko \u0026 L. D. Travis, *Capabilities and limitations of a current\n  FORTRAN implementation of the T-matrix method for randomly oriented,\n  rotationally symmetric scatterers*, JQSRT **60**, 309–324 (1998) — the automatic\n  convergence procedure (`routine_mishchenko`: the choice of `nₘₐₓ` and the\n  Gauss division `Ng`), which the axisymmetric assembly is translated from.\n\n**Numerically stable EBCM — the F⁺ formulation** (`stable = true`)\n\n- W. R. C. Somerville, B. Auguié \u0026 E. C. Le Ru, *Severe loss of precision in\n  calculations of T-matrix integrals*, JQSRT **113**, 524 (2012) — the\n  catastrophic-cancellation diagnosis.\n- W. R. C. Somerville, B. Auguié \u0026 E. C. Le Ru, JQSRT **123**, 153 (2013),\n  [doi:10.1016/j.jqsrt.2012.07.017](https://doi.org/10.1016/j.jqsrt.2012.07.017)\n  — the cancellation-free `F⁺_{nk}(s,x)` projection (their Eq. 45–62, Table 2)\n  used for high-aspect-ratio spheroids.\n\n**Sh-matrix moment separation** (`prepare_sh`, fast `(λ, mᵣ)` sweeps)\n\n- The separation of the size / material parameters from the particle geometry is\n  the *parameter separation* of V. G. Farafonov, V. B. Il'in \u0026 M. S. Prokopjeva,\n  *Light scattering by multilayered nonspherical particles: a set of methods*,\n  JQSRT **79–80**, 599–626 (2003),\n  [doi:10.1016/S0022-4073(02)00310-2](https://doi.org/10.1016/S0022-4073(02)00310-2);\n  the \"Sh-matrix\" name and formalism are due to D. Petrov, Yu. Shkuratov, E. Zubko\n  \u0026 G. Videen, *Sh-matrices method as applied to scattering by particles with\n  layered structure*, JQSRT **106**, 437–454 (2007),\n  [doi:10.1016/j.jqsrt.2007.01.027](https://doi.org/10.1016/j.jqsrt.2007.01.027)\n  (extended in Petrov, Shkuratov \u0026 Videen, *The Sh-matrices method applied to\n  light scattering by small lenses*, JQSRT **110**, 1448–1459 (2009),\n  [doi:10.1016/j.jqsrt.2009.01.016](https://doi.org/10.1016/j.jqsrt.2009.01.016)).\n- The term-by-term radial integration reuses the `F⁺` projection of Somerville\n  et al. (2013) and the Riccati–Bessel power series of\n  [DLMF §10.53](https://dlmf.nist.gov/10.53).\n\n**Invariant Imbedding T-Matrix (IITM)** (axisymmetric, N-fold, and arbitrary shapes)\n\n- B. R. Johnson, *Invariant imbedding T matrix approach to electromagnetic\n  scattering*, [Appl. Opt. **27**, 4861–4873 (1988)](https://opg.optica.org/ao/abstract.cfm?uri=ao-27-23-4861)\n  — Eq. (97).\n- L. Bi, P. Yang, G. W. Kattawar \u0026 M. I. Mishchenko, *Efficient implementation of\n  the invariant imbedding T-matrix method and the separation of variables method\n  applied to large nonspherical inhomogeneous particles*, JQSRT **116**, 169–183\n  (2013) — Eq. (38).\n- A. Doicu \u0026 T. Wriedt, *The Invariant Imbedding T Matrix Approach*, in *The\n  Generalized Multipole Technique for Light Scattering* (Springer, 2018),\n  [doi:10.1007/978-3-319-74890-0_2](https://doi.org/10.1007/978-3-319-74890-0_2)\n  — Eq. (2.40).\n- B. Sun, L. Bi, P. Yang, M. Kahnert \u0026 G. Kattawar, *Invariant Imbedding T-matrix\n  Method for Light Scattering by Nonspherical and Inhomogeneous Particles*,\n  Elsevier (2019) — Eq. (4.2.36).\n- S. Hu (胡帅), *Research on the Numerical Computational Models and Application of\n  the Scattering Properties of Nonspherical Atmospheric Particles*, PhD\n  dissertation, National University of Defense Technology (2018) — Eq. (5.71).\n\n**Far-field observables \u0026 orientation averaging**\n\n- Mishchenko et al. (2002) — cross sections (Eqs. (5.102), (5.107), (5.140), (5.141)),\n  phase matrix (Eqs. (2.106)–(2.121)), asymmetry parameter (Eq. (4.92)), and the\n  analytic random-orientation T-Matrix (Eq. (5.96)).\n- L. Bi \u0026 P. Yang, *Accurate simulation of the optical properties of atmospheric\n  ice crystals with the invariant imbedding T-matrix method*, JQSRT **138**, 17–35\n  (2014), [doi:10.1016/j.jqsrt.2014.01.013](https://doi.org/10.1016/j.jqsrt.2014.01.013)\n  — the scattering-matrix expansion coefficients for a general T-Matrix (Eqs. (24)–(74)).\n\n**Shapes**\n\n- A. Mugnai \u0026 W. J. Wiscombe, *Scattering from nonspherical Chebyshev particles. 1*,\n  [Appl. Opt. **25**, 1235 (1986)](https://opg.optica.org/ao/abstract.cfm?uri=ao-25-7-1235)\n  — the Chebyshev-particle definition `r(ϑ) = r₀(1 + ε·Tₙ(cos ϑ))`.\n\n**Linearization \u0026 Jacobians**\n\n- R. Spurr, J. Wang, J. Zeng \u0026 M. I. Mishchenko, *Linearized T-matrix and Mie\n  scattering computations*, JQSRT (2012).\n- F. Xu \u0026 A. B. Davis, *Derivatives of light scattering properties of a\n  nonspherical particle computed with the T-matrix method*, Opt. Lett. **36**(22),\n  4464–4466 (2011), [doi:10.1364/OL.36.004464](https://doi.org/10.1364/OL.36.004464).\n- B. Sun, M. Gao, L. Bi \u0026 R. Spurr, *Analytical Jacobians of single scattering\n  optical properties using the invariant imbedding T-matrix method*, Opt. Express\n  **29**(6), 9635–9669 (2021), [doi:10.1364/OE.421886](https://doi.org/10.1364/OE.421886).\n- M. Gao \u0026 B. Sun, *Improvement and application of linearized invariant imbedding\n  T-matrix scattering method*, JQSRT **290**, 108322 (2022),\n  [doi:10.1016/j.jqsrt.2022.108322](https://doi.org/10.1016/j.jqsrt.2022.108322).\n\n**Numerical kernels (via dependencies)**\n\n- Wigner 3-j symbols via `Wigxjpf.jl`: H. T. Johansson \u0026 C. Forssén, *Fast and\n  accurate evaluation of Wigner 3j, 6j, and 9j symbols using prime factorization\n  and multiword integer arithmetic*, SIAM J. Sci. Comput. **38**(1), A376–A384 (2016).\n- Gauss–Legendre quadrature via\n  [`FastGaussQuadrature.jl`](https://github.com/JuliaApproximation/FastGaussQuadrature.jl).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaremotesensing%2Ftransitionmatrices.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliaremotesensing%2Ftransitionmatrices.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaremotesensing%2Ftransitionmatrices.jl/lists"}