Connecting to PicoHarp 300 by Picoquant in Python
Instrument Card
The PicoHarp 300 is a high-end, easy to use, plug and play Time-Correlated Single Photon Counting (TCSPC) system. It is connected to a PC through a USB 2.0 interface. The high quality and reliability of the PicoHarp 300 is expressed by a unique 5-year limited warranty.
Device Specification: here
Manufacturer card: PICOQUANT
The PicoQuant group was founded in 1996 to develop robust, compact, and easy to use time-resolved instrumentation and systems. Since April 2008 sales and support in North America is handled by PicoQuant Photonics North America Inc. In January 2010, the PicoQuant group was extended by PicoQuant Innovations, which was founded to support the increasing activities in the field of teaching, customer support, and event organization.
- Headquarters: Berlin, Germany
- Yearly Revenue (millions, USD): 14.7
- Vendor Website: here
Connect to the PicoHarp 300 in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
import timeimport numpy as npimport PyTango as pt
# Measurement parameters, these are hardcoded since this is just a demobinning = 0 # you can change thisoffset = 0tacq = 1000 # Measurement time in millisec, you can change thissyncDivider = 1 # you can change thisCFDZeroCross0 = 10 # you can change this (in mV)CFDLevel0 = 100 # you can change this (in mV)CFDZeroCross1 = 10 # you can change this (in mV)CFDLevel1 = 50 # you can change this (in mV)
# Variables to store information read from devicecounts = np.zeros(65536, dtype=np.uint32)dev = None
# Connect to the PicoHarp devicedev_name = "pico/0" # Replace with the actual device namedev = pt.DeviceProxy(dev_name)
# Initialize the devicedev.Initialize(0)
# Set measurement parametersdev.SetSyncDiv(syncDivider)dev.SetInputCFD(0, CFDLevel0, CFDZeroCross0)dev.SetInputCFD(1, CFDLevel1, CFDZeroCross1)dev.SetBinning(binning)dev.SetOffset(offset)
# Get count ratescountRate0 = dev.GetCountRate(0)countRate1 = dev.GetCountRate(1)print("Count Rate 0: %d/s" % countRate0)print("Count Rate 1: %d/s" % countRate1)
# Set stop overflowdev.SetStopOverflow(1, 65535)
# Start measurementdev.StartMeas(tacq)
# Wait for measurement to completetime.sleep(tacq / 1000)
# Stop measurementdev.StopMeas()
# Get histogram datacounts = dev.GetHistogram(0)
# Process histogram dataintegralCount = np.sum(counts)print("Total Count: %d" % integralCount)
# Close the devicedev.CloseDevice()