sampling_resolution
sampling_resolution ¤
SamplingResolutionEvents ¤
SamplingResolutionEvents(
dataframe: DataFrame,
signal_uuid: str,
*,
value_column: str = "value_double",
event_uuid: str = "quality:sampling_resolution",
time_column: str = "systime"
)
Bases: Base
Quality: Sampling & Resolution Analysis
Analyze digital measurement system limitations: quantization effects, effective resolution, aliasing detection, and sampling synchronization/jitter.
Methods: - detect_quantization: Detect A/D quantization in measurements. - effective_resolution: Estimate effective vs theoretical resolution. - detect_aliasing: Check for Nyquist violations via FFT. - sampling_jitter: Measure timing regularity of sampling.
detect_quantization ¤
detect_quantization(
window: str = "1h", threshold_ratio: float = 0.3
) -> pd.DataFrame
Detect A/D quantization effects in measurements.
Identifies if measurements are clustered at discrete levels rather than continuously distributed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window
|
str
|
Resample window size. |
'1h'
|
threshold_ratio
|
float
|
Ratio of unique values to expected unique below which signal is flagged as quantized. |
0.3
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Summary DataFrame with columns: start, end, duration_seconds |
DataFrame
|
(the window bounds), window_start (the resample label; a |
DataFrame
|
deprecated twin of |
DataFrame
|
expected_unique, quantization_step, quantization_ratio, |
DataFrame
|
quantized. |
effective_resolution ¤
effective_resolution(window: str = '1h') -> pd.DataFrame
Estimate effective measurement resolution from data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window
|
str
|
Resample window size. |
'1h'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Summary DataFrame with columns: start, end, duration_seconds |
DataFrame
|
(the window bounds), window_start (the resample label; a |
DataFrame
|
deprecated twin of |
DataFrame
|
effective_resolution, resolution_ratio, assessment. |
detect_aliasing ¤
detect_aliasing(
window: str = "1h",
expected_frequency_hz: float | None = None,
) -> pd.DataFrame
Check for Nyquist violations using FFT.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window
|
str
|
Resample window size. |
'1h'
|
expected_frequency_hz
|
float | None
|
Known process frequency in Hz. If None, dominant frequency is estimated from FFT. |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Summary DataFrame with columns: start, end, duration_seconds |
DataFrame
|
(the window bounds), window_start (the resample label; a |
DataFrame
|
deprecated twin of |
DataFrame
|
nyquist_hz, dominant_frequency, aliasing_risk. |
sampling_jitter ¤
sampling_jitter(window: str = '1h') -> pd.DataFrame
Measure timing jitter (variation in sampling interval).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window
|
str
|
Resample window size. |
'1h'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Summary DataFrame with columns: start, end, duration_seconds |
DataFrame
|
(the window bounds), window_start (the resample label; a |
DataFrame
|
deprecated twin of |
DataFrame
|
mean_interval_seconds, std_interval_ms, std_interval_seconds, |
DataFrame
|
jitter_pct, max_gap_ms, max_gap_seconds, regularity_score. Each |
DataFrame
|
|
DataFrame
|
value in seconds); the |