Section 9: TSP command reference Series 2600B System SourceMeter® instrument Reference Manual
9-200 2600BS-901-01 Rev. F/August 2021
The statistics parameter has the attributes described in the following table.
The number of data points on which the statistics are based
The average of all readings added to the buffer
The standard deviation of all readings (samples) added to the buffer
A table containing data about the minimum reading value added to the buffer
A table containing data about the maximum reading value added to the buffer
If n equals zero (0), all other attributes are nil. If n equals 1, the stddev attribute is nil because
the standard deviation of a sample size of 1 is undefined.
The min and max entries each have the attributes defined in the following table.
String indicating the function that was measured for the reading (current, voltage,
ohms, or watts)
The full-scale range value for the measurement range used when the measurement
was made
String indicating the source function at the time of the measurement (current or
voltage)
String indicating the state of the source (off or on)
Full-scale range value for the source range used when the measurement was made
If bufferVar.collectsourcevalues is enabled, the sourced value in effect at
the time of the reading
Status value for the reading; the status value is a floating-point number that encodes
the status value into a floating-point value
If bufferVar.collecttimestamps is enabled, the timestamp, in seconds,
between when the reading was acquired and when the first reading in the buffer was
acquired; adding this value to the base timestamp produces the actual time the
measurement was acquired
reset()
smua.nvbuffer1.clear()
smua.measure.count = 10
smua.measure.v(smua.nvbuffer1)
stats = smua.buffer.getstats(smua.nvbuffer1)
print("n= "..stats.n)
print("mean= "..stats.mean)
print("stddev= "..stats.stddev)
print("min= "..stats.min.reading)
print("max= "..stats.max.reading)
Make measurements and store them in nvbuffer1. Print the statistics for the data.
Example output:
n= 10
mean= -2.3851394871599e-05
stddev= 4.406545187484e-07
min= -2.4557113647461e-05
max= -2.322196996829e-05
Also see
smuX.buffer.recalculatestats() (on page 9-201)