Sample rate analysis
sample_rate(ds, unit='s')
Obtain an array of time difference between two consecutive samples
If the index it's a timestamp, the time difference will be converted to the provided unit
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ds |
AbstractPDMDataset
|
The dataset |
required |
unit |
str
|
Unit to convert the timestamps differences |
's'
|
Returns:
Type | Description |
---|---|
ndarray
|
Array of time differences |
Source code in ceruleo/dataset/analysis/sample_rate.py
sample_rate_summary(ds, unit='s')
Obtain the mean, median and standard deviation of the sample rate of the dataset
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ds |
AbstractPDMDataset
|
The dataset |
required |
unit |
str
|
Unit to convert the time differences |
's'
|
Returns:
Type | Description |
---|---|
SampleRateAnalysis
|
A SampleRateAnalysis with the following information: Mean sample rate, Std sample rate, Mode sample rate |