Skip to main content

FiberFusing navy and coral seven-core logo

Badge

Status

Python versions

Supported and tested Python versions: 3.10, 3.11, 3.12, 3.13, 3.14

Documentation

Documentation Status

Continuous integration

Unittest Status

Test coverage

Unittest coverage

Google Colab

colab

PyPI package

PyPi

PyPI downloads

PyPi download statistics

Anaconda package

Anaconda version

Anaconda downloads

Anaconda downloads

FiberFusing

FiberFusing is an open-source Python package for parametrized fused-fiber cross-sections and refractive-index meshes. Define a fiber arrangement, adjust its fusion degree, and combine the resulting profile with optical fibers and a background medium.

Features

  • Circular and linear fiber arrangements with adjustable fusion degree.

  • Geometric connection optimization with area-conservation diagnostics.

  • Fiber catalog loading and refractive-index mesh generation.

  • Core-position perturbations with reproducible random seeds.

  • Matplotlib plots with supplied-axes support and headless rendering.

Installation

Install from PyPI using the Python interpreter for your simulations:

python -m pip install FiberFusing

Alternatively, install from the MartinPdeS Anaconda channel:

conda install -c MartinPdeS fiberfusing

Verify the installation with:

python -c "import FiberFusing; print(FiberFusing.__version__)"

Python compatibility

FiberFusing supports Python 3.10, 3.11, 3.12, 3.13, and 3.14. The full test suite runs on all five versions in GitHub Actions.

The package contains pure Python code. Its universal wheel and Conda noarch package can be installed on these Python versions without compiling FiberFusing. Release artifacts are currently built and installation-checked on Python 3.11; source tests also run on Python 3.13 and 3.14.

First simulation

Build a circular arrangement of three fibers with a cladding radius of 62.5 micrometers. Lengths in this example use meters; refractive indices are dimensionless.

from FiberFusing import Geometry, DomainAlignment, BackGround
from FiberFusing.fiber import FiberLoader
from FiberFusing.profile import Profile, StructureType

air_background = BackGround(refractive_index=1.0)

profile = Profile()

profile.add_structure(
   structure_type=StructureType.CIRCULAR,
   number_of_fibers=3,
   fusion_degree=0.4,
   fiber_radius=62.5e-6
)

profile.refractive_index = 1.4444

fiber_loader = FiberLoader()
fibers = [
   fiber_loader.load_fiber('SMF28', clad_refractive_index=profile.refractive_index, position=core_position)
   for core_position in profile.cores
]

geometry = Geometry(
   x_bounds=DomainAlignment.CENTERING,
   y_bounds=DomainAlignment.CENTERING,
   resolution=350
)

geometry.add_structure(air_background, profile, *fibers)

geometry.initialize()

geometry.plot()

Three-fiber fused cross-section and refractive-index mesh

For headless workflows, use geometry.plot(show=False) to obtain a Matplotlib figure without opening a window. See the plotting guide for supplied axes, styling, and export options.

Documentation and examples

See the online documentation for the API and numerical behavior, and the example gallery for runnable fiber configurations.

Developer setup

Clone the repository, select Python 3.10 or newer, and install the development and testing dependencies:

git clone https://github.com/MartinPdeS/FiberFusing.git
cd FiberFusing
python -m pip install -e ".[testing,dev,release]"

Run checks with the same interpreter:

MPLBACKEND=Agg python -m pytest
python -m ruff check FiberFusing tests
make release-check PYTHON=python

See CONTRIBUTING.md for documentation builds, installed-package checks, and release commands. Versions are explicit and releases use the shared martinpdes-maintenance tool.

Contact

For questions or contributions, open an issue on GitHub or contact Martin Poinsinet de Sivry-Houle.

Metadata

Release files for FiberFusing 1.9.9

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

Source distribution (sdist)

Source distribution for FiberFusing 1.9.9
File Size Uploaded Provenance Actions
fiberfusing-1.9.9.tar.gz 58.0 kB Without provenance Details for fiberfusing-1.9.9.tar.gz

Built distribution (wheel)

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

Total release size: 122.1 kB

Release files / fiberfusing-1.9.9.tar.gz

Download URL fiberfusing-1.9.9.tar.gz
Size 58.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e64fac9637d8b1e792145882acab8e0778d8c00bfb4a286d17f92b1896bca9e3
BLAKE2b-256 checksum
How to use checksums
8357a512a9e0dc462f494e2934eab9d76b7aa3799164a93bc217b7106b70544d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / fiberfusing-1.9.9-py3-none-any.whl

Download URL fiberfusing-1.9.9-py3-none-any.whl
Size 64.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b312d79bf731cb284b09e0f885acdf425c6cdedfd8f2e3f3d9a166b7eb0dc13
BLAKE2b-256 checksum
How to use checksums
43970ff60b70f55f9275f3237df26c713aa94769464e8cd8259c1f1bf041522f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for FiberFusing 1.9.9

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