Пример #1
0
save_file = False

file_suffix = "bare"

"""
Code
"""

keys = Keysight()
dac = Labjack()

try:    
    keys.set_range(max_amps) # experiment with different ranges for best performance.
    keys.set_output_voltage(5) # Bit of an arbitrary choice. Shouldn't matter much.
    keys.set_aper(0.1)

    # Build an array of the test frequencies
    test_volt = np.array(range(steps+1))
    test_volt = test_volt*(maximum-minimum)/steps+minimum
    actualV = np.zeros_like(test_volt)
    
    curr_av = np.array([])
    average_points = 2
    aper_time = 0.05
    # keys.set_aper(aper_time)
    
    for i, volt in enumerate(test_volt):
        dac.set_voltage(volt+0.1)
        time.sleep(sleeptime/2)
        V = dac.set_voltage(volt)
Пример #2
0
newp = TLS()


def closeall():
    sens.close()
    keys.close()
    newp.close()


try:
    """
    Initialize devices
    """
    keys.set_output_voltage(bias_voltage)
    keys.set_range(max_amps)
    keys.set_aper(0.1)  # long exposure for better averageing

    sens.set_reps(1)
    """
    Set lambda
    """
    newp.set_lambda(lam)
    """
    Saturation level:
        Granular data
        Find maximum variance point
    """
    if find_sat_ms:
        newp.filterW(1)  # Light mode

        start_integ_ms = 4
Code
"""

sens = sensor(port="COM7", print_out=False)

newp = TLS()

keys = Keysight()

try:
    """ Initialize """
    # Initilize SMU
    keys.set_output_voltage(
        bias_voltage)  # Bit of an arbitrary choice. Shouldn't matter much.
    newp.filterW(1)
    keys.set_aper(aper_time)

    # Initialize TLS
    newp.set_lambda(peak_lam)
    TLS_lam = newp.get_lambda()
    print("Wavelength: ", TLS_lam)

    # Initialize sensor
    sens.set_aper(integ_ms)
    sens.set_reps(5)

    diode = diodeCal()
    """ Get current """
    if auto_range:
        curr = 0
        while curr < max_amps * 0.8:  # dynamic range adjustment, make sure it isn't overflowing