Measure

src.measure.measure(oscope: Rigol_DS1000Z, item: str | None = None, statistic_item: Tuple[str, str] | None = None, source: int | str | None = None, counter_source: int | str | None = None, setup_max: int | None = None, setup_mid: int | None = None, setup_min: int | None = None, setup_psa: int | str | None = None, setup_psb: int | str | None = None, setup_dsa: int | str | None = None, setup_dsb: int | str | None = None, statistic_mode: str | None = None, statistic_display: bool | None = None, statistic_reset: bool | None = None, clear: str | None = None)[source]

Send commands to make automatic measurements on an oscilloscope. All arguments are optional. The settable fields are written when provided and always queried back. The item argument names an item to measure; the returned item field holds its instantaneous value (:MEASure:ITEM?). The statistic_item argument is a (type, item) pair; the returned statistic_item field holds that statistic (:MEASure:STATistic:ITEM?). Both measure against :MEASure:SOURce, except the two-source items (RPHase/FPHase, RDELay/FDELay) which take their operands from setup_psa/psb and setup_dsa/dsb.

Parameters:
  • item (str) – Item to measure instantaneously (e.g. VPP, FREQuency).

  • statistic_item (tuple) – A (type, item) pair mirroring :STATistic:ITEM? <type>,<item>, where type is MAX/MIN/ CURR/AVER/DEV; only types valid in the active statistic_mode return a number (others are nan).

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

  • counter_source (int, str) – :MEASure:COUNter:SOURce (a channel or OFF). After enabling a channel the counter needs time to gate, so counter_value in the same call may be stale; let it settle (e.g. sleep) before reading it. It reads 0 while the source is OFF.

  • setup_max (int) – :MEASure:SETup:MAX upper threshold %, 7 to 95.

  • setup_mid (int) – :MEASure:SETup:MID middle threshold %, 6 to 94.

  • setup_min (int) – :MEASure:SETup:MIN lower threshold %, 5 to 93.

  • setup_psa (int, str) – :MEASure:SETup:PSA phase source A.

  • setup_psb (int, str) – :MEASure:SETup:PSB phase source B.

  • setup_dsa (int, str) – :MEASure:SETup:DSA delay source A.

  • setup_dsb (int, str) – :MEASure:SETup:DSB delay source B.

  • statistic_mode (str) – :MEASure:STATistic:MODE (EXTRemum reports min/max, DIFFerence reports deviation/count).

  • statistic_display (bool) – :MEASure:STATistic:DISPlay.

  • statistic_reset (bool) – When True, send :MEASure:STATistic:RESet.

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

Returns:

A namedtuple with a field for each argument, queried back regardless of which were provided, plus the read-only counter_value (:MEASure:COUNter:VALue?). item and statistic_item read back the measured value, or None when that item was not requested.