Introduction¶
Before diving into how the remote control for the Retina works, it has to be mentioned that we offer a Python controller class to facilitate easy remote control via Python. Depending on which control software your Retina driver runs, this is either WebSQController (for the WebSQ driver) or NerveController (for the Nerve driver, the newer control software for the Retina). The latest version of both, along with full documentation, is available in the Help section of the user interface. If your goal is to get started quickly we would recommend you access this class and look at the examples here. Use the WebSQ/Nerve tabs below to switch this whole page to match your driver.
Methods of communication¶
JSON RPC¶
In order to send commands to the Retina driver we make use of the JSON RPC protocol. Commands in this format can be send to the API endpoint: [Driver IP]/api. This allows for communication with the driver, independent of platform or language. A request object in a JSON RPC command is expected to have the following format:
{
"method": "<method name>",
"params": "<parameters for the method>",
"jsonrpc": "2.0",
"id": "<identifier>"
}
API¶
This table lists every JSON-RPC method exposed by the driver software, together with the params it accepts (as sent in a request’s params object) and the response it returns. It is generated automatically from the websq and nerve driver source code, so it always reflects what the running driver actually supports. Use the WebSQ/Nerve tabs below to match your driver.
Method |
Params |
Response |
|---|---|---|
|
— |
Not documented in source. |
|
— |
Not documented in source. |
|
— |
Empties the temperature data file. |
|
— |
Returns the device options for the automatic cooldown. |
|
— |
Returns dictionary with all the automatic cooldown settings |
|
— |
Returns a dictionary with all the backend settings |
|
|
Returns the bias current in μA. |
|
— |
Returns a dictionary with all the devices settings |
|
— |
Returns a dictionary With Disk usage details |
|
— |
Not documented in source. |
|
any (see response) |
Generates a file with all relevant data of the latest IV sweep. |
|
|
Returns the frequency latching lower limit. |
|
|
Returns the frequency latching upper limit. |
|
|
Returns the latching voltage in mV. |
|
|
Returns the Tornado server log. |
|
|
Not documented in source. |
|
|
Returns the pgaGain. |
|
|
Returns the prescale. |
|
— |
Not documented in source. |
|
— |
Returns the serial number. |
|
— |
Returns the entire settings model as a dictionary. |
|
— |
Returns the settings without any data. |
|
— |
Returns the entirety of the temperature data. |
|
|
Returns the trigger voltage in mV. |
|
|
Returns the unlatch Sequence number. |
|
— |
Gives the JSON schema for the settings model. |
|
— |
Not documented in source. |
|
|
Not documented in source. |
|
|
Not documented in source. |
|
— |
Not documented in source. |
|
|
Set the bias currents for one or multiple channels, values given in μA. |
|
|
Not documented in source. |
|
|
Set the lower limit frequence, values given in (Counts / second) |
|
|
Set the upper limit frequence, values given in (Counts / second) |
|
|
Set the latching voltage, values given in mV. |
|
|
Not documented in source. |
|
any (see response) |
Not documented in source. |
|
|
Set the pgaGain. |
|
|
Set the prescale. |
|
|
Returns the serial number. |
|
any (see response) |
Updates the settings on the backend. |
|
|
Overwrites the settings with those of a given file. |
|
|
Set the trigger voltage, values given in mV. |
|
|
Set the unlatching sequences, values given in (10ms) sequences. |
|
— |
Shuts down the driver completely. |
|
|
Starts the automatic cooldown process |
|
|
Start an IV sweep. |
|
|
Not documented in source. |
|
|
Stops the automatic cooldown process |
|
— |
Stops the execution of all IV sweeps on the backend. |
|
|
Not documented in source. |
|
— |
Not documented in source. |
|
— |
Not documented in source. |
|
|
Updates the driver setup/configuration. |
|
|
Updates the temperature calibrations files |
|
|
Generates a file with all relevant data of the latest IV sweep. |
Nerve’s RPC handlers do not carry source-level descriptions, so the response column only points to the Go handler that implements each method.
Method |
Params |
Response |
|---|---|---|
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
|
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
— |
Not documented in source (see |
|
|
Not documented in source (see |
|
— |
Not documented in source (see |
|
|
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
|
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
— |
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
— |
Not documented in source (see |
|
|
Not documented in source (see |
|
|
Not documented in source (see |
|
— |
Not documented in source (see |
|
|
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
— |
Not documented in source (see |
|
|
Not documented in source (see |
|
— |
Not documented in source (see |
A full list of methods, with expected parameters and responses, can be found in the appendix under API.
Websocket (Readout only)¶
The websocket outputs a direct stream of bytes which gives the most efficient way to readout data by far. You can access the websocket by listening to the following endpoint: [Driver IP]/counts. The exact framing of these bytes depends on which control software your driver runs.
The messages which are send here consist of 32 bytes, and structured as show in table Table: Channel Unit message structure (WebSQ). Every measurement interval of 10ms, these messages will be bundled and send to the websocket as one byte string. These messages will have to be split up again for readout.
Parameter |
Type |
Bytes |
Description |
|---|---|---|---|
McuId |
Int8 |
1 |
ID of the Retina Box. |
CuId |
Int8 |
1 |
ID of the Retina Channel Unit. |
cuStatus |
Int8 |
1 |
Status of the Channel Unit, see table Table: Status codes of the channel units in the appendix for more information |
Padding |
- |
1 |
Can any 1 byte value |
MonitorV |
Float |
4 |
Monitor Voltage (V) |
biasI |
Float |
4 |
Bias Current (A) |
Counts |
Int32 |
4 |
Counts measured in one measurement interval (10ms) |
intSize |
Int32 |
4 |
Size of integration interval in Number of measurement intervals of 10ms |
Rank |
Int32 |
4 |
Channel Rank |
Time |
Double |
8 |
Timestamp |
Every websocket frame starts with a single type byte (0 for counts, 1 for IV data, which is currently ignored by the controller), followed by a 12 byte header described in table Table: Counts header structure (Nerve), followed by one 9 byte record per channel unit as described in table Table: Channel Unit message structure (Nerve). A single frame can bundle records for multiple channel units and multiple measurement intervals.
Parameter |
Type |
Bytes |
Description |
|---|---|---|---|
Time |
UInt64 |
8 |
Timestamp (ms) |
intSize |
UInt32 |
4 |
Size of integration interval in Number of measurement intervals of 10ms |
Parameter |
Type |
Bytes |
Description |
|---|---|---|---|
cuStatus |
Int8 |
1 |
Status of the Channel Unit, see table Table: Status codes of the channel units in the appendix for more information |
Channel Number |
UInt32 |
4 |
Channel number of the Channel Unit. |
Counts |
UInt32 |
4 |
Counts measured in one measurement interval (10ms) |
Python¶
Installation instructions, usage examples, and the full API reference for the Python controller class are provided below.
Installation¶
Download the Python controller class matching your driver software below, and place it in the same directory as your script. It can then be imported directly, as shown in the examples below.
Download the controller script: WebSQController.py
Download the controller script: NerveController.py
Examples¶
We include a few examples of how to use the Python controller class matching your driver software. The latest versions of these will be available in the help section of the user interface. We explore a few basic functionalities.
Collecting Counts¶
This example collects 20 counts messages for each channel from the websocket, at the driver’s current integration time. This should return, for each of the 20 samples, a list of the counts for every channel.
from WebSQController import WebSQController
# Please change this to be the IP address of the driver in your network
websq_domain = 'http://192.168.10.10/'
sq = WebSQController(websq_domain)
# Collects 20 counts messages for every channel.
counts = sq.getNCounts(20)
print(counts)
IV Sweeping¶
This example performs and IV sweep and prints the result for the first channel.
from WebSQController import WebSQController
# Please change this to be the IP address of the driver in your network
websq_domain = 'http://192.168.10.10/'
sq = WebSQController(websq_domain)
traces = sq.sweepIv(0, 50, 1, 100)
channels = list(traces.keys())
first_channel = channels[0]
print(f"Data for channel {first_channel}:")
print("Bias Current (uA):")
print(traces[first_channel]['biasI'])
print("Monitor Voltage (V):")
print(traces[first_channel]['monitorV'])
Setting the Bias Current¶
This is an example of how to set values on the driver for a specific channel.
from WebSQController import WebSQController
# Please change this to be the IP address of the driver in your network
websq_domain = 'http://192.168.10.10/'
sq = WebSQController(websq_domain)
print("Setting the bias current to 20 uA, for channel 1")
sq.setBiasI(20e-6, channels=[1])
print("Getting the bias current value of channel 1:")
print(sq.getBiasI(channels=[1]))
Collecting Counts¶
This example collects 20 counts messages for each channel from the websocket, at the driver’s current integration time. This should return, for each of the 20 samples, a list of the counts for every channel.
from NerveController import NerveController
# Please change this to be the IP address of the driver in your network
nerve_domain = 'http://192.168.10.10/'
sq = NerveController(nerve_domain)
# Collects 20 counts messages for every channel.
counts = sq.getNCounts(20)
print(counts)
IV Sweeping¶
This example starts an IV sweep, waits for it to finish, and prints the result for the first channel.
import time
from NerveController import NerveController
# Please change this to be the IP address of the driver in your network
nerve_domain = 'http://192.168.10.10/'
sq = NerveController(nerve_domain)
sq.startIv(0, 50, 1, 100)
# Wait for the sweep to finish: 51 steps of 100 ms, plus a bit of overhead.
time.sleep(6)
sq.stopIv()
traces = sq.getIvData()
channels = list(traces.keys())
first_channel = channels[0]
print(f"Data for channel {first_channel}:")
print("Bias Current (uA):")
print(traces[first_channel]['biasI'])
print("Monitor Voltage (V):")
print(traces[first_channel]['monitorV'])
Setting the Bias Current¶
This is an example of how to set values on the driver for a specific channel.
from NerveController import NerveController
# Please change this to be the IP address of the driver in your network
nerve_domain = 'http://192.168.10.10/'
sq = NerveController(nerve_domain)
print("Setting the bias current to 20 uA, for channel 1")
sq.setBiasI(20e-6, channels=[1])
print("Getting the bias current value of channel 1:")
print(sq.getBiasI(channels=[1]))
Methods¶
This section contains the full API reference for the Python controller class matching your driver software, generated directly from its docstrings.
-
class WebSQController.WebSQController(domain=
None)¶ Bases:
JsonRpcThis class can send requests to the websq via the JSON RPC protocol. Set the domain of the websq in the initialization.
A lot of funtionality requires the settings object. Function that rely on the settings object can be passed settings as a keyword argument to prevent retrieving the settings object multiple times.
Some functionality accepts the channels parameter. This parameter determines from which channels you pull the data. The channels parameter is a list of ranks or locations of the channels. Ranks can be given as integers, and locations can be given as either a tuple or a list formatted as [mcuId, cuId].
The rankMap specifies the exact location of these detectors. If this is not set (or None) all locations are returned.
- close()¶
-
startRecording(channels=
[])¶ Turns on recording mode, the data recorded will be returned by the stopRecording command
- stopRecording()¶
Stops recording mode, will return the data which was collected while recording.
- convertToRank(rank_or_location)¶
Takes a channel notation in either rank or location (‘mcuId.cuId’), and converts it to the corresponding rank.
- convertToLocation(rank_or_location)¶
Takes a channel notation in either rank or location (‘mcuId.cuId’), and converts it to the corresponding location.
-
getChannelInformation(name, channels=
[])¶ Gets the channel information for the quantity “name”.
- Parameters:
- channels : list, optional¶
A list of channels given as either their rank or their location. The location of a channel is given as ‘mcuId.cuId’. If this is not provided it will select all of them.
- Returns:
a list containing the values read for the requested quantity
- Return type:
list
-
setChannelConfiguration(name, value, channels=
None)¶ Sets the channel configuration name to value.
- Parameters:
- channels : list, optional¶
A list of channels given as either their rank or their location. The location of a channel is given as ‘mcuId.cuId’. If this is not provided it will select all of them.
-
setTriggerV(value, channels=
None)¶ Sets the trigger level for the counters for each channel (all selected channels the same value). The trigger voltage is in Volts and must be in the range (-10, 10).
- Parameters:
- Returns:
updated_settings – The new and updated settings.
- Return type:
dict
-
setBiasI(value, channels=
None)¶ Sets the bias current level for each channel (all selected channels the same value).
- Parameters:
- Returns:
updated_settings – The new and updated settings.
- Return type:
dict
- setChannelValueMultiple(name, values)¶
Sets an array of values for parameter ‘name’ for all channels.
- setBiasIMultiple(values)¶
Sets the bias current level for each channel given by the array values.
- Parameters:
- values : array¶
Array of floats indicating the bias current to set in each channel (in A).
- Returns:
updated_settings – The new and updated settings.
- Return type:
dict
- setTriggerVMultiple(values)¶
Sets the Trigger level for the counter for each channel given by the array values. The Trigger current for each channel is in V and must be in the range (-10,10) V.
- Parameters:
- values : array¶
Array of floats indicating the trigger level in each channel (in V).
- Returns:
updated_settings – The new and updated settings.
- Return type:
dict
-
getTriggerV(channels=
None)¶ Gets the trigger level for each channel.
- Parameters:
- channels : list, optional¶
A list of channels given as either their rank or their location. The location of a channel is given as ‘mcuId.cuId’. If this is not provided it will select all of them.
- Returns:
a list containing the trigger level for each requested channel
- Return type:
list
-
getBiasI(channels=
None)¶ Gets the bias current for each channel.
- Parameters:
- channels : list, optional¶
A list of channels given as either their rank or their location. The location of a channel is given as ‘mcuId.cuId’. If this is not provided it will select all of them.
- Returns:
a list containing the bias current for each requested channel
- Return type:
list
- getDevices()¶
- getBackend()¶
- getSettings() dict¶
Gets the settings once, then caches it as a property. reloadSettings() can be called to get the most recent settings
- reloadSettings() dict¶
Clears chached settings requests settings from the api
-
getIvFile(details=
'', datatype='txt', devicedetails=True)¶ Return a file with the latest iv measurement.
- Parameters:
- Returns:
A dictionary with ivData as the root element.
- Return type:
dict
- getRankMap()¶
- getAllLocations()¶
- getAllRanks()¶
- getIntTime()¶
- getTemperatureData()¶
Returns all the stored temperature data.
- getTemperatures()¶
Returns the latests temperatures measured
-
startIv(biasIStart, biasIStop, biasIStep, intTime, channels=
None)¶ Start a IV measurement on the cus of selectedCus or if not provided all of them.
- Parameters:
- biasIStart : float¶
The current to start (in uA).
- biasIStop : float¶
The current to stop (in uA)
- biasIStep : float¶
The step size of the sweep (in uA).
- intTime : float¶
The integration time (in ms) of a single step.
- channels : list, optional¶
A list of channels given as either their rank or their location. The location of a channel is given as ‘mcuId.cuId’. If this is not provided it will select all of them.
- Returns:
The the new updated settings you have send to the server.
- Return type:
dict
- stopIv()¶
Stop the current IV measurement that is running.
- Returns:
Succes if the IV sweep was stopped succesfully.
- Return type:
string
-
getIvData(channels=
None)¶ Get the IV curves of the last measurement.
- Parameters:
- channels : list, optional¶
A list of channels given as either their rank or their location. The location of a channel is given as ‘mcuId.cuId’. If this is not provided it will select all of them.
- Returns:
A dictionary that maps the location [mcuId, cuId] to a dictionary object that contains the biasI, counts, and monitorV.
- Return type:
dict
-
sweepIv(biasIStart, biasIStop, biasIStep, intTime, overhead=
1, channels=None)¶ Start a IV sweep and then return the measured data. Blocks the thread with a time.sleep.
- Parameters:
- biasIStart : float¶
The current to start (in uA).
- biasIStop : float¶
The current to stop (in uA)
- biasIStep : float¶
The step size of the sweep (in uA).
- intTime : float¶
The integration time (in ms) which is the duration of each step.
- overhead : float, default=1¶
Wait overhead seconds longer than necessary because of latency.
- channels : list, optional¶
A list of channels given as either their rank or their location. The location of a channel is given as ‘mcuId.cuId’. If this is not provided it will select all of them.
- Returns:
A dictionary that maps the location [mcuId, cuId] to a dictionary object that contains the biasI, counts, and monitorV.
- Return type:
dict
-
getNMessages(n=
1, channels=None, attribute=None)¶ Retrieves a N number of messages from the driver.
- Parameters:
- channels : list, optional¶
A list of channels given as either their rank or their location. The location of a channel is given as ‘mcuId.cuId’. If this is not provided it will select all of them.
- attribute : str, optional¶
Attribute can be passed here to only return a list with the value of this attribute. Options: mcuId, cuId, cuStatus, monitorV, biasI, counts, intSize, rank, time.
- Returns:
List of N lists of requested attribute for each channel, or a list of N lists of the message dictionaries.
- Return type:
list
-
getMessageNoDelay(channels=
None, attribute=None)¶ Directly returns the latest received messages in the websocket without any delay. WARNING: channel unit messages can be send/received later/earlier then others, so your result can be slightly desynced.
- Parameters:
- channels : list, optional¶
A list of channels given as either their rank or their location. The location of a channel is given as ‘mcuId.cuId’. If this is not provided it will select all of them.
- attribute : str, optional¶
Attribute can be passed here to only return a list with the value of this attribute. Options: mcuId, cuId, cuStatus, monitorV, biasI, counts, intSize, rank, time.
- Returns:
List of requested attribute for each channel, or a list of the message dictionaries.
- Return type:
list
-
getCounts(channels=
None)¶ Get the current counts measurement. The amount of counts during the current integration time.
- Parameters:
- channels : list, optional¶
A list of channels given as either their rank or their location. The location of a channel is given as ‘mcuId.cuId’. If this is not provided it will select all of them.
- Returns:
List of current counts for each channel.
- Return type:
list
-
getNCounts(n=
10, channels=None)¶ Collects an n number of counts, for all the given channels.
- Parameters:
- Returns:
List of length n with counts for each channel.
- Return type:
list
- transformToArray(data, quantity)¶
Transform your iv data or counts data to a ‘a x b’ array for quantity
- Parameters:
- Returns:
result – list as ‘a x b’ data array where a is the amount of channels in order of the ranks. and b is the amount of data measured.
- Return type:
list[list]
- getIvHistory()¶
Gets the IV history for all channels and returns a list of lists with the bias current in the first list and the monitor voltage for each CU as the next.
- Returns:
result – the first list is the bias current the other lists are the monitor voltages (V) of the channels sorted by rank.
- Return type:
list[list]
- getIcHistory()¶
Gets the IC history for all channels and returns a list of lists with the bias current in the first list and the monitor voltage for each CU as the next.
- Returns:
result – the first list is the bias current the other lists are the counts of the channels sorted by rank.
- Return type:
list[list]
- setNetworkSettings(**params)¶
Sets the networking settings.
- Parameters:
- **params¶
- dhcpbool
Wether or not to enable DHCP.
- addressstr
The static IP address, in case DHCP is off.
- gatewaystr
The gateway IP.
- class NerveController.NerveController(domain: str)¶
Bases:
JsonRpcThis class can send requests to a SQ Nerve via the JSON RPC protocol. Set the domain of the SQ Nerve in the initialization. SQ Nerve is the latest control software for the Single Quantum Retina as of January 2026.
- close()¶
- getChannels() dict[str, dict[str, Any]]¶
Returns a dictionary with the channels in the system, with the following structure:
{ channel_number: { *channel_parameters*, }, ... }
-
getChannelInformation(parameter_name: str, channels: list[int] | None =
None) list[Any]¶ Gets the channel information for the parameter “parameter_name”.
-
setChannelUnitsValue(parameter_name: str, value_or_values: Any | list[Any], channels: list[int] | None =
None)¶ Sets the parameter ‘parameter_name’ to ‘value_or_values’ for all given channels. If no channels are provided it will set it for all channels.
- Parameters:
- parameter_name : str, optional¶
The name of the parameter to set.
- value_or_values : list or float¶
The value or list of values to set for the parameter. If a single value is provided all channels will be set to that value. If a list is provided it is assumed to be sorted by channel number.
- channels : list, optional¶
A list of channel numbers to set the parameter for. If this is not provided it will select all of them.
- Returns:
updated_settings – The new and updated settings.
- Return type:
dict
-
getTriggerV(channels: list[int] | None =
None)¶ Gets the trigger level for each channel.
- Parameters:
- channels : list, optional¶
A list of channel numbers to get the trigger level for. If this is not provided it will select all of them.
- Returns:
a list containing the trigger level for each requested channel
- Return type:
list
-
setTriggerV(value_or_values: list[float | int], channels: list[int] | None =
None)¶ Sets the trigger level for the counters for each channel (all selected channels the same value). The trigger voltage is in Volts and must be in the range (-10, 10).
- Parameters:
- value_or_values : float or list¶
The trigger level to set (in V) for all channels. Supported range: (-10, 10)V. If a list is provided it is assumed to be sorted by channel number. If a single value is provided all channels will be set to that value.
- channels : list, optional¶
A list of channel numbers to set the parameter for. If this is not provided it will select all of them.
- Returns:
updated_settings – The new and updated settings.
- Return type:
dict
-
getBiasI(channels: list[int] | None =
None)¶ Gets the bias current for each channel.
- Parameters:
- channels : list, optional¶
A list of channel numbers to get the trigger level for. If this is not provided it will select all of them.
- Returns:
a list containing the bias current for each requested channel
- Return type:
list
-
setBiasI(value_or_values: list[float | int], channels: list[int] | None =
None)¶ Sets the bias current level for each channel (all selected channels the same value).
- Parameters:
- value_or_values : float or list¶
The bias current to set (in A). If a list is provided it is assumed to be sorted by channel number. If a single value is provided all channels will be set to that value.
- channels : list, optional¶
A list of channel numbers to set the parameter for. If this is not provided it will select all of them.
- Returns:
updated_settings – The new and updated settings.
- Return type:
dict
-
restartSoftware(delay: int =
0)¶ Restarts the software.
- Parameters:
- delay : int¶
Optionally a delay can be passed in seconds.
- getSettings() dict¶
Gets the current Retina driver settings.
- getIntTime() int¶
Get the integration time in milliseconds.
-
getLog(lines: int =
1000) list[dict]¶ Returns the current log object.
- Parameters:
- lines : int¶
The number of lines/entries to get from the log
- Returns:
log – The log structed as a list of dictionary objects.
- Return type:
list[dict]
- getTemperatureData() dict¶
Returns all the stored temperature data.
- getTemperatures() tuple[float, float | None]¶
Return the latest measured temperatures for sensor 1 and sensor 2.
-
startIv(biasIStart: float, biasIStop: float, biasIStep: float, intTime: float, channels: list[int] | None =
None)¶ Start a IV measurement on the selected channels or if not provided all of them.
- Parameters:
- biasIStart : float¶
The current to start (in uA).
- biasIStop : float¶
The current to stop (in uA)
- biasIStep : float¶
The step size of the sweep (in uA).
- intTime : float¶
The integration time (in ms) of a single step.
- channels : list, optional¶
A list of channels given as either their rank or their location. The location of a channel is given as ‘mcuId.cuId’. If this is not provided it will select all of them.
- Returns:
The the new updated settings you have send to the server.
- Return type:
dict
- stopIv() str¶
Stop the current IV measurement that is running.
- Returns:
Success if the IV sweep was stopped successfully.
- Return type:
string
-
getIvData(raw: bool =
False) dict¶ Get the data of the latest IV sweep.
- Parameters:
- raw : bool¶
If
True, return the raw driver payload underdata.
- Returns:
A dictionary which either contains the raw data from the driver if raw is True, or a processed dictionary with lists of biasI, counts, monitorV and integration_time per channel. The keys in this dictionary are the channel numbers.
- Return type:
dict
-
getNMessages(n: int =
1, channels: list[int] | None =None, attribute: str | None =None) list[Any]¶ Retrieves a N number of messages from the driver.
- Parameters:
- Returns:
List of N lists of requested attribute for each channel, or a list of N lists of the message dictionaries.
- Return type:
list
-
getMessageNoDelay(channels: list[int] | None =
None, attribute: str | None =None)¶ Directly returns the latest received messages in the websocket without any delay. WARNING: channel unit messages can be send/received later/earlier then others, so your result can be slightly desynced.
- Parameters:
- Returns:
List of requested attribute for each channel, or a list of the message dictionaries.
- Return type:
list
-
getCounts(channels: list[int] | None =
None)¶ Get the current counts measurement. The amount of counts during the current integration time.
- Parameters:
- channels : list, optional¶
Channel numbers to include. If not provided, all channels are used.
- Returns:
List of current counts for each channel.
- Return type:
list
-
getNCounts(n: int =
10, channels: list[int] | None =None)¶ Collects an n number of counts, for all the given channels.
- transformToArray(iv_data: dict, quantity: str)¶
Transform your iv data or counts data to an array for quantity
- Parameters:
- Returns:
result – Two-dimensional array where the first row is
biasIand each following row containsquantityvalues for one channel.- Return type:
list[list]
- getIvHistory()¶
Gets the IV history for all channels and returns a list of lists with the bias current in the first list and the monitor voltage for each CU as the next.
- Returns:
result – the first list is the bias current the other lists are the monitor voltages (V) of the channels sorted by rank.
- Return type:
list[list]
- getIcHistory()¶
Gets the IC history for all channels and returns a list of lists with the bias current in the first list and counts for each CU in following lists.
- Returns:
result – the first list is the bias current the other lists are the counts of the channels sorted by rank.
- Return type:
list[list]