Buffer.getstats() - Keithley 2461 Reference Manual

1kw pulse mode interactive sourcemeter instrument
Table of Contents

Advertisement

Section 8: TSP command reference

buffer.getstats()

This function returns statistics from a specified reading buffer.
Type
TSP-Link accessible
Function
Yes
Usage
buffer.getstats()
buffer.getstats(bufferVar)
statsVar = buffer.getstats(bufferVar)
bufferVar
statsVar
Details
This function returns a table with statistical data about the data that was placed in the reading buffer.
The instrument automatically updates reading buffer statistics as data is added to the reading buffer.
When the reading buffer is configured to fill continuously and overwrite old data with new data, the
buffer statistics include the data that was overwritten. To get statistics that do not include data that
has been overwritten, define a large buffer size that will accommodate the number of readings you
will make.
The table returned from this function provides statistics at the time the function is called. Although the
instrument continues to update the statistics, the table that is returned is not updated. To get fresh
statistics, call this function again.
The statsVar parameter contains the values described in the following table.
Attribute
min
mean
stddev
n
max
If n equals zero (0), all other values are nil. If n equals 1, stddev is nil because the standard
deviation of a sample size of 1 is undefined.
8-12
Affected by
The name of the reading buffer, which may be a default buffer (defbuffer1 or
defbuffer2) or a user-defined buffer; if no buffer is specified, this parameter
defaults to defbuffer1
A table with the following entries: n, min, max, mean, and stddev; see Details for
information on the entries
When returned
Description
n > 0
A table that contains data about the minimum reading value that was added
to the buffer
n > 0
The average of all readings added to the buffer
n > 1
The standard deviation of all readings that were added to the buffer
Always
The number of data points on which the statistics are based
n > 0
A table that contains data about the maximum reading value that was added
to the buffer
Model 2461 Interactive SourceMeter® Instrument Reference Manual
Where saved
Default value
2461-901-01 A/November 2015

Advertisement

Table of Contents
loading

Table of Contents