Example #1
0
 def test(self):
     current_path = os.getcwd()
     bitstreams_path = os.path.join(current_path, 'bitstreams')
     host = os.getenv('HOST', '192.168.1.100')
     client = KClient(host)
     assert client.is_connected
     ssh = ZynqSSH(host, 'koheron')
     ssh.load_pl(os.path.join(bitstreams_path, 'oscillo.bit'))
     driver = Oscillo(client, current_mode='pwm')
     current = 30  #mA
     driver.set_laser_current(current)
     driver.start_laser()
     assert driver.get_laser_power() > 400
Example #2
0
 def test(self):
     current_path = os.getcwd()
     bitstreams_path = os.path.join(current_path,'bitstreams')
     host = '192.168.1.4'
     client = KClient(host)        
     assert client.is_connected
     ssh = ZynqSSH(host, 'koheron')
     ssh.load_pl(os.path.join(bitstreams_path, 'oscillo.bit'))
     driver = Oscillo(client, current_mode='pwm')
     current = 30 #mA
     driver.set_laser_current(current)
     driver.start_laser()
     assert driver.get_laser_power() > 400
Example #3
0
from lase.core import KClient
from lase.drivers import Oscillo

import matplotlib.pyplot as plt
import time

# Connect to Lase
host = '192.168.1.12'
client = KClient(host)
driver = Oscillo(client)

# Enable laser
driver.start_laser()

laser_current = [0, 5, 10, 15, 20, 25, 30, 35, 40]  #mA
laser_power = []

for current in laser_current:
    driver.set_laser_current(current)
    time.sleep(0.1)
    laser_power.append(driver.get_laser_power())

plt.plot(laser_current, laser_power)
plt.xlabel('Laser current (mA)')
plt.ylabel('Laser power (u.a.)')
plt.show()

driver.stop_laser()
driver.close()
Example #4
0
from lase.core import KClient
from lase.drivers import Oscillo

import matplotlib.pyplot as plt
import time

# Connect to Lase
host = '192.168.1.12'
client = KClient(host)
driver = Oscillo(client)

# Enable laser
driver.start_laser()

laser_current = [0,5,10,15,20,25,30,35,40] #mA
laser_power = []

for current in laser_current:
    driver.set_laser_current(current)
    time.sleep(0.1)
    laser_power.append(driver.get_laser_power())


plt.plot(laser_current, laser_power)
plt.xlabel('Laser current (mA)')
plt.ylabel('Laser power (u.a.)')
plt.show()

driver.stop_laser()
driver.close()