Eagle R508 IQ calibration uses actual RF in integer hertz and the physical ADC number as the lookup key. Decode each channel as z = I + jQ, then multiply by the channel's complex coefficient.
500400000 Hz.Get the calibration package for the unit, RF path and acquisition profile from its delivery manifest. Check the coefficient file SHA-256, channel map and listed frequencies. In JSON, each row of coefficients contains rf_hz, adc, multiplier_real and multiplier_imag. The same fields can be read from CSV.
With NCO 470 MHz and signed IF +0.4 MHz, the lookup key is 470400000 Hz. Match both frequency and physical ADC exactly. The arithmetic examples use a synthetic weight of 0.8 − 0.1j. An input of 2 + 2.75j produces 1.875 + 2.0j.
Read the two double-precision components from the matching header or JSON. Multiply the selected physical ADC's samples by its own coefficient.
#include <complex>
#include <iostream>
int main() {
const std::complex<double> input{2.0, 2.75};
const std::complex<double> weight{0.8, -0.1};
std::cout << input * weight << '\n';
}
Index the table by (rf_hz, adc). Pass the actual table path, RF frequency and ADC for the capture.
import json
import sys
from pathlib import Path
table_path, rf_text, adc_text = sys.argv[1:]
table = json.loads(Path(table_path).read_text(encoding="utf-8"))
key = (int(rf_text), int(adc_text))
lookup = {(row["rf_hz"], row["adc"]):
complex(row["multiplier_real"], row["multiplier_imag"])
for row in table["coefficients"]}
if key not in lookup:
raise SystemExit(f"Missing exact RF/ADC key: {key}")
print(complex(2.0, 2.75) * lookup[key])
Build the complex weight from the matched table row. For a multichannel matrix, order the weights to match the physical ADC columns.
input = complex(2.0, 2.75);
weight = complex(0.8, -0.1);
corrected = input .* weight;
disp(corrected)
Look up the weight on the host and pass it into the kernel. This example processes a decoded single-channel array with allocated input and output.
#include <cuda_runtime.h>
#include <cstddef>
__global__ void apply_weight(const double2* input, double2* output,
std::size_t count, double2 weight) {
const std::size_t k = std::size_t(blockIdx.x) * blockDim.x + threadIdx.x;
if (k < count) {
const double2 sample = input[k];
output[k] = make_double2(sample.x * weight.x - sample.y * weight.y,
sample.x * weight.y + sample.y * weight.x);
}
}
Calculate phase and amplitude before and after calibration on the same file, sample interval, RF and ADC map. Apply the reference channel's own weight. Across boots, keep RF, ADCs and the table fixed and record each capture identity.
This runnable example makes a headerless two-channel I16/Q16 test file and checks the sign and units. Save it as iq_demo.py in a new directory and run python3 iq_demo.py.
import cmath
import math
import struct
from pathlib import Path
path = Path("iq-demo.bin")
with path.open("xb") as stream:
stream.write(struct.pack("<hhhh", 1000, 0, 0, 500))
i1, q1, i2, q2 = struct.unpack("<hhhh", path.read_bytes())
adc1 = complex(i1, q1)
adc2 = complex(i2, q2)
for label, value in (("before", adc2), ("after", adc2 * complex(0, -2))):
ratio = value / adc1
print(f"{label}: {math.degrees(cmath.phase(ratio)):+.1f} deg, "
f"{20 * math.log10(abs(ratio)):+.2f} dB")
before: +90.0 deg, -6.02 dB
after: +0.0 deg, +0.00 dB
These differences are ADC2 relative to ADC1. For a device recording, first decode its V1 header, channels and valid length using the task metadata, then look up its matching coefficients.
Read the app, V1 header mode, IQ order and valid file length from the task manifest. If the delivery includes a BIN tool, follow its usage guide to pass the input, actual RF, table and output. Preserve the floating-point result and the input hash for comparisons.