Light propagation
Lightprop2d includes class 'Beam2D' to transform intitial field distribution
using fourier transform from x-y field profile to kx-ky spectrum.
You can use both numpy and cupy backends with use_gpu key of Beam2D class.
You can install it as follows
pip install lightprop2d==1.0.4
If you want to use cupy to accelerate calculations, you must install extra packages with a command
pip install lightprop2d[gpu]
If you want to use pyfftw to accelerate calculations, you must install extra packages with a command
pip install lightprop2d[fftw]
Check out the Code Reference for details on the 'Beam2D' methods.
Example 1: Random beam propagation
import matplotlib.pyplot as plt
from lightprop2d import Beam2D, random_round_hole, um, nm
# All input data are in cm
# XY grid dimensions
npoints = 256
# XY grid widening
beam_radius = 25*um # 25 um
area_size = 200*um # 200 um
# Wavelength in cm
wl0 = 632*nm
beam = Beam2D(area_size, npoints, wl0, init_field_gen=random_round_hole,
init_gen_args=(beam_radius,))
plt.imshow(beam.iprofile)
plt.show()
beam.propagate(100*um)
plt.imshow(beam.iprofile)
plt.show()
Funding
This work is supported by the Russian Science Foundation under grant No. 21-12-00155.
Metadata
Release files for lightprop2d 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lightprop2d-1.0.4.tar.gz | 10.7 kB | Without provenance | Details for lightprop2d-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lightprop2d-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for lightprop2d-1.0.4-py3-none-any.whl |
Total release size: 21.3 kB
Release files / lightprop2d-1.0.4.tar.gz
| Download URL | lightprop2d-1.0.4.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd5f60004abbc1a129672a036a6ad08b0f4f38bda9ad8e4fe560f1795a684e3f
|
|
BLAKE2b-256 checksum How to use checksums |
504d364d27151c4b6678d34cd2e71cd875f681f67b03ef14897457466fe8fdc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / lightprop2d-1.0.4-py3-none-any.whl
| Download URL | lightprop2d-1.0.4-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6657b090caf58967256b458028eaf01ea90927fbac322b58a57920bfac55b5f
|
|
BLAKE2b-256 checksum How to use checksums |
0e95dff6feef86accdee8b65fcfca288dacde6ad6528e816ba2ff80de4683ae5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for lightprop2d 1.0.4
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.