Analysis

The provided functions can help to analyze data aquired from a MultispeQ device.

There are two parts to the analysis, the basic functions that support the analysis of a single measurment returned from a device and the rest of the analysis module, that focuses on functions supporting the multiple measurements which have already been processed.

Single Measurement (Basic)

Helper functions to support the analysis of a single measurement from a MultispeQ device.

GetLabelLookup(data=None)[source]

Generate a protocol lookup table for a protocol set.

Parameters:

data (dict) – The protocol output

Returns:

Lookup table

Return type:

dict

GetProtocolByLabel(label=None, data=None, array=False)[source]

Returns the protocol from within the protocol set matching the provided label. If only one label exists, one protocol object is returned. When multiple protocols in the set have the same label an array with all protcol objects of matching labels is returned.

Parameters:
  • label (str) – The label from the protocol set

  • data (dict) – The protocol data

  • array (bool) – Always return an array, default is False

Returns:

Single protocol or a list of protocols

Return type:

dict or list[dict]

GetIndexByLabel(label=None, data=None, array=False)[source]

Find the positions for protocols within a protocol set matching the provided label. If only one label exists within a set, a number is returned. When multiple protocols in the set have the same label an array with all indexes of matching labels is returned.

Parameters:
  • label (str) – The label from the protocol set

  • data (dict) – The protocol data

  • array (bool) – Always return an array, default is False

Returns:

Single index or an array of indexes

Return type:

int or list[int]


Large Dataset

PIRK Protocol – Measurement specific functions.

get_pirk_slices_and_intensities(index, info, protocol_label='PIRK', pirk_led='PIRK')[source]

Return a list of intensities and start:stop indexes for subtraces during PIRK pulses, i.e. where the PIRK intensity > 0.

Parameters:
  • index

  • info

  • protocol_label – protocol label name (default: PIRK)

  • pirk_led – pirk led label name (default: PIRK)

Returns:

PIRK_intensities, PIRK_slices

Return type:

list[dict]