Skip to main content

gds_fdtd

alternative text

codecov build docs jekyll pypi

gds_fdtd is a minimal Python module to assist in setting up FDTD simulations for planar nanophotonic devices using FDTD solvers such as Tidy3D.

Features

  • Automated FDTD Setup: Easily set up Lumerical and Tidy3D simulations for devices designed in GDS.
  • Integration with SiEPIC: Generate FDTD simulations directly from components defined in SiEPIC EDA and it's associated PDKs (e.g., SiEPIC-EBeam-PDK).
  • Integration with gdsfactory: Generate Tidy3D simulations directly from gdsfactory designs by identifying ports and simulation regions from an input technology stack.
  • S-Parameter Extraction: Automatically generate and export S-parameters of your photonic devices in standard formats.
  • Multimode/Dual Polarization Simulations: Set up simulations that support multimode or dual polarization configurations for device analysis.

Installation

You can install gds_fdtd using the following options:

Quick install (PyPI)

pip install gds-fdtd

Option: Basic Installation from source

To install the core functionality of gds_fdtd, clone the repository and install using pip:

git clone git@github.com:mustafacc/gds_fdtd.git
cd gds_fdtd
pip install -e .

Option: Development Installation

For contributing to the development or if you need testing utilities, install with the dev dependencies:

git clone git@github.com:mustafacc/gds_fdtd.git
cd gds_fdtd
pip install -e .[dev]

This will install additional tools like pytest and coverage for testing.

Editable + dev tools

pip install -e .[dev]

Optional extras

extra purpose install command
siepic SiEPIC EDA support pip install -e .[siepic]
tidy3d Tidy3D simulation support pip install -e .[tidy3d]
gdsfactory GDSFactory EDA support pip install -e .[gdsfactory]
prefab PreFab lithography prediction support pip install -e .[prefab]
everything dev tools + all plugins pip install -e .[dev,tidy3d,gdsfactory,prefab,siepic]

Requirements

  • Python ≥ 3.10 (note: gdsfactory requires Python ≥ 3.11)
  • Runtime deps: numpy, matplotlib, shapely, PyYAML, klayout

Running tests

If you've installed the dev dependencies, you can run the test suite with:

pytest --cov=gds_fdtd tests

## Development

### Version Management

This project uses `bump2version` to keep version numbers in sync across all files.

**Check current version:**
```bash
make check-version

Bump version:

# For bug fixes (0.4.0 -> 0.4.1)
make bump-patch

# For new features (0.4.0 -> 0.5.0)  
make bump-minor

# For breaking changes (0.4.0 -> 1.0.0)
make bump-major

Quick release:

# Does everything in one go
./scripts/release.sh [patch|minor|major]

This script will:

  • Run tests and build docs
  • Update version numbers everywhere
  • Create a git tag
  • Push everything to GitHub
  • Trigger GitHub release and PyPI upload

Available Make Commands

make help          # Show all available commands
make install       # Install package in development mode
make test          # Run tests with coverage
make docs          # Build documentation
make docs-serve    # Build and serve docs locally on port 8000
make clean         # Clean build artifacts
make release       # Build package for release

Development Setup

For new contributors:

# Clone the repository
git clone https://github.com/SiEPIC/gds_fdtd.git
cd gds_fdtd

# Install development dependencies
pip install -e .[dev]

# Run tests
make test

# Build documentation
make docs

Making a Release

  1. Make sure you're on the main branch with all changes committed
  2. Run the release script: ./scripts/release.sh [patch|minor|major]
  3. The script will automatically:
    • Run tests to make sure everything works
    • Build documentation
    • Bump version numbers in all files
    • Create and push a git tag
    • Trigger GitHub Actions to create a release and upload to PyPI

The GitHub Actions workflow will:

  • Run tests again
  • Build the package
  • Create a GitHub release with changelog
  • Upload to PyPI automatically

Metadata

Release files for gds-fdtd 0.4.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 gds-fdtd 0.4.0
File Size Uploaded Provenance
gds_fdtd-0.4.0.tar.gz 38.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for gds-fdtd 0.4.0
File Interpreter ABI Platform
gds_fdtd-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 79.3 kB

Release files / gds_fdtd-0.4.0.tar.gz

Download URL gds_fdtd-0.4.0.tar.gz
Size 38.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cee75617270f5d453f022ceeb9d91eb3860783aaf20d726022ad8708d69841ef
BLAKE2b-256 checksum
How to use checksums
d42392e1ac08bb664e0d2e6b35bcabacba963b55e044d97f75e96a29e85661fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / gds_fdtd-0.4.0-py3-none-any.whl

Download URL gds_fdtd-0.4.0-py3-none-any.whl
Size 41.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f5f2b52a8393cbc89fa25df3d67f723f92826c890136290236ed99363261a4c
BLAKE2b-256 checksum
How to use checksums
79a0dd4055a8cfd7e7caed223d4fed291246491f036d0b9894fdd497b964aa8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for gds-fdtd 0.4.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.

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