pyccapt.control.devices_test package

Submodules

pyccapt.control.devices_test.camera_1 module

pyccapt.control.devices_test.camera_1.camera()[source]

This function demonstrates grabbing and processing images from multiple cameras using the pypylon library.

pyccapt.control.devices_test.camera_2 module

class pyccapt.control.devices_test.camera_2.MainWindow(*args: Any, **kwargs: Any)[source]

Bases: QMainWindow

image_show()[source]
set_image(image)[source]
pyccapt.control.devices_test.camera_2.camera()[source]

Demonstrates grabbing and processing images from multiple cameras using the pypylon library.

pyccapt.control.devices_test.camera_2.camera_update(cameras, main, converter, img0, img1)[source]

Update camera images and display using threading.

pyccapt.control.devices_test.counter module

pyccapt.control.devices_test.daqami module

pyccapt.control.devices_test.daqami.run_example()[source]

Runs the temperature reading example using the MCC Universal Library.

pyccapt.control.devices_test.drs module

class pyccapt.control.devices_test.drs.DRS(trigger, test, delay, sample_frequency)[source]

Bases: object

DRS class for interacting with the DRS board.

Initialize the DRS object.

Parameters:
  • trigger – 0 for internal trigger, 1 for external trigger

  • test – 0 for test mode off, 1 for test mode on

  • delay – Trigger delay in ns

  • sample_frequency – Sample frequency in GHz

delete_drs_ox()[source]

Delete the DRS object.

reader()[source]

Read data from the DRS board.

Returns:

Data array

pyccapt.control.devices_test.gates module

pyccapt.control.devices_test.lamp_usb_switch module

class pyccapt.control.devices_test.lamp_usb_switch.USBSwitch(dll_path)[source]

Bases: object

This class is used to control the USB switch.

Initialize the USB switch.

Parameters:

dll_path (str) – Path to the USBaccessX64.dll file.

Returns:

None

switch_off(switch_number)[source]

Switch off the USB switch.

Parameters:

switch_number (int) – Switch number. It is 16 first the first switch.

Returns:

None

switch_on(switch_number)[source]

Switch on the USB switch.

Parameters:

switch_number (int) – Switch number. It is 16 first the first switch.

Returns:

None

pyccapt.control.devices_test.laser_nkt_origami module

pyccapt.control.devices_test.serial_com_cryovac module

pyccapt.control.devices_test.serial_com_cryovac.main()[source]

pyccapt.control.devices_test.serial_com_edwards module

class pyccapt.control.devices_test.serial_com_edwards.EdwardsAGC(port='COM1')[source]

Bases: object

Primitive driver for Edwards Active Gauge Controller.

Complete manual can be found at: http://www.idealvac.com/files/brochures/Edwards_AGC_D386-52-880_IssueM.pdf

comm(command)[source]

Implements basic communication.

current_error()[source]

Read the current error code.

gauge_type(gauge_number)[source]

Return the type of gauge.

my_commands()[source]

Return the software version of the controller.

pressure_unit(gauge_number)[source]

Read the unit of a gauge.

read_pressure(gauge_number)[source]

Read the pressure of a gauge.

pyccapt.control.devices_test.serial_com_pfeiffer module

pyccapt.control.devices_test.serial_com_v_dc module

pyccapt.control.devices_test.serial_com_v_p module

pyccapt.control.devices_test.serial_com_v_p.command(ser, cmd)[source]

pyccapt.control.devices_test.serial_ports_list module

pyccapt.control.devices_test.siglent_signal_generator module

pyccapt.control.devices_test.tdc_roentec_t module

class pyccapt.control.devices_test.tdc_roentec_t.TdcRoentec(buf_size, time_out)[source]

Bases: object

get_data_tdc_buf()[source]
init_tdc()[source]
run_tdc()[source]
stop_tdc()[source]
pyccapt.control.devices_test.tdc_roentec_t.experiment_measure_buf(buffer_size, time_out)[source]

pyccapt.control.devices_test.tdc_surface_concept_t_1 module

Copyright 2019 Surface Concept GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Created on Thu Sep 19 16:07:32 2019

Test of the user callbacks interface.

class pyccapt.control.devices_test.tdc_surface_concept_t_1.UCB1(lib, dev_desc)[source]

Bases: usercallbacks_pipe

on_dld_event(dld_events, nr_dld_events)[source]
on_end_of_meas()[source]
on_millisecond()[source]
on_start_of_meas()[source]
on_tdc_event(tdc_events, nr_tdc_events)[source]
reset_counters()[source]
class pyccapt.control.devices_test.tdc_surface_concept_t_1.UCB2(lib, dev_desc)[source]

Bases: usercallbacks_pipe

on_dld_event(dld_events, nr_dld_events)[source]
on_end_of_meas()[source]
on_millisecond()[source]
on_start_of_meas()[source]
on_tdc_event(tdc_events, nr_tdc_events)[source]
reset_min_max()[source]
pyccapt.control.devices_test.tdc_surface_concept_t_1.test1()[source]

pyccapt.control.devices_test.tdc_surface_concept_t_2 module

class pyccapt.control.devices_test.tdc_surface_concept_t_2.BufDataCB4(lib, dev_desc, data_field_selection=116, max_buffered_data_len=500000, dld_events=True)[source]

Bases: buffered_data_callbacks_pipe

Parameters:
  • lib (scTDClib) – a scTDClib object.

  • dev_desc (int) – device descriptor as returned by sc_tdc_init_inifile(…).

  • data_field_selection (int, optional) – a ‘bitwise or’ combination of SC_DATA_FIELD_xyz constants. The default is SC_DATA_FIELD_TIME.

  • max_buffered_data_len (int, optional) – The number of events that are buffered before invoking the on_data callback. Less events can also be received in the on_data callback, when the user chooses to return True from the on_end_of_meas callback. The default is (1<<16).

  • dld_events (bool, optional) – if True, receive DLD events. If False, receive TDC events. Depending on the configuration in the tdc_gpx3.ini file, only one type of events may be available. The default is True.

Return type:

None.

on_data(d)[source]

Override this method to process the data.

Parameters:

data (dict) –

A dictionary containing several numpy arrays. The selection of arrays depends on the data_field_selection value used during initialization of the class. The key names in this dictionary, that are always present, are:

event_index, data_len

Keywords related to regular event data are:

subdevice, channel, start_counter, time_tag, dif1, dif2, time, master_rst_counter, adc, signal1bit

Keywords related to indexing arrays are:

som_indices, ms_indices. These contain event indices where the start of a measurement happened, or a millisecond count up happened.

Return type:

None.

on_end_of_meas()[source]

Override this method to trigger actions at the end of the measurement. Do not call methods that start the next measurement from this callback. This cannot succeed. Use a signalling mechanism into your main thread, instead.

Returns:

True indicates that the pipe should transfer the remaining buffered events immediately after returning from this callback. False indicates that the pipe may continue buffering the next measurements until the max_buffered_data_len threshold is reached.

Return type:

bool

pyccapt.control.devices_test.tdc_surface_concept_t_2.run()[source]

pyccapt.control.devices_test.tdc_surface_concept_t_3 module

class pyccapt.control.devices_test.tdc_surface_concept_t_3.BufDataCB4(lib, dev_desc, data_field_selection, dld_events, max_buffered_data_len=500000)[source]

Bases: buffered_data_callbacks_pipe

Parameters:
  • lib (scTDClib) – a scTDClib object.

  • dev_desc (int) – device descriptor as returned by sc_tdc_init_inifile(…).

  • data_field_selection (int, optional) – a ‘bitwise or’ combination of SC_DATA_FIELD_xyz constants. The default is SC_DATA_FIELD_TIME.

  • max_buffered_data_len (int, optional) – The number of events that are buffered before invoking the on_data callback. Less events can also be received in the on_data callback, when the user chooses to return True from the on_end_of_meas callback. The default is (1<<16).

  • dld_events (bool, optional) – if True, receive DLD events. If False, receive TDC events. Depending on the configuration in the tdc_gpx3.ini file, only one type of events may be available. The default is True.

Return type:

None.

on_data(d)[source]

Override this method to process the data.

Parameters:

data (dict) –

A dictionary containing several numpy arrays. The selection of arrays depends on the data_field_selection value used during initialization of the class. The key names in this dictionary, that are always present, are:

event_index, data_len

Keywords related to regular event data are:

subdevice, channel, start_counter, time_tag, dif1, dif2, time, master_rst_counter, adc, signal1bit

Keywords related to indexing arrays are:

som_indices, ms_indices. These contain event indices where the start of a measurement happened, or a millisecond count up happened.

Return type:

None.

on_end_of_meas()[source]

Override this method to trigger actions at the end of the measurement. Do not call methods that start the next measurement from this callback. This cannot succeed. Use a signalling mechanism into your main thread, instead.

Returns:

True indicates that the pipe should transfer the remaining buffered events immediately after returning from this callback. False indicates that the pipe may continue buffering the next measurements until the max_buffered_data_len threshold is reached.

Return type:

bool

pyccapt.control.devices_test.tdc_surface_concept_t_3.check4()[source]

pyccapt.control.devices_test.thorlabs_controller module

pyccapt.control.devices_test.thorlabs_controller.thorlab(degree, initialize=False)[source]

Initialize the Thorlabs controller and set it to the specified degree.

Parameters:
  • degree (float) – The degree to move the motor to.

  • initialize (bool) – Whether to perform motor initialization.

Module contents