Dsp Correlate
dsp_correlateAnalyze one or two time-domain records for statistics, autocorrelation, dominant period, and cross-correlation with lag and delay estimates; optionally compute Hilbert envelopes from JSON or CSV data.
Instructions
Time-domain analysis of one record and optionally a second. One record: mean, RMS, peak, peak-to-peak, crest factor, variance, autocorrelation up to max_lag (CSV) and the dominant period from it. With a second record (samples_b / samples_b_file): cross-correlation, the lag of the maximum in samples and seconds with parabolic sub-sample refinement, the normalised correlation coefficient and the delay estimate (positive = second record lags the first). envelope=true adds the FFT Hilbert envelope (exact for records holding whole periods). Samples: JSON lists or CSV files; sample_rate with unit for seconds.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "dsp_correlate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_lag | No | Largest lag in samples, 1..100000; 0 = automatic (half the record, at most 100000; cross-correlation: the full overlap range) | |
| samples | No | First record as JSON text, e.g. '[0, 1, 0, -1]' (at most 4194304). Or samples_file | |
| envelope | No | Also compute the Hilbert-transform envelope of the first record (CSV) (default false) | |
| samples_b | No | Optional second record as JSON text, for cross-correlation | |
| remove_mean | No | Remove each record's mean before correlating (default true) | |
| sample_rate | No | Sample rate with unit, e.g. '1 kHz'; gives lags and periods in seconds (optional with a time column) | |
| samples_file | No | First record as CSV/TXT file: values, or time(s),value | |
| samples_b_file | No | Optional second record as CSV/TXT file |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | Non-quantity payload (reports, listings) | |
| error | No | ||
| value | No | Primary quantity result | |
| values | No | All named quantity results (includes the primary) | |
| warnings | No | ||
| artifacts | No | ||
| provenance | Yes | What produced the result and from which inputs. | |
| review_status | No | unreviewed |