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
sourceis the default channel used for item measurements; anitemquery returns its measuredvalueagainst that source. Seemeasure.ITEMSfor the supported item mnemonics (e.g.VPP,VAVG,FREQuency,PERiod,PWIDth).- Parameters:
source (int, str) –
:MEASure:SOURce(a channel number orMATH).counter (int, str) –
:MEASure:COUNter:SOURce(a channel orOFF); 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(ITEM1throughITEM5orALL).statistics (bool) – When
Trueand anitemis given, enable the statistics display (:MEASure:STATistic:DISPlay) and report the item’s statistics.
- Returns:
A namedtuple with fields
source,counter,item,value, andstatistics.sourceandcounterare always queried.counteris the frequency counter value (:MEASure:COUNter:VALue?) orNonewhen the counter source isOFF.itemechoes the queried item andvalueis its float result, bothNonewhen noitemwas given.statisticsis aSTATISTICSnamedtuple (maximum,minimum,current,average,deviation) when requested, otherwiseNone.