delayBetweenPoints = 0.5
delayBetweenRows = 0.

xLims = (820, 830)  # (0, 5)
xStep = 2

voltsDirectory = r'C:\Users\QPL\Desktop\temp_measurements'

#######################
# instruments

laserCtrl = mscan.SolstisLaserScanner(laser_ip_address='192.168.1.222', pc_ip_address='192.168.1.120', port_number=39933, timeout=40, finish_range_radius=0.01, max_nb_of_fails=10)

#spectroCtrl = mdet.ActonLockinCtrl(lockinVisaAddress=r"GPIB0::14::INSTR")
multimeterCtrl = mdet.MultimeterCtrl(VISA_address=r'ASRL17::INSTR')

d = datetime.datetime.now()
voltsFilePath = os.path.join(voltsDirectory, 'powerInVolts_{:%Y-%m-%d_%H-%M-%S}.txt'.format(d))

# Scanning program
laser_scan = mapper.XYScan(scanner_axes=laserCtrl, detectors=[multimeterCtrl])
laser_scan.set_range(xLims=xLims, xStep=xStep)
laser_scan.set_delays(between_points=delayBetweenPoints, between_rows=delayBetweenRows)
laser_scan.set_back_to_zero()

laser_scan.run_scan()

laser_scan.save_to_txt(voltsFilePath)

Exemple #2
0
xLims = (0, 1)  # (10, 100)
xStep = 0.3

yLims = (0, 1)  # (10, 140)
yStep = 0.3

voltsDirectory = r'C:\Users\QPL\Desktop\temporary_meas'

#######################
# instruments
attoCtrl = mscan.AttocubeVISA(VISA_address=r'ASRL6::INSTR', chX=1, chY=2)
#spectroCtrl = mdet.ActonLockinCtrl(lockinVisaAddress=r"GPIB0::14::INSTR")
spectroCtrl2 = mdet.PylonNICtrl(sender_port="/Weetabix/port1/line4",
                                receiver_port="/Weetabix/port1/line7")

#voltmeterCtrl = mdet.MultimeterCtrl(VISA_address=r'GPIB0::22::INSTR')

#d = datetime.datetime.now()
#voltsFilePath = os.path.join(voltsDirectory, 'powerInVolts_{:%Y-%m-%d_%H-%M-%S}.txt'.format(d))

# Scanning program
XYscan = mapper.XYScan(scanner_axes=attoCtrl, detectors=[spectroCtrl2])
XYscan.set_range(xLims=xLims, xStep=xStep, yLims=yLims, yStep=yStep)
XYscan.set_delays(between_points=delayBetweenPoints,
                  between_rows=delayBetweenRows)
#XYscan.set_back_to_zero()
XYscan.run_scan()

#XYscan.save_to_txt(voltsFilePath, array=XYscan.counts[1], flatten=True)
##psuCtrl = mscan.Keithley2220_neg_pos(VISA_address=r'GPIB0::10::INSTR', ch_neg=1, ch_pos=2)
psuCtrl = mscan.Keithley2220_negpos(VISA_address=r'GPIB0::10::INSTR',
                                    ch_neg=1,
                                    ch_pos=2)
psuCtrl.set_smooth_delay(0.5)

spectroCtrl = mdet.ActonNICtrl(sender_port="/Weetabix/port2/line0",
                               receiver_port="/Weetabix/port2/line4")
multimeterCtrl = mdet.MultimeterCtrl(VISA_address=r'GPIB0::13::INSTR')

d = datetime.datetime.now()
voltsFilePath = os.path.join(
    voltsDirectory,
    'LED4_botGND_topGreenWhite_amp6_{:%Y-%m-%d_%H-%M-%S}.txt'.format(d))

# Scanning program
#volts_scan = mapper.XYScan(scanner_axes=[psuCtrl[0]], detectors=[spectroCtrl, multimeterCtrl])

volts_scan = mapper.XYScan(scanner_axes=[psuCtrl[0]],
                           detectors=[multimeterCtrl])

volts_scan.set_range(xLims=xLims, xStep=xStep)
volts_scan.set_delays(between_points=delayBetweenPoints,
                      between_rows=delayBetweenRows)
#volts_scan.set_back_to_zero()

volts_scan.run_scan()

volts_scan.save_to_txt(voltsFilePath, array=volts_scan.counts)
Exemple #4
0
#spectroCtrl = mdet.ActonLockinCtrl(lockinVisaAddress=r"GPIB0::14::INSTR")
lockinCtrl = mscan.LockInDAC (visa_address = r'GPIB0::12::INSTR', channels = [1])
#spectroCtrl2 = mdet.PylonNICtrl(sender_port="/Weetabix/port1/line4", receiver_port="/Weetabix/port1/line7")
delayCtrl = mscan.NewportDelayStage(chX = u'ASRL23::INSTR')
voltmeterCtrl = mdet.MultimeterCtrl(VISA_address=u'GPIB0::23::INSTR', mode='voltage', agilent=True, work_folder=None)

#highfinese = mdet.HighFinese(channel=2)

#tempCtrl =  mdet.LakeShore(address='COM5',channel='A')


d = datetime.datetime.now()
voltsFilePath = os.path.join(voltsDirectory, 'powerInVolts_{:%Y-%m-%d_%H-%M-%S}.txt'.format(d))

# Scanning program
XYscan = mapper.XYScan(scanner_axes=delayCtrl, detectors=[voltmeterCtrl])
XYscan.set_range(xLims=xLims, xStep=xStep)
XYscan.set_delays(between_points=delayBetweenPoints, between_rows=delayBetweenRows)
XYscan.init_detectors(XYscan._detectors)
XYscan.set_back_to_zero()
XYscan.run_scan()

## Print output
#
xdata = XYscan.xPositions
print ('Output :',XYscan.detector_readout_0.flatten())
try:
    print ('Output :',XYscan.detector_readout_1.flatten())
except:
    print ('No device # 2 found')
try:
delayBetweenRows = 0.02  #in seconds?

xLims = (a - d, a + d)  # explicitly states x-range
yLims = (b - d, b + d)  # explicitly states y-range
xStep = 0.01  # distance between points
yStep = xStep

min_lim = -10.  # minimum voltage that can be applied to the galvo
max_lim = 10.  # maximum voltage that can be applied to the galvo

GalvoCtrl = mscan.LJTickDAC(
)  # this is the class for using the Labjack with tick (object that controls the galvo here)
Swabianctrl = mdet.Swabian_Ctrl(
)  # this is the class for the Swabian timetagger (object that takes the readings)
"""Initialising the Galvo scan in X and Y"""
XYscan = mapper.XYScan(scanner_axes=GalvoCtrl, detectors=[
    Swabianctrl
])  # the galvo scan triggers and looks for a response from the detector listed
XYscan.set_range(xLims=xLims, xStep=xStep, yLims=yLims, yStep=yStep)
XYscan.set_delays(between_points=delayBetweenPoints,
                  between_rows=delayBetweenRows)
"""Performing the scan"""
for i in range(0, 1):
    XYscan.run_scan(silence_errors=False)
#    print('\n', i, '\n')

XYscan.plot_counts()
XYscan.save_to_txt(CountsFilePath, flatten=True)
print(
    "(Don't worry, that statement is part of a general code. It's not really volts, it's counts)"
)
Exemple #6
0
                             'powerInVolts_{:%Y-%m-%d_%H-%M-%S}.txt'.format(d))
reload(mapper)
reload(mscan)
reload(mdet)

a = 2.456
b = -0.70
d = 0.07
xStep = 0.002
delayBetweenPoints = 0.02
delayBetweenRows = 0.02

xLims = (a - d, a + d)
yLims = (b - d, b + d)
yStep = xStep

min_lim = -10.
max_lim = 10.

GalvoCtrl = mscan.LJTickDAC()
voltmeterCtrl = mdet.MultimeterCtrl(VISA_address='ASRL14::INSTR')
XYscan = mapper.XYScan(scanner_axes=GalvoCtrl, detectors=[voltmeterCtrl])
XYscan.set_range(xLims=xLims, xStep=xStep, yLims=yLims, yStep=yStep)
XYscan.set_delays(between_points=delayBetweenPoints,
                  between_rows=delayBetweenRows)

for i in range(0, 1):
    XYscan.run_scan(silence_errors=False)
#    print('\n', i, '\n')
XYscan.plot_counts()
XYscan.save_to_txt(voltsFilePath, flatten=True)
import datetime
import os.path
import sys

from measurements.libs.QPLMapper import mapper_scanners as mscan, mapper_detectors as mdet
from measurements.libs.QPLMapper import mapper

if sys.version_info.major == 3:
    from importlib import reload

xStep = 0.5
yStep = xStep

delayBetweenPoints = 0.1
delayBetweenRows = 0.1

xLims = (0, 2)
yLims = (0, 2)

Motor = mscan.Standa(conversion_factor=1000)

dummyAPD = mdet.dummyAPD(r"C:\Users\Daniel\Desktop")

XYscan = mapper.XYScan(scanner_axes=Motor, detectors=[dummyAPD])

XYscan.set_range(xLims=xLims, xStep=xStep, yLims=yLims, yStep=yStep)
XYscan.set_delays(between_points=delayBetweenPoints,
                  between_rows=delayBetweenRows)
#XYscan.run_scan()
#XYscan.plot_counts()
xLims = (0, 9)  # (0, 5)
xStep = 0.1

voltsDirectory = r'C:\Users\QPL\Desktop\temp_measurements'

spectroCtrl = mdet.ActonNICtrl(sender_port="/Weetabix/port2/line0",
                               receiver_port="/Weetabix/port2/line4")
#multimeterCtrl = mdet.MultimeterCtrl(VISA_address=r'GPIB0::13::INSTR')

magnetCtrl = mscan.MagnetAttocube(address=r'ASRL22::INSTR',
                                  tolerance=0.001,
                                  nr_tolerance_reps=5,
                                  sweep_to_zero_at_end=True)

d = datetime.datetime.now()
voltsFilePath = os.path.join(
    voltsDirectory,
    'LED4_botGND_topGreenWhite_amp6_{:%Y-%m-%d_%H-%M-%S}.txt'.format(d))

# Scanning program
#volts_scan = mapper.XYScan(scanner_axes=[psuCtrl[0]], detectors=[spectroCtrl, multimeterCtrl])

magnet_scan = mapper.XYScan(scanner_axes=magnetCtrl, detectors=[spectroCtrl])

magnet_scan.set_range(xLims=xLims, xStep=xStep)
magnet_scan.set_delays(between_points=delayBetweenPoints,
                       between_rows=delayBetweenRows)
magnet_scan.set_back_to_zero()

magnet_scan.run_scan(silence_errors=False, do_move_smooth=False)
voltsDirectory = r'C:\Users\QPL\Desktop\temp_measurements'

#######################
# instruments
testscanCtrl = mscan.TestScanner(address=1, channels=[1, 2, 3])
spectroCtrl = mdet.ActonNICtrl(sender_port="/Weetabix/port2/line0",
                               receiver_port="/Weetabix/port2/line4")
multimeterCtrl = mdet.MultimeterCtrl(VISA_address=r'ASRL17::INSTR')

d = datetime.datetime.now()
voltsFilePath = os.path.join(voltsDirectory,
                             'powerInVolts_{:%Y-%m-%d_%H-%M-%S}.txt'.format(d))

# Scanning program

XYZ_scan = mapper.XYScan(scanner_axes=[testscanCtrl[0], testscanCtrl[1]],
                         detectors=[spectroCtrl, multimeterCtrl])
XYZ_scan.set_range(xLims=xLims, xStep=xStep, yLims=yLims, yStep=yStep)
XYZ_scan.set_delays(between_points=delayBetweenPoints,
                    between_rows=delayBetweenRows)

total_counts = []

zNbOfSteps = int(
    abs(np.floor((float(zLims[1]) - float(zLims[0])) / float(zStep))) + 1)
zPositions = np.linspace(zLims[0], zLims[1], zNbOfSteps)

for z in zPositions:
    testscanCtrl[2].move(z)

    XYZ_scan.run_scan(close_instruments=False)
    total_counts.append(XYZ_scan.counts)
d = datetime.datetime.now()
voltsDirectory = r'C:\Users\ted\Dropbox (Heriot-Watt University Team)\RES_EPS_Quantum_Photonics_Lab\Setups\Bay5-LT\Two spot microscope\Power stability measuremnet'
voltsFilePath = os.path.join(voltsDirectory,
                             'powerInVolts_{:%Y-%m-%d_%H-%M-%S}.txt'.format(d))
reload(mapper)
reload(mscan)
reload(mdet)

xStep = 1

delayBetweenPoints = 60  #seconds
delayBetweenRows = 1  # seconds

xLims = (0, 720)
yLims = (0, 0)
yStep = xStep

dummyscanner = mscan.TestScanner()
voltmeterCtrl = mdet.MultimeterCtrl(VISA_address=r'ASRL13::INSTR')

XYscan = mapper.XYScan(scanner_axes=dummyscanner, detectors=[voltmeterCtrl])
XYscan.set_range(xLims=xLims, xStep=xStep, yLims=yLims, yStep=yStep)
XYscan.set_delays(between_points=delayBetweenPoints,
                  between_rows=delayBetweenRows)

XYscan.run_scan(silence_errors=False)

y = XYscan.detector_readout_0.flatten()
x = np.arange(0, len(y) * delayBetweenPoints, delayBetweenPoints)
np.savetxt(voltsFilePath, np.transpose([x, y]))
Exemple #11
0
                                receiver_port="/Weetabix/port1/line7")

voltmeterCtrl = mdet.MultimeterCtrl(VISA_address=r'GPIB0::23::INSTR',
                                    mode='voltage',
                                    agilent=True,
                                    work_folder=None)

highfinese = mdet.HighFinese(channel=2)

tempCtrl = mdet.LakeShore(address='COM5', channel='A')

#d = datetime.datetime.now()
#voltsFilePath = os.path.join(voltsDirectory, 'powerInVolts_{:%Y-%m-%d_%H-%M-%S}.txt'.format(d))

# Scanning program
XYscan = mapper.XYScan(scanner_axes=lockinCtrl,
                       detectors=[voltmeterCtrl, highfinese, tempCtrl])
XYscan.set_range(xLims=xLims, xStep=xStep)
XYscan.set_delays(between_points=delayBetweenPoints,
                  between_rows=delayBetweenRows)
XYscan.init_detectors(XYscan._detectors)
#XYscan.set_back_to_zero()
XYscan.run_scan()

## Print output
#
print('Output :', XYscan.detector_readout_0.flatten())
try:
    print('Output :', XYscan.detector_readout_1.flatten())
except:
    print('No device # 2 found')
try: