Date: Oct 27, 2026, Version: 1.9.9

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.