Skip to main content

Interface to the PM100A/D power meter from Thorlabs.

Project description

Overview

This package can be used to drive a PM100A/D power meter from Thorlabs. It provides an object oriented interface to the SCPI commands using Python properties.

Installation

To install the ThorlabsPM100 driver, download the package and run the command:

python setup.py install

You can also directly move the ThorlabsPM100 to a location that Python can import from (directory in which scripts using ThorlabsPM100 are run, etc.)

Usage

The best way to connect your instrument is with the pyvisa package. On windows the pyvisa a package is supported by the python(x,y) distribution. On linux, the instrument is automatically detected as a USBTMC device. A simple interface is described in the file usbtmc.py

First you need to create your instrument. Using visa:

import visa
from ThorlabsPM100 import ThorlabsPM100
inst = visa.instrument('USB0::0x0000::0x0000::DG5Axxxxxxxxx::INSTR', term_chars='\n', timeout=1)
power_meter = ThorlabsPM100(inst=inst)

Or using usbtmc (you nedd to have read and write access to the ‘/dev/usbtmc0’):

from ThorlabsPM100 import ThorlabsPM100, USBTMC
inst = USBTMC(device="/dev/usbtmc0")
power_meter = ThorlabsPM100(inst=inst)

Commands that set or query a value are Python properties of ThorlabsPM100 class. Other command are methods of ThorlabsPM100 class

print power_meter.read # Read-only property
print power_meter.sense.average.count # read property
power_meter.sense.average.count = 10 # write property
power_meter.system.beeper.immediate() # method

Contact

Please send bug reports or feedback to Pierre Cladé.

Documentation

Detailed information about the Thorlabs PM100 driver can be found on the main web site

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

ThorlabsPM100-1.0.tar.gz (11.7 kB view details)

Uploaded Source

File details

Details for the file ThorlabsPM100-1.0.tar.gz.

File metadata

  • Download URL: ThorlabsPM100-1.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ThorlabsPM100-1.0.tar.gz
Algorithm Hash digest
SHA256 6a636922a32e0c52c8f0b6ebddfcba277a742c5d5c927a457f502e423e5b6bd9
MD5 1ac004ed326b8c085655780b98750d15
BLAKE2b-256 14c8385be62425903c50411c35a44bd43b65ef1565eed7f7e04634335fe62c50

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