General Functions

These functions are not scope specific, so will need to be called using psdk.[function] or pypicosdk.[function] where [function] is one of the following:

Functions:

Name Description
convert_time_axis

Converts a time axis array from one unit to another.

get_all_enumerated_units

Enumerate all supported PicoScope units.

resolution_enhancement

Returns the buffer after applying a moving average filter with the specified window size.

convert_time_axis(time_axis, current_units, convert_units)

Converts a time axis array from one unit to another.

This method calculates a scaling factor by comparing the exponents of the current and target units, then multiplies the time axis array by this factor.

Parameters:
  • time_axis (ndarray) –

    The NumPy array of time values to be converted.

  • current_units (str | time_standard_form_l) –

    The starting time unit of the data (e.g., 's', 'ms', 'us').

  • convert_units (str | time_standard_form_l) –

    The target time unit for the conversion (e.g., 'ns').

Returns:
  • ndarray

    A tuple containing the new NumPy array scaled to the target units,

  • str

    and a string representing the target units.

Examples:

>>> from pypicosdk import convert_time_axis
>>> new_time_axis = convert_time_axis(old_time_axis, 'ns', 'ms')

get_all_enumerated_units()

Enumerate all supported PicoScope units.

Returns:
  • tuple[int, list[str]]

    Tuple containing number of units and a list of unit serials.

Examples:

>>> from pypicosdk import get_all_enumerated_units
>>> n_units, unit_list = get_all_enumerated_units()
>>> print(n_units, unit_list)

resolution_enhancement(buffer, window_size, padded=True)

Returns the buffer after applying a moving average filter with the specified window size.

Parameters:
  • buffer (ndarray) –

    The input numpy array (e.g., the voltage buffer).

  • window_size (int) –

    The number of samples to average over.

  • padded (bool, default: True ) –

    If true, data is extended to produce an output the same size If false, data will be smaller by the window size due to the moving average method.

Returns:
  • ndarray

    A numpy ndarray containing enhanced data.

Examples:

>>> from pypicosdk import resolution_enhancement
>>> enhanced_buffer = resolution_enhancement(buffer, window_size=16)