Measure

src.measure.measure(oscope, source: int | str | None = None, counter: int | str | None = None, item: str | None = None, clear: str | None = None, statistics: bool | None = None)[source]

Send commands to make automatic measurements on an oscilloscope. All arguments are optional. The source is the default channel used for item measurements; an item query returns its measured value against that source. See measure.ITEMS for the supported item mnemonics (e.g. VPP, VAVG, FREQuency, PERiod, PWIDth).

Parameters:
  • source (int, str) – :MEASure:SOURce (a channel number or MATH).

  • counter (int, str) – :MEASure:COUNter:SOURce (a channel or OFF); setting it is followed by a 1s delay so the counter can gate.

  • item (str) – The measurement item to query via :MEASure:ITEM?.

  • clear (str) – :MEASure:CLEar (ITEM1 through ITEM5 or ALL).

  • statistics (bool) – When True and an item is given, enable the statistics display (:MEASure:STATistic:DISPlay) and report the item’s statistics.

Returns:

A namedtuple with fields source, counter, item, value, and statistics. source and counter are always queried. counter is the frequency counter value (:MEASure:COUNter:VALue?) or None when the counter source is OFF. item echoes the queried item and value is its float result, both None when no item was given. statistics is a STATISTICS namedtuple (maximum, minimum, current, average, deviation) when requested, otherwise None.