Badge |
Status |
|---|---|
Python versions |
|
Documentation |
|
Continuous integration |
|
Test coverage |
|
Google Colab |
|
PyPI package |
|
PyPI downloads |
|
Anaconda package |
|
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()
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.7
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 |
|---|---|---|---|---|
| fiberfusing-1.9.7.tar.gz | 57.7 kB | Without provenance | Details for fiberfusing-1.9.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fiberfusing-1.9.7-py3-none-any.whl | Python 3 | none | any | Details for fiberfusing-1.9.7-py3-none-any.whl |
Total release size: 121.9 kB
Release files / fiberfusing-1.9.7.tar.gz
| Download URL | fiberfusing-1.9.7.tar.gz |
|---|---|
| Size | 57.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04b0b0ca5bfe96dd638e273e5b22ea23e336e74859b7e90bf755e010bb76206c
|
|
BLAKE2b-256 checksum How to use checksums |
eb3842f18c8c0a9048db405647cbae695e22cb4974617c3afdf32e555c280edd
|
| 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.7-py3-none-any.whl
| Download URL | fiberfusing-1.9.7-py3-none-any.whl |
|---|---|
| Size | 64.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c24635753db77e796e571383622bc5f721956a76d8f73c50dd76fa10ad55761b
|
|
BLAKE2b-256 checksum How to use checksums |
3e3bb4c88e3e96affe105c4a10506a58467b17df7f4fdf801bca2bf266660722
|
| 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.7
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.