Skip to main content

PySacherECLControl is a python project developed to control Sacher TEC lasers. This project offers a convenient interface for users to interact with the laser, adjust parameters, and perform various operations for laser control and management.

Project description

Laser Control: Python Project for Sacher TEC Laser Control

PySacherECLManager (Python Sacher External Cavity Laser) is a Python project developed to control Sacher TEC lasers. This project offers a convenient interface for users to interact with the laser, adjust parameters, and perform various operations for laser control and management. Features

Features

  • Laser Parameter Adjustment: Modify settings such as wavelength and speed for specific requirements.
  • Intuitive GUI: Easy-to-navigate graphical user interface.
  • Integration Support: Includes examples for integration with other tools.

Requirements

  • Python 3.x: Ensure a compatible version is installed.
  • Sacher TEC Laser Hardware: Required for functionality.
  • Dependencies: Listed in the requirements.txt file.

Limitation:

  • Platform: Currently only tested on Windows.

Installation

  1. Clone the repository:
   git clone https://github.com/agentsmith29/PySacherECLControl.git

Install dependencies:

The Library requires to have a couple of files that are not directly included in this repository

Maxon Motor Driver

  1. Maxon Motor drivers as a zip. You can either use the included zip file
  2. Maxon Motor Drivers from the official website

Sacher Laser Driver

In order to make the library work, you need to include the Sacher Laser Libary, which can be requested by Sacher:

  1. Set the path to the EposCmd64.dll and the SacherMotorControl.pyd
conf.epos_dll.set(pathlib.Path(
    f'{Laser.__rootdir__}/libs/SacherLib/PythonMotorControlClass/EposCmd64.dll'))

conf.motor_control_pyd.set(pathlib.Path(
    f'{Laser.__rootdir__}/libs/SacherLib/PythonMotorControlClass/'
    f'lib/Python312/SacherMotorControl.pyd'))

Virtual Environment and Dependencies

  1. Create a virtual environment (optional, but highly recommended)
# Create a virtual environment
python -m venv .venv
  1. Activate the virtual environment 2.1 On Linux and max
source .venv/bin/activate  # Linux/MacOS

2.2 On Windows using cmd

.venv\Scripts\activate     # Windows

2.3 Alternativily, if you are using Bash on Windows:

. .venv/Scripts/activate
  1. Install dependencies The full list of depdendecies can be found in requirements.txt
pip install -r requirements.txt

Usage

Configuration File

After installing, make sure you create a config. The libary uses the confpy6 payhton module, to allow working with configuration files, build in the yaml file:

    conf = Laser.Config()
    conf.save()
    #conf.load('./LaserConfig.yaml', as_auto_save=True)
    conf.autosave(True, './LaserConfig.yaml')

See (main.py)[./examples/main.py] for an example.

Base configuration

The base configuration LaserConfig.py, gives default vaules for the initialization. These values serve as the default values for initializing the whole application. You should find a similar file after initialization in your startup directory:

# - Configuration file stored 2024-11-28 16:28:24.693820 - 
LaserConfig: #!!python/object:controller.LaserConfig
 epos_dll: "@Path:<./EposCmd64.dll>" # epos_dll: None
 motor_control_pyd: "@Path:<./Python312/SacherMotorControl.pyd>" # motor_control_pyd: None
 wl_sweep_start: 845    # wl_sweep_start: None
 wl_sweep_stop: 855     # wl_sweep_stop: None
 velocity: 1.6540566248074888 # velocity: None
 acceleration: 1.9904737652227005 # acceleration: None
 deceleration: 1.9904737652227005 # deceleration: None
 available_ports: ['USB0', 'USB1', 'USB2', 'USB3', 'USB4', 'USB5', 'USB6', 'USB7', 'USB8', 'USB9'] # available_ports: None
 port: "USB0" # port: None

Starting the script

Run the main script. An example can be found in src-root:

python ./src/lasercontrol.py

Use the graphical interface to adjust laser parameters, monitor data, and control the laser. Refer to the user manual or documentation for detailed instructions on specific operations and functionalities.

Making an exectuable

source .venv/bin/activate
pip install -r requirements.txt
pyinstaller ./pyinstaller/lasercontrol.spec

Contributing

Contributions to Laser Control are welcome! If you have suggestions for improvements, encounter any issues, or would like to add new features, please feel free to open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Citing

This project is part of the Software FlexSensor whgich has been published under DOI 10.2139/ssrn.4828876.

Please cite it correctly.

Schmidt, Christoph and Hinum-Wagner, Jakob Wilhelm and Klambauer, Reinhard and Bergmann, Alexander, Flexsensor: Automated Measurement Software for Rapid Photonic Circuits Capturing. Available at SSRN: https://ssrn.com/abstract=4828876 or http://dx.doi.org/10.2139/ssrn.4828876 

Acknowledgements

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

pysachereclcontrol-1.2.8.tar.gz (5.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysachereclcontrol-1.2.8-py3-none-any.whl (604.5 kB view details)

Uploaded Python 3

File details

Details for the file pysachereclcontrol-1.2.8.tar.gz.

File metadata

  • Download URL: pysachereclcontrol-1.2.8.tar.gz
  • Upload date:
  • Size: 5.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pysachereclcontrol-1.2.8.tar.gz
Algorithm Hash digest
SHA256 1b783528de12009da8af6481bb689539212823c3f73b327d5b45e895b2faea04
MD5 0b8db02f22800df7dd0a56904557f5fa
BLAKE2b-256 95e9bfb27bd13a3e15f6c26fed69c86938fef1a118f7b2209976a589301aaf50

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysachereclcontrol-1.2.8.tar.gz:

Publisher: python-publish.yml on agentsmith29/PySacherECLControl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pysachereclcontrol-1.2.8-py3-none-any.whl.

File metadata

File hashes

Hashes for pysachereclcontrol-1.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 d7332171ca059c717fbd16bd7b1b7c68bd15444bd3c32284f8d5180ab43b72f4
MD5 c01937c2a0e45ee2479adfbfd9cbcf0b
BLAKE2b-256 0ecafba088885d5924eafde266dea2bedf03eaaad1fd8fa72fb7f23407800794

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysachereclcontrol-1.2.8-py3-none-any.whl:

Publisher: python-publish.yml on agentsmith29/PySacherECLControl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page