Skip to main content

Controller class for communicating with an Oriel Cornerstone 260 monochromator.

Project description

Oriel Cornerstone 260

A library allowing easy control over Oriel Cornerstone 260 monochromators.

Install with python -m pip install oriel-cornerstone-260

Monochromator

Represents a monochromator.

  • Monochromator( port, timeout = 5 ): Creates a new monochromator for the device at the specificed port, with the provided communication timeout.

Methods

Low Level

Low level methods allows reading and writing to the device.

  • connect(): Connects to the device.

  • disconnect(): Disconnects from the device.

  • write( msg ): Writes a message to the device. Termination characters are added.

  • read(): Reads a single response from the device.

  • command( cmd, *args ): Sends a command to the device with the given arguments. Returns the command.

  • query( msg ): Queries the device. Returns a Response object.

High Level

High level methods are convenience methods used for commonly needed functions.

  • goto( wavelength ): Goes to the given wavelength.

  • abort(): Starts the given channel.

  • set_grating( grating ): Sets the grating to the given number.

  • shutter( close = True ): Open or close the shutter.

  • set_outport( port ): Sets the output port.

  • slit_width( slit, width = None ): Gets or sets the slit width.

Properties

  • _com: Serial connection from pyserial.
  • connected: Whether the device is connected or not.
  • port: Device port.
  • term_chars: Termination characters used for reading and writing. [Default: '\r\n']
  • info: Device info.
  • position: Wavelength position.
  • grating: Current grating and its properties. Returns a dictionary with number, lines, and label.
  • shuttered: Whether the shutter is closed or open.
  • outport: The output port.

Response

A namedtuple with properties statement which represents the command, and response.

Example

A basic example for using a Monochromator.

from oriel_cornerstone_260 import Monochromator

# create device
mono = Monochromator( 'COM9' )

# print monochromator info
print( mono.info )

# go to 600 nm
mono.goto( 600 )

Note

A Monochromator is a ultimately a Serial object from pyserial, so you can call any functions on a Monochromator that you would on a Serial object.

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

oriel-cornerstone-260-0.0.2.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

oriel_cornerstone_260-0.0.2-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file oriel-cornerstone-260-0.0.2.tar.gz.

File metadata

  • Download URL: oriel-cornerstone-260-0.0.2.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for oriel-cornerstone-260-0.0.2.tar.gz
Algorithm Hash digest
SHA256 86ce09cb08a022b0b6cbb36f2d41cd2d59a93d5343278d67dc15a72eb770c80a
MD5 05cad391b82079a700d035069f28f49d
BLAKE2b-256 b63f4a0332cf67987278cf491eeca0bace686f5bc0d05740c6cbeb89352b6cdd

See more details on using hashes here.

File details

Details for the file oriel_cornerstone_260-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: oriel_cornerstone_260-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for oriel_cornerstone_260-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d306754c44cf7dd7cb38dff983c91e74d9f412be388885c2c528b33084d185e5
MD5 9a807f70825c5430dccb23569f9c51cd
BLAKE2b-256 8249fa9d117de3be068c6cf59b502efa81af53454a22c752320df9ba145badee

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