DAQ¶
Data acquisition (DAQ) module that contains interface classes to various hardware boards.
- class openrri.daq.BaseDevice¶
Abstract device base class. It defines the mandatory interface every device class must implement.
- close()¶
Device-specific method responsible for closing an active device connection.
- get_data(meas_time, sample_rate=None, channels=None)¶
Get data from specified channels.
- Parameters:
- Returns:
dictionary where each key corresponds to a channel name and its value is a NumPy array containing the channel’s data.
- Return type:
- init_device()¶
Device-specific initialization method.
- start_modulation(freq=20000, low=0.2, high=0.4, phase=0)¶
Initiates modulation with specified parameters.
This function sends a command to start sine wave modulation using specified parameters. It has options to control the frequency, high and low voltages, and the phase of the sine wave.
- Parameters:
freq (int) – Frequency of the sine wave modulation in Hertz. Defaults to 20000.
low (float) – Low voltage level of the output wave. It determines the minimum voltage level that the sine wave will reach. Defaults to 0.2.
high (float) – High voltage level of the output wave. It specifies the maximum voltage level that the sine wave will achieve. Defaults to 0.4.
phase (float) – Phase shift of the sine wave in rad. Defaults to 0 rad.
- class openrri.daq.Board(board_id, board_ip, soldered=False)¶
Wrapper class around the different device classes.
- close()¶
Close the connection to the device.
- get_data(meas_time, sample_rate=None, channels=None)¶
Get data from specified channels.
- Parameters:
- Returns:
dictionary where each key corresponds to a channel name and its value is a NumPy array containing the channel’s data.
- Return type:
- start_modulation(freq=20000, low=0.2, high=0.4, phase=0)¶
Initiates modulation with specified parameters.
This function sends a command to start sine wave modulation using specified parameters. It has options to control the frequency, high and low voltages, and the phase of the sine wave.
- Parameters:
freq (float) – Frequency of the sine wave modulation in Hertz. Defaults to 20000.
low (float) – Low voltage level of the output wave. It determines the minimum voltage level that the sine wave will reach. Defaults to 0.2.
high (float) – High voltage level of the output wave. It specifies the maximum voltage level that the sine wave will achieve. Defaults to 0.4.
phase (float) – Phase shift of the sine wave in rad. Defaults to 0 rad.
- Returns:
None
- class openrri.daq.DummyDevice¶
Dummy device that implements all mandatory interface methods in a NO-OP manner.
- close()¶
Device-specific method responsible for closing an active device connection.
- get_data(meas_time, sample_rate=None, channels=None)¶
Get data from specified channels.
- Parameters:
- Returns:
dictionary where each key corresponds to a channel name and its value is a NumPy array containing the channel’s data.
- Return type:
- init_device()¶
Device-specific initialization method.
- start_modulation(freq=20000, low=0.2, high=0.4, phase=0)¶
Initiates modulation with specified parameters.
This function sends a command to start sine wave modulation using specified parameters. It has options to control the frequency, high and low voltages, and the phase of the sine wave.
- Parameters:
freq (int) – Frequency of the sine wave modulation in Hertz. Defaults to 20000.
low (float) – Low voltage level of the output wave. It determines the minimum voltage level that the sine wave will reach. Defaults to 0.2.
high (float) – High voltage level of the output wave. It specifies the maximum voltage level that the sine wave will achieve. Defaults to 0.4.
phase (float) – Phase shift of the sine wave in rad. Defaults to 0 rad.
- class openrri.daq.Nucleo(ip)¶
NUCLEO-H743ZI Board class.
- close()¶
Device-specific method responsible for closing an active device connection.
- get_data(meas_time, sample_rate=None, channels=None)¶
Get data from specified channels.
- Parameters:
- Returns:
dictionary where each key corresponds to a channel name and its value is a NumPy array containing the channel’s data.
- Return type:
- init_device()¶
Device-specific initialization method.
- start_modulation(freq=20000, low=0.2, high=0.4, phase=0)¶
Initiates modulation with specified parameters.
This function sends a command to start sine wave modulation using specified parameters. It has options to control the frequency, high and low voltages, and the phase of the sine wave.
- Parameters:
freq (int) – Frequency of the sine wave modulation in Hertz. Defaults to 20000.
low (float) – Low voltage level of the output wave. It determines the minimum voltage level that the sine wave will reach. Defaults to 0.2.
high (float) – High voltage level of the output wave. It specifies the maximum voltage level that the sine wave will achieve. Defaults to 0.4.
phase (float) – Phase shift of the sine wave in rad. Defaults to 0 rad.
- class openrri.daq.RedPitaya(ip, soldered=False)¶
RedPitaya STEMlab 125-14 board class.
- close()¶
Device-specific method responsible for closing an active device connection.
- get_data(meas_time, sample_rate=125000000, channels=None)¶
Get data from specified channels.
- Parameters:
- Returns:
dictionary where each key corresponds to a channel name and its value is a NumPy array containing the channel’s data.
- Return type:
- init_device()¶
Device-specific initialization method.
- start_modulation(freq=20000, low=0.2, high=0.4, phase=0)¶
Initiates modulation with specified parameters.
This function sends a command to start sine wave modulation using specified parameters. It has options to control the frequency, high and low voltages, and the phase of the sine wave.
- Parameters:
freq (int) – Frequency of the sine wave modulation in Hertz. Defaults to 20000.
low (float) – Low voltage level of the output wave. It determines the minimum voltage level that the sine wave will reach. Defaults to 0.2.
high (float) – High voltage level of the output wave. It specifies the maximum voltage level that the sine wave will achieve. Defaults to 0.4.
phase (float) – Phase shift of the sine wave in rad. Defaults to 0 rad.