Dsp Sampling
dsp_samplingCalculate alias frequencies, minimum sample rates, quantization SNR/ENOB, and integer decimation/interpolation with anti-alias/anti-image FIR filters for sampled signals.
Instructions
Sampling calculators. operation 'alias': alias frequency, folding zone and spectrum inversion of a tone (frequency, sample_rate). 'min_sample_rate': 2 (max_frequency + guard_band), and with lowest_frequency the bandpass-sampling ranges. 'quantization': SNR = 6.02 N + 1.76 dB for bits N (input_level_dbfs for a smaller tone) and ENOB = (SINAD - 1.76)/6.02 for sinad_db. 'decimate' and 'interpolate': integer factor with a Kaiser-window anti-alias / anti-image FIR (attenuation_db, passband_fraction), samples as JSON or CSV file; returns the output record (CSV), the filter, and the measured attenuation of the alias or image bands. Frequencies and rates carry units ('1.3 kHz').
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"operation": "<operation>"
},
"name": "dsp_sampling"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bits | No | quantization: converter resolution N, 1..32 (0 = not given) | |
| column | No | Value column of samples_file, by header name or number (1 = first); blank = the single value column | |
| factor | No | decimate/interpolate: integer factor, 2..1000 | |
| samples | No | decimate/interpolate: samples as JSON text (at most 4194304) | |
| sinad_db | No | quantization: measured SINAD in dB, to get the ENOB (0 = not given) | |
| frequency | No | alias: tone frequency with unit, e.g. '1.3 kHz' | |
| operation | Yes | alias, min_sample_rate, quantization, decimate or interpolate | |
| guard_band | No | min_sample_rate: guard band above max_frequency with unit (default '0 Hz') | 0 Hz |
| sample_rate | No | Sample rate with unit, e.g. '1 kHz' (alias, decimate, interpolate; optional with a time column) | |
| samples_file | No | decimate/interpolate: CSV file, value or time,value, optional header line | |
| max_frequency | No | min_sample_rate: highest frequency of interest, with unit | |
| attenuation_db | No | decimate/interpolate: stopband attenuation of the FIR in dB, 21..140 (default 60) | |
| input_level_dbfs | No | quantization: tone level in dBFS, 0 or negative (default 0 = full scale) | |
| lowest_frequency | No | min_sample_rate: lower edge of a band signal (bandpass sampling); empty = baseband signal | |
| passband_fraction | No | decimate/interpolate: kept fraction of the Nyquist band, 0.1..0.95 (default 0.8) |
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 |