Skip to main content

AA OptoElectronics MPDSnCxx AOTF Driver

License

python driver to control MPDSnCxx AOTF devices.

Installation

To install this package from PyPI, invoke: pip install aaopto-aotf

To install this package from the Github in editable mode, from this directory invoke: pip install -e .

To install this package in editable mode with dependencies for building the docs, invoke: pip install -e .[dev]

Intro and Basic Usage

from aaopto_aotf.aotf import MPDS

aotf = MPDS("COM3")

Before writing values, you must first set the global blanking mode, and each channel's frequency, mode, and whether it is driven by external input or internal (software controlled) input.

from aaopto_aotf.aotf import MPDS, MAX_POWER_DBM
from aaopto_aotf.device_codes import DriverMode, BlankingMode, VoltageRange

aotf.set_blanking(BlankingMode.INTERNAL)  # disable blanking control from external input pin.
aotf.set_external_input_voltage_range(VoltageRange.ZERO_TO_FIVE_VOLTS)

# Note: device channels are 1-indexed to be consistent with the datasheet.
for channel in range(1, aotf.num_channels + 1):
    aotf.set_frequency(channel, 110.5)
    aotf.set_driver_mode(DriverMode.EXTERNAL)

If the driver mode is set to DriverMode.EXTERNAL, the device will take its output setpoint from the external input pin.

If set to DriverMode.INTERNAL, you can control the output with software settings:

for channel in range(1, aotf.num_channels + 1):
    aotf.set_driver_mode(DriverMode.INTERNAL)
    aotf.set_power_dbm(channel, MAX_POWER_DBM)
    aotf.enable_channel(channel)

Note that internal mode only enables a simple "On/Off" control scheme, and does not support linear scaling like external mode does vial the external analog input.

At this point, you might want to save the values set above to the current profile.

aotf.save_profile()  # Now, calling an aotf.reset() will start with the saved settings.

What's missing?

Here are the minor dangling features that are not implemented.

  • changing laser channel profiles at runtime. (These must be changed with the external input pins.)
  • automatic sweeping mode
    • automatic self-sweeping is a somewhat out-of-the-ordinary feature for most users.

Examples:

Have a look at the examples folder to see other examples and make use of a useful calibration script.

Metadata

Release files for aaopto-aotf 0.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aaopto-aotf 0.0.12
File Size Uploaded
aaopto_aotf-0.0.12.tar.gz 39.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aaopto-aotf 0.0.12
File Interpreter ABI Platform
aaopto_aotf-0.0.12-py3-none-any.whl Python 3 none any Details

Total release size: 47.6 kB

Release files / aaopto_aotf-0.0.12.tar.gz

Download URL aaopto_aotf-0.0.12.tar.gz
Size 39.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6658b98e335f472985c9df0de7dc7aef3a642fff20a46f49b557f51b2ca100dc
BLAKE2b-256 checksum
How to use checksums
5b3ef1cea6097b50ecfa137d956a3cd93a063aec146ae93d51bae0c2126e2952
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.25

Release files / aaopto_aotf-0.0.12-py3-none-any.whl

Download URL aaopto_aotf-0.0.12-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd18dd87ff14d7b2f727cf9b4cf8064300693ffc3a88cd0be4c0171e9ff389ae
BLAKE2b-256 checksum
How to use checksums
ab6850df2cded7bdef37b0cb1fa26524664ac8044d8ead862f3743b9510b9b96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.0.12 This release

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page