Python Wrapper for the Santec IL and PDL Swept Test System
Project description
PySantec
Python wrapper for the Santec Insertion Loss and Polarization Dependent Loss Swept Test System.
[!NOTE] ⚠️ PySantec is currently under active development. Features and APIs may change without prior notice.
Overview
PySantec is a high-level Python interface for controlling Santec instruments and NI DAQ devices, designed to simplify automated optical measurements.
It enables:
- Seamless communication with TSL (Tunable Semiconductor Laser)
- Efficient control of MPM (Multi-Port Optical Power Meter)
- Integration with NI DAQ devices
- (Under development) Execution of IL (Insertion Loss) and PDL (Polarization Dependent Loss) tests
Platform & Requirements
PySantec depends on Santec’s .NET-based libraries and requires a Windows environment.
System Requirements
- Operating System: Windows 10 or later
- Python: 3.10, 3.11, 3.12, or 3.13 (64-bit only)
- .NET Framework: 4.6.2 (included by default on modern Windows systems)
- Santec DLLs: Installed via the Santec Swept Test System (IL/PDL) software
Download Required Software
Download the latest STS IL/PDL Software (.NET) from Santec:
👉 https://downloads.santec.com
Dependencies
-
NI-488.2 – Required for GPIB device support
👉 https://www.ni.com/en-us/support/downloads/drivers/download.ni-488-2.html -
NI-VISA – Required for GPIB communication
👉 https://www.ni.com/en-us/support/downloads/drivers/download.ni-visa.html -
NI-DAQmx – Required for DAQ device integration
👉 https://www.ni.com/en-us/support/downloads/drivers/download.ni-daqmx.html -
Python.NET (CLR) – Enables loading of Santec .NET DLLs
👉 https://pythonnet.github.io/Install Python.NET via pip:
pip install pythonnet
-
TSL USB Driver: Required only when connecting to Santec TSL devices via USB
Available from the same Santec downloads page.
Important Notes
Windows-Only Support
PySantec relies on Santec’s .NET Framework DLLs and is therefore not supported on Linux or macOS.
Attempting to import the package on non-Windows platforms will raise an error.
64-bit Requirement
Santec’s DLLs are compiled for a 64-bit architecture.
You must use a 64-bit version of Python—32-bit Python is not supported and will result in DLL load failures.
.NET Framework Dependency
PySantec requires .NET Framework 4.6.2 or later.
This version (or newer, such as 4.7.2 / 4.8) is typically preinstalled on Windows 10 and Windows 11, so no additional installation is usually required.
USB Device Support
If you plan to connect to Santec TSL devices via USB, you must install the TSL USB driver.
This is not required for other connection methods.
Quick Checklist
Before using PySantec, confirm:
- ✔ Running on Windows
- ✔ Using 64-bit Python (3.10–3.13)
- ✔ Santec STS IL/PDL software installed
- ✔ NI-488.2, NI-VISA, NI-DAQmx drivers installed.
- ✔ Python.NET (CLR) Python package installed.
- ✔ (If using USB) TSL USB driver installed
Installation
Install the package via pip:
pip install pysantec
⚡ Quick Start
from pysantec import InstrumentManager
# Initialize instrument manager
manager = InstrumentManager()
# List available resources
resources = manager.list_resources()
print(resources)
# Connect to instruments
tsl = manager.connect_tsl('GPIB1::3::INSTR') # Replace with your TSL GPIB address
mpm = manager.connect_mpm('GPIB1::17::INSTR') # Replace with your MPM GPIB address
daq = manager.connect_daq('Dev1') # Replace with your DAQ device name
# Basic laser operation
tsl.set_wavelength(1550.0)
tsl.set_power(2.0)
# Basic MPM operation
mpm.set_wavelength(1550.0)
# Basic DAQ operation
print(daq.is_sampling)
Examples
Example scripts are available in the examples/ directory.
For detailed usage and walkthroughs, see:
👉 Examples Documentation
Supported Instruments
| Instrument Type | Supported Models |
|---|---|
| TSL (Laser) | TSL-550, TSL-570, TSL-710, TSL-770 |
| MPM (Power Meter) | MPM-210, MPM-210H, MPM-220 |
| DAQ (NI) | Devices compatible with NI-DAQmx |
Testing
To run the test suite:
pytest tests/
Contributing
We welcome contributions! To contribute:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to your fork
- Create a Pull Request
License
This project is licensed under the MIT License.
See the LICENSE file for more details.
Acknowledgments
We gratefully acknowledge the following technologies and organizations that support this project:
-
National Instruments
For providing essential hardware communication and control libraries, including NI-VISA, NI-488.2, and NI-DAQmx. -
Python.NET
For enabling seamless integration between Python and the .NET Common Language Runtime (CLR), allowing efficient interoperability across platforms.
About the Santec Swept Test System
What is STS IL/PDL?
The Swept Test System (STS) is a photonic measurement solution developed by Santec Corporation for characterizing wavelength-dependent properties of passive optical components.
It is specifically designed to measure:
- Insertion Loss (IL)
- Polarization Dependent Loss (PDL)
System Components
The STS is composed of two key instruments:
-
Tunable Light Source (TSL)
A high-performance tunable semiconductor laser that enables precise wavelength sweeping. -
Multi-Port Power Meter (MPM)
A sensitive, multi-port power meter used to accurately capture optical power across wavelengths.
Together, these components enable fast, reliable, and highly accurate optical characterization.
Learn More
For additional details about the Swept Test System, visit:
👉 Santec STS Product Page
Documentation is under development — contributions are welcome!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pysantec-0.2.2.tar.gz.
File metadata
- Download URL: pysantec-0.2.2.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe313e858be7eee0b8b7bf376f91fd2cf050d4e7bc7528c2c2e33b0300bc7f67
|
|
| MD5 |
29fa7df8a6b98e0f8a127bd089ca94e2
|
|
| BLAKE2b-256 |
31a6b94974740fb4c7d64878e0a738941d6ffd9edff723568abb2b0deb711241
|
File details
Details for the file pysantec-0.2.2-py3-none-any.whl.
File metadata
- Download URL: pysantec-0.2.2-py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a620676a5efcdaa3e9050054d1e00f685998be4ead6c4cffc546cbb61221c5e
|
|
| MD5 |
e78266e5d7012ccd0ee60020abbfbb20
|
|
| BLAKE2b-256 |
f91ff17fea145212fe8e45b6b83a87d96909fbb61e0449b31e03325cd742f9a3
|