Skip to main content

Electromagnetic S-matrix computation for periodic arrays of cylinders — differentiable JAX version

Project description

CyScat — Python / JAX

Electromagnetic scattering matrix computation for periodic arrays of cylinders, with full JAX automatic differentiation support.

Translated from MATLAB (Curtis Jin, Prof. Raj Rao Nadakuditi, Prof. Eric Michielssen, University of Michigan).

What this version provides

  • Exact AD w.r.t. positions, wavelength, refractive index, and radius via jax.grad / jax.jvp
  • All examples use Scattering_Code.jax.smatrix — the fully differentiable pipeline
  • Cross-validation notebook comparing JAX AD against Julia ForwardDiff

Setup

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Examples

Open any notebook under CyScat/examples/:

cd CyScat
jupyter notebook examples/generate_s_matrix_1layer_pec/generate_s_matrix_1layer_pec.ipynb
jupyter notebook examples/differentiable_s_matrix_demo/differentiable_s_matrix_demo.ipynb
jupyter notebook examples/optimize_refractive_index_and_radius/optimize_refractive_index_and_radius.ipynb
jupyter notebook examples/compare_julia_python_derivatives/compare_julia_python_derivatives.ipynb

See CyScat/README.md for full documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cyscat_jax-0.1.0.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cyscat_jax-0.1.0-py3-none-any.whl (58.1 kB view details)

Uploaded Python 3

File details

Details for the file cyscat_jax-0.1.0.tar.gz.

File metadata

  • Download URL: cyscat_jax-0.1.0.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cyscat_jax-0.1.0.tar.gz
Algorithm Hash digest
SHA256 82c29cc7645676f744c89d95601e94d417fff716e17b75423565f6cb3a8d7792
MD5 c01036e52836e8d7a9c04de2f0c162ea
BLAKE2b-256 77adf36d61fc439ec7bcc2bac320d80aacec27c25dcaecf94e396fd00faa45dd

See more details on using hashes here.

File details

Details for the file cyscat_jax-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cyscat_jax-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 58.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cyscat_jax-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0fd8f323d5b81620b0118a96d2b2507b017fbab4e38505a0c5b9064cb18ca64
MD5 12f7e446306039d49602b7c227f0c09d
BLAKE2b-256 6ff928b829ee14fd53aa3a297e9ff4d8db0b753432633e021c0bbc3cdfa6c071

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page