Skip to main content

philsol

Modes for the Masses (Massless?)

Fed up with relying on expensive proprietary software for your electromagnetic waveguide research? philsol might just be the package for you. In a world where high performance hardware is cheaper than specialist software, philsol throws elegence and sophistication out of the window and replaces it with brute force.

This is a fully vectorial finite difference waveguide mode solver and a direct Python implimentation of the algorithm found in the paper: 'Full-vectorial finite-difference analysis of microstructured optical fibres', by Zhu and Brown.

Warning: I haven't thoroughly tested so be wary and check the results are sensible...

New Warning: Original paper by Zhu and Brown is in gaussian not S. I. units. To correct use conversion table here.

Installation

  • Install using pip with command 'pip install philsol'
  • If you can't be bothered, the important part is the function eigenbuild in core.py.

Examples

  • Commented example projects can be found in the examples directory.
  • To run the examples, first install philsol to your Python environment (see above)

Features

Solver

  • Solves vector Maxwell(Helmholtz) equations in 2D for arbitary refractive index profile.
  • Return x and y componants of electric field.
  • philsol can handle anisotropic refractive indices with diagonal tensor.
  • Currently hard coded with conductive boundary.
  • Choice of solving routines: the default scipy.sparse solver or Slepc (slepc4py and petsc4py) this libraries can be fiddly to set up but are very heavily featured including some limited GPU support.
  • Extra field componants Ez, Hx, Hy, Hz can be calculated from construct module
  • Periodic boundary conditions

Geometry building

  • The quickest way of importing geometry is with a bitmap image
  • See examples/example_image.py for an example in loading .bpm images
  • See examples/example_build.py for an example in building geometry using PIL/Pillow

To do

  • More intelligent geometry aproximation (e.g pixel interpolation on curved boundaries)
  • More boundry condition options Bloch, PML...
  • GPU eigensolving

Metadata

Release files for philsol 0.25

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

Source distribution (sdist)

Source distribution for philsol 0.25
File Size Uploaded Provenance
philsol-0.25.tar.gz 6.0 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 12.8 kB

Release files / philsol-0.25.tar.gz

Download URL philsol-0.25.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
be1d5e4f588f87aaf1f1c59dde9203cf0df5565af3e700ff0fddf5242021a8bb
BLAKE2b-256 checksum
How to use checksums
b77cb7db2d306b48bd58fee5a0b17f6706084a06e182d24ffa08ea3e6d92bd95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.2 Linux/4.19.180-1-MANJARO

Release files / philsol-0.25-py3-none-any.whl

Download URL philsol-0.25-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
057224653fb872b82bfdb24d1856afcef58636e6e47d5aed82c6ed6b5e3b3be5
BLAKE2b-256 checksum
How to use checksums
22dbd6e8e6aa58cbe4d9f5008087c650f30eb44308af74773b199fe26e2d86ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.2 Linux/4.19.180-1-MANJARO

Security for philsol 0.25

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