Skip to content

Connecting to PCO Pixelfly by PCO in Python

Instrument Card

The pco.pixelfly™ 1.3 SWIR is a high-performance machine vision camera due to its special InGaAs image sensor which is sensitive in the shortwave infrared, near infrared and visible range of the electromagnetic spectrum.

PCO Pixelfly

Device Specification: here

Manufacturer card: PCO

PCO

PCO is one of the leading manufacturers of scientific cameras: sCMOS & Highspeed camera systems, developed and produced in Kelheim Bavaria Germany.

  • Headquarters: Germany
  • Yearly Revenue (millions, USD): 7
  • Vendor Website: here

Connect to the PCO Pixelfly in Python

PROTOCOLS > SCPI

To connect to a PCO Pixelfly camera using Instrumental, you can use the following Python script:

from instrumental import instrument, list_instruments
# List all available PCO Pixelfly cameras
cameras = list_instruments('Pixelfly')
# Connect to the first camera
camera = instrument(cameras[0])
# Set the camera mode
camera.set_mode(shutter='single', trig='software', exposure='10ms', hbin=1, vbin=1, gain='low', depth=12)
# Start live video
camera.start_live_video()
# Capture an image
image = camera.latest_frame()
# Stop live video
camera.stop_live_video()
# Close the camera connection
camera.close()

This script uses the instrumental library to list all available PCO Pixelfly cameras using the list_instruments function. It then connects to the first camera in the list using the instrument function. You can perform camera operations using the camera object, and finally, close the camera connection using the close method.