Using the Anticrossing Detector
Input Format
The detector expects a visualization-ready tensor shaped (2, n_freqs, n_sweeps):
This is the same layout you’d pass to imshow() or pcolormesh() — frequency on the vertical axis, sweep voltage on the horizontal axis.
Coming from acquisition-format data? If your data is stored as (n_sweeps, n_freqs) — one frequency trace per sweep point — transpose before calling the API. This matches the typical visualization convention with sweep voltage on the x-axis and frequency on the y-axis:
Output Format
All indices are returned as [freq_idx, sweep_idx] pairs — matching [row, col] in your input array:
Usage Example
Visualize the detections
With the arrays from the previous step, overlay the detector outputs on the magnitude channel:
Scatter overlays highlight each feature family while dashed vertical lines mark anticrossings, making it easy to validate frequency fits alongside neighboring peak and valley structures directly on the measurement.
Using physical units
To plot with real voltage and frequency values, use extent and convert indices:

