Skip to main content

Python interface for a MPB VYFA amplifier

Project description

MPBC-VYFA-SF

Python interface for a MPB Communications VYFA-SF Series amplifier

Communication is over a serial (USB-CDC / COM) port using pyserial.

Installation

pip install mpbc-vyfa-sf

or, for development with uv:

uv sync

Methods and attributes of the MPBAmplifier class

  • enable_laser()
    start laser emission
  • disable_laser()
    disable laser emission
  • get_faults()
    get all faults of the amplifier
  • get_alarms()
    get all alarms of the amplifier
  • enter_test_environment()
    enter the test environment of the amplifier, required to change the SHG temperature setpoint
  • save_all()
    save settings to non-volatile memory
  • model
    amplifier model
  • serial
    serial number
  • enabled
    boolean for laser emision status
  • state
  • laser_state
    Current state of the laser; e.g. BOOSTER_ON, OFF etc. see enums.py for more.
  • mode
  • seed_current
    mA
  • preamp_current
    mA
  • booster_current
    mA
  • booster_current_setpoint
    get and set the booster current setpoint
  • shg_temperature
    C
  • shg_temperature setpoint
    get and set the shg temperature setpoint in C
  • seed_power
    mW
  • output_power
    mW
  • output_power_setpoint
    if power_stabilization is enabled (set to True) this gets and sets the output power setpoint in mW
  • power_stabilization
    enable or disable (True or False) the output power stabilization. Only settable when emission is disabled.

Example

from mpbc_vyfa_sf import MPBAmplifier

# port is the serial COM port; baud_rate (default 9600) and timeout in seconds
# (default 2.0) are optional
amp = MPBAmplifier(port="COM4", baud_rate=9600, timeout=2.0)

# get the current laser state
amp.laser_state

# get the seed power
amp.seed_power

# enable the laser
amp.enable_laser()

# get the output power
amp.output_power

# disable the laser
amp.disable_laser()

MPBAmplifier can also be used as a context manager, which closes the serial port on exit:

with MPBAmplifier(port="COM4") as amp:
    print(amp.laser_state)

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

mpbc_vyfa_sf-0.3.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

mpbc_vyfa_sf-0.3.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file mpbc_vyfa_sf-0.3.0.tar.gz.

File metadata

  • Download URL: mpbc_vyfa_sf-0.3.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mpbc_vyfa_sf-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b94972d47aac70d05b79103d0906bb0f1072e47c1f1358d9dd19931ad1379633
MD5 6aedccb9ffc463ecc7e18480ba8addb3
BLAKE2b-256 6f1939920be95f60524be7bc71eb7b4b5853033a7e4683ac7d2691bcd1a82142

See more details on using hashes here.

File details

Details for the file mpbc_vyfa_sf-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: mpbc_vyfa_sf-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mpbc_vyfa_sf-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2041aef89a5200584b112b8635cb02fa3bfee058290213bc59fc915fb6d7643
MD5 72428a08ed3435e2024cc930994dcef9
BLAKE2b-256 6655b52c50154a2e31bd5130e7a9869ff2c32b3baeb07bcfebe4271f58d9132d

See more details on using hashes here.

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