Skip to content

← signal_processing package

GuessSamplingRate

Finds the estimated sampling rate of streamed data.

Version 1.0.0

Ports/Properties

data

Data to process.

verbose name
Data
default value
None
port type
DataPort
value type
Packet (can be None)
data direction
INOUT

effective_srate

The effective sampling rate.

verbose name
Effective Srate
default value
None
port type
DataPort
value type
float (can be None)
data direction
OUT

nominal_srate

The nominal sampling rate.

verbose name
Nominal Srate
default value
None
port type
DataPort
value type
int (can be None)
data direction
OUT

large_gap_threshold

Maximum gap length between timestamps measured in seconds. Longer gaps are automatically discarded from the sample rate calculation.

verbose name
Large Gap Threshold
default value
5.0
port type
FloatPort
value type
float (can be None)

min_burst_speedup

Parameter for checking whether the median of the difference between time stamps is small compared to the approximated sample rate calculated from the mean of differences. This factor helps to determine the signal type: piecewise constant, piecewise linear, not chunked, etc.

verbose name
Piecewise Constant Threshold
default value
10.0
port type
FloatPort
value type
float (can be None)

min_chunk_samples

Minimum number of samples per outputted chunk in data.

verbose name
Minimum Chunk Length
default value
5
port type
IntPort
value type
int (can be None)

max_packet_loss_fraction

Estimated maximum number of 'bad samples' in the data. Used as a parameter in calculating the trimmed mean for data that is not chunked.

verbose name
Estimated Proportion Of Bad Samples
default value
0.05
port type
FloatPort
value type
float (can be None)

max_srate_relerr

Relative tolerance used to calculate nominal sample rate from calculated sample rate. Tolerance is used to compare calculated sample rate from list of typical, standard sample rates.

verbose name
Sample Rate Relative Tolerance
default value
0.0005
port type
FloatPort
value type
float (can be None)

init_on

Time range to calibrate (initialize) the filter on. This parameter can take a single number or two numbers. In case of streaming data, this should always be a single number, representing the number of seconds to buffer from the start of the data, for calibration. In case of offline (recorded) data, this can either be a single number, in which case it represents the window of time in seconds from the beginning of the recording to be used; or, it can be a list of two numbers, in which case this refers to a range of data in seconds, relative to the start of the data, to be used for calibration. The latter allows you to calibrate on data other than the first segment of the data (i.e., if known to be bad), or to avoid running the (fairly expensive) filter on a very long file or on each fold of a cross-validation. Note that a value of 0 here will in the case of offline data be interpreted as the entire file, and in the case of streaming data will raise an error.

verbose name
Calibration Range
default value
[]
port type
ListPort
value type
list (can be None)

calib_seconds

Amount of data, in seconds, to buffer for calibration on streaming data. For offline (non-streaming) data use the "calibration range" (init_on) parameter instead.

verbose name
Calib Seconds
default value
30
port type
IntPort
value type
int (can be None)

verbose

Log more information.

verbose name
Verbose
default value
False
port type
BoolPort
value type
bool (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

verbose name
Set Breakpoint (Debug Only)
default value
False
port type
BoolPort
value type
bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

verbose name
Metadata
default value
{}
port type
DictPort
value type
dict (can be None)