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
itemargument names an item to measure; the returneditemfield holds its instantaneous value (:MEASure:ITEM?). Thestatistic_itemargument is a(type, item)pair; the returnedstatistic_itemfield holds that statistic (:MEASure:STATistic:ITEM?). Both measure against:MEASure:SOURce, except the two-source items (RPHase/FPHase,RDELay/FDELay) which take their operands fromsetup_psa/psbandsetup_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>, wheretypeisMAX/MIN/CURR/AVER/DEV; only types valid in the activestatistic_modereturn a number (others arenan).source (int, str) –
:MEASure:SOURce(a channel number orMATH).counter_source (int, str) –
:MEASure:COUNter:SOURce(a channel orOFF). After enabling a channel the counter needs time to gate, socounter_valuein the same call may be stale; let it settle (e.g.sleep) before reading it. It reads 0 while the source isOFF.setup_max (int) –
:MEASure:SETup:MAXupper threshold %, 7 to 95.setup_mid (int) –
:MEASure:SETup:MIDmiddle threshold %, 6 to 94.setup_min (int) –
:MEASure:SETup:MINlower threshold %, 5 to 93.setup_psa (int, str) –
:MEASure:SETup:PSAphase source A.setup_psb (int, str) –
:MEASure:SETup:PSBphase source B.setup_dsa (int, str) –
:MEASure:SETup:DSAdelay source A.setup_dsb (int, str) –
:MEASure:SETup:DSBdelay source B.statistic_mode (str) –
:MEASure:STATistic:MODE(EXTRemumreports min/max,DIFFerencereports deviation/count).statistic_display (bool) –
:MEASure:STATistic:DISPlay.statistic_reset (bool) – When
True, send:MEASure:STATistic:RESet.clear (str) –
:MEASure:CLEar(ITEM1throughITEM5orALL).
- 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?).itemandstatistic_itemread back the measured value, orNonewhen that item was not requested.