Opticomlib is an open source Python package for optical communications research. It is oriented to engineers who want to simulate optical communication systems using Python. The package provide binary_sequence, electrical_signal, optical_signal, and eye objects with methods for signal processing and visualization integrated with numpy, scipy, and matplotlib libraries for frendly use. The package also provide a set of electro-optic devices as MZM, FIBER, PD, EDFA, and much more.
- Opticomlib Documentation: https://opticomlib.readthedocs.io/en/stable
- Opticomlib Repository: https://github.com/armando-palacio/opticomlib.git
- Bug reports: https://github.com/armando-palacio/opticomlib/issues
- Contributing: CONTRIBUTING.md
-
Electro-optic devices: most common electro-optic devices are implemented in the package (
opticomlib.devices):PRBS: Pseudo Random Binary Sequence GeneratorDAC: Digital to Analog ConverterADC: Analog to Digital ConverterLASER: Continuous Wave LaserPM: Phase ModulatorMZM: Mach-Zehnder Modulator (intensity modulator)FIBER: Optical Fiber (with GPU acceleration support by default)DBP: Back-Propagation algoritmDM: Pure Dispersive MediumPD: PhotodetectorEDFA: Erbium Doped Fiber AmplifierSAMPLER: electrical samplerLPF: Low Pass FilterBPF: Band Pass FilterGET_EYE: Eye Diagram parameters estimatorFBG: Fiber Bragg Grating- ... and more in the future
-
Modulation formats: modulations are implemented in separate modules, with their own functionalities:
OOK: On-Off Keying (opticomlib.ook)PPM: Pulse Position Modulation (opticomlib.ppm)- ... and more in the future
-
Objects types: methods for signal processing and visualization are integrated in the following objects:
binary_sequence: object for binary sequences (NumPy compatible)electrical_signal: object for electrical signals (NumPy compatible)optical_signal: object for optical signalseye: object for eye diagrams
-
Laboratory utilities: framework for communication with laboratory equipment and post-processing of data (
opticomlib.lab).
You can install opticomlib using pip:
pip install opticomlibor from source code:
pip install git+https://github.com/armando-palacio/opticomlib.git- NumPy Compatibility:
binary_sequenceandelectrical_signalnow fully support NumPy protocols, allowing direct use with NumPy functions. - GPU Acceleration:
FIBERsimulation now supports GPU acceleration using CuPy. - New Lab Module: Drivers for laboratory equipment (PED, Lasers, Oscilloscopes) in
opticomlib.lab. - Enhanced Logging: Hierarchical logging system for better debugging.
- New Utilities: Added
eyediagram,phase_estimator,get_psd, and more. - Breaking Changes: See the full changelog for details on API changes (e.g., property access for
.size,.type,NULLsentinel for noise).
This project is licensed under the terms of the MIT license.
If you wish to contact me you can do so at [email protected].