Skip to main content

fourierslm

CI Docs

Fourier optics of a phase-only SLM: the beam on the SLM, its phase pattern, and the field it makes in the focal region of a lens, in physical units.

Documentation: https://melvinrdn.github.io/fourierslm

Install

pip install fourierslm    # or: uv add fourierslm

Example

A Gaussian beam of 1 W on a 1920 × 1200 SLM with 8 µm pixels, a vortex of charge 1, and the field at the focus of a 50 cm lens placed 30 cm after the SLM.

import numpy as np
import fourierslm as fs
from fourierslm import beam, phase, propagate

X, Y = fs.grid(1920, 8e-6), fs.grid(1200, 8e-6)
E = beam.gaussian(X, Y, w=2e-3, power=1.0) * np.exp(1j * phase.vortex(X, Y, charge=1))
x = y = np.linspace(-300e-6, 300e-6, 256)  # window at the focus [m]
E_focus = propagate.focus(E, X, Y, x, y, wavelength=1030e-9, f=0.5, slm_distance=0.3)
I = beam.intensity(E_focus)  # [W/m²]

Speed

On the same 1920 × 1200 SLM, in complex64, on 24 cores. Every propagator gives the analytic Gaussian beam to 10⁻⁸ in complex128.

case run time
focus, window 256² 10 ms
focus on 256², then free, 101 planes 0.2 s
focus_fft, whole plane (3840 × 2400) 50 ms

Details in the benchmark.

License

MIT

Metadata

Release files for fourierslm 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fourierslm 0.1.0
File Size Uploaded Provenance Actions
fourierslm-0.1.0.tar.gz 9.9 kB Without provenance Details for fourierslm-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fourierslm 0.1.0
File Interpreter ABI Platform Actions
fourierslm-0.1.0-py3-none-any.whl Python 3 none any Details for fourierslm-0.1.0-py3-none-any.whl

Total release size: 19.0 kB

Release files / fourierslm-0.1.0.tar.gz

Download URL fourierslm-0.1.0.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
634864ce6d5df2426f9086caa17a5ccc02db39ed2017932fc66e0313ec4d469d
BLAKE2b-256 checksum
How to use checksums
3be61b57185c6c5da891a09480bbc8a77e37075d8f7eee9465e75af89b0df4b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fourierslm-0.1.0-py3-none-any.whl

Download URL fourierslm-0.1.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e365a137d260653a05839ffabffdf7615231c42c8f269576e8fe447e7d3503b3
BLAKE2b-256 checksum
How to use checksums
5cbc2b84999827cc9c4a2e311979acf2d0e509434ea84585ac0bade4d8a9eed2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fourierslm 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page