Concrete examples of small-scale / home interferometry projects & designing system based on SDRPlay Duo software-defined radio.
Some concrete examples of small-scale / home interferometry projects that use open-source software, so you can see how people have actually tied the pieces together.
Here are some examples you might find useful:
đš Example 1: GNU Radio + SDR-based Two-Element Interferometer
- Hardware: Two RTL-SDRs or SDRplay units, GPSDO for clock sync, simple dipoles / small Yagis.
- Software:
- GNU Radio flowgraph to capture I/Q streams from both receivers.
- Perform cross-correlation using gr-corr or custom Python block.
- Output visibilities as time series.
- Reference: A project called Small Radio Interferometer using RTL-SDRs (used to detect solar fringes at 1420 MHz).
This is the simplest working example for a setup like yours.
đš Example 2: DiFX on a Single Baseline
- Hardware: Any two synchronized SDRs (or even WAV recordings).
- Software:
- Record baseband data as standard VLBI-style files.
- Run DiFXÂ as a correlator, which gives visibilities.
- Post-process with AIPSÂ or CASAÂ for delay calibration and (optionally) imaging.
- Reference: A few amateurs have adapted DiFX to single-baseline setups â one project is vDIF on Raspberry Pi with DiFX.
This is heavier but closer to professional practice.
đš Example 3: Bifrost Streaming Correlator
- Hardware: Two SDRs (ideally clock-locked), GPU-equipped PC.
- Software:
- Bifrost pipelines handle input streams, FFT, cross-multiply, integrate.
- Used in professional pathfinder arrays (e.g. LWA, CHIME) but can scale down.
- Can run in real time if you want to see fringes as they happen.
- Reference: Bifrostâs GitHub includes example correlator pipelines â youâd adapt them for 2 inputs.
This is a good âDIY but modernâ approach.
đš Example 4: Amateur Radio Astronomy Correlators (Python / C)
- Hardware: Any two antennas + SDRs.
- Software:
- People have written lightweight correlators in Python/Numpy (sometimes C for speed).
- Typically: read raw IQ from SDR, apply delay, multiply, average.
- Plots fringes directly, e.g. when tracking the Sun.
- Reference: DIY Two-Element Interferometer (various GitHub repos).
This is probably the easiest way to start â code is simple and you learn the steps.
đš Example 5: Educational Projects (Radio JOVE + Interferometry add-ons)
- Hardware: Two Radio JOVE dipoles or long cables joined in the middle (like you described).
- Software:
- Uses Radio-SkyPipe or custom Python code to cross-correlate noise levels from both antennas.
- Mainly designed for solar & Jovian bursts, but people have hacked it into crude interferometers.
Very approachable, though limited in resolution.
Here are several GitHub / online-projects + guides that you can download / adapt. Some are full correlators; others are âtoyâ examples. Iâve included what each project gives you in terms of code, how close it is to your setup, and what modifications youâd likely need.
â Useful GitHub Examples & Projects
Name | What it Does / What Code is Available | Relevance to Your Setup (2-cable / small baseline) | Pros / What Youâd Need to Adapt |
Effex (evanmayer/effex) | A software correlator: cross-correlates signals from two USB RTL-SDR dongles (sharing/synchronizing clocks). You run a command, specify time, bandwidth, frequency, etc. (GitHub) | Very close to exactly what you want: two inputs, real hardware, correlation. | Need RTL-SDRs (or similar), and youâll want them clock-locked/synchronized. If your antennas / cables are different, adjust gain / frequency. Also adapt output formats if needed. |
Spectro Radiometer (ccera-astro/spectro_radiometer) | Provides spectral & continuum modes, plus includes correlation between two channels. Uses GNU Radio, etc. (GitHub) | Good for learning the basics of correlation, seeing cos/sin correlation, total power, etc. | If your sample rates / frequency are different, youâll need to modify flowgraphs. Also the hardware (SDRs) must be supported. Integration time, buffering etc will need tuning. |
Setting Up a 2 Horn Interferometer (WVURAIL / â2 Hornâ + LimeSDR + GNURadio) | A lesson module showing how to build a 2-horn (i.e. two-antenna) interferometer using LimeSDR, with GNU Radio flowgraphs: one that adds signals, one that multiplies (i.e. correlator) for interference detection. (wvurail.org) | Very relevant: two antenna elements, multiplication (correlation), usable as starting point with your two-cable scheme. | You might have to adapt to your antennas/cables (gain, phase), ensure clocking of the two channels is coherent. The flowgraphs likely assume horns; for cables you may replace the front end appropriately. Also might need higher sample rates or buffer sizes. |
pyuvsim (RadioAstronomySoftwareGroup) | A simulator: generates realistic interferometer outputs from model skies, for testing calibration/imaging pipelines. (GitHub) | Useful for testing / validation: simulate your expected fringe patterns/delays without hardware. Not for real-time correlation of physical signals. | After getting some real data, you can compare to simulation. Also use to test your pipelineâs imaging/calibration steps. But youâll still have to write/connect the code that takes real SDR inputs and produces visibilities. |
pyuvdata | Python library for handling interferometric datasets (various formats: uvfits, measurement sets, etc.), reading, writing, manipulating visibilities. (GitHub) | Very useful after you’ve done correlation: to store, inspect, maybe calibrate or format your data. | Youâll need to convert whatever raw output you have into a format pyuvdata can read (or adapt your output). Also you may use CASA or other tools alongside. |
đ Suggested Starter Pipeline Using One of These
Hereâs a suggested minimal pipeline that borrows from these, for your two-cable antenna setup.
- Hardware setup
- Use two SDRs (or a dual-channel SDR) with shared clock/timing (GPSDO, 1PPS, or shared reference).
- Each cable to one channel. Ensure amplification / filters are reasonable so signals are in decent SNR.
- Capture / Digitize
- Use GNU Radio (or SDR software) to sample both channels, synchronously.
- Save raw IQ data, with timestamps, at your chosen bandwidth and sample rate.
- Correlation / Cross-Multiply
- Use a project like Effex for correlation. Alternatively, build a GNU Radio flowgraph (as in the âMultiplying spectrometerâ example in the 2-horn project) that multiplies the IQ streams (with delay compensation if needed).
- Integrate over time to reduce noise (average the cross products).
- Calibration / Delay Compensation
- You might have different cable lengths, phase delays, clocks; measure or estimate these.
- Possibly feed in a known source (sun, satellites, etc.) to see the fringe pattern, adjust for delays.
- Post-Processing / Imaging / Visualization
- Use pyuvdata to load the visibility data.
- If your baseline and coverage allow, you might do a simple Fourier inversion to produce âimagesâ (though with 2 points baseline, resolution is very limited).
- Compare to simulated output using pyuvsim to see whether your data are reasonable.
- Testing & Debugging
- Start small: first try with strong signals (sun, broadcast transmitter) so fringes are obvious.
- Check coherence: see if two channels are maintaining phase stability.
- Adjust integration times, sample rates, filtering to get usable signal.
A zip of starter code (using Effex + GNURadio + pyuvdata) configured for a particular SDR, so you can just drop in your setup parameters and test.
The SDRplay RSPduo is a good choice for a two-channel interferometer, since both tuners can be clock-locked internally and sampled simultaneously. That saves you a lot of synchronization headaches compared to two independent SDRs.
đŚ Proposed Starter Package (for RSPduo at 1420 MHz)
The bundle would include:
- GNU Radio Flowgraph (.grc)
- Uses the gr-sdrplay3Â source block (RSPduo driver).
- Configured for:
- Center frequency: 1420.405 MHz
- Sample rate: ~250 kS/s (tunable up/down depending on your PC power)
- Both tuners active (Tuner A = Antenna 1, Tuner B = Antenna 2)
- Output: two streams of complex64 samples, time-synchronous.
- Python Correlator (correlator.py)
- Reads the two streams (from files or live GNU Radio pipe).
- Applies optional delay correction (for cable differences).
- Computes cross-correlation:
V(Ď)=â¨X(t)â Yâ(t+Ď)âŠV(\tau) = \langle X(t) \cdot Y^*(t + \tau) \rangle
- Integrates over chosen time windows (e.g. 1 s, 10 s, 60 s).
- Saves visibilities as .npy and .uvfits (using pyuvdata).
- Post-Processing Notebook (analysis.ipynb)
- Loads the correlated data.
- Plots:
- Real & imaginary visibilities vs time.
- Fringe amplitude when tracking the Sun.
- Option to export to CASA-compatible formats.
đ Requirements
- Hardware: SDRplay RSPduo, GPSDO (optional but helpful), LNA(s), your two-cable antenna.
- Software (Linux recommended, e.g. Ubuntu):
- SoapySDRÂ + SoapySDRPlay3Â (driver)
- GNU Radio 3.10+
- Python 3.10+ with numpy, scipy, pyuvdata, matplotlib
đ Next Step
I can generate for you:
- The GNU Radio Companion .grc file
- The Python correlator script (correlator.py)
so you can run them straight away on your RSPduo.
đ Do you want me to:
- Make the flowgraph save raw IQ data to disk and correlate offline (safer, easier first step),
- Or set it up for real-time streaming correlation (slightly trickier, but more exciting)?
a full starter kit for the SDRplay RSPduo with both real-time and offline correlation paths.
đŚ Attached â RSPDuo Interferometer Starter Kit (ZIP)
Inside youâll find:
- capture_and_correlate_realtime.py â GNU Radio Python flowgraph using gr-soapy (RSPduo, 2 channels) with optional raw recording and on-the-fly cross-correlation + moving-average integration.
- offline_correlator.py â Numpy-based correlator for two raw IQ files (complex64), with delay compensation and integration.
- plot_vis.py â quick plots of real/imag/|V| vs time.
- config.yaml â central settings (freq = 1420.405 MHz, sample rate, gains, integration window, etc.).
- requirements.txt and a detailed README.md.
How to run (short version)
- Install SoapySDR + SoapySDRPlay3Â (RSPduo driver) and GNU Radio 3.10+Â (with gr-soapy).
- Create a venv for the Python tools and pip install -r requirements.txt.
- Edit config.yaml as needed (sample rate, gain, integration).
- Real-time + record:
- python capture_and_correlate_realtime.py –realtime –record_raw
Outputs:
- data/ch0_iq.c64, data/ch1_iq.c64Â (optional raw IQ)
- data/vis_realtime.c64Â (complex64 visibilities)
- data/vis_realtime.csv (timestamped summary)
- Offline correlation (after a recording):
- python offline_correlator.py –ch0 data/ch0_iq.c64 –ch1 data/ch1_iq.c64 –sps 250000 –integrate 0.5 –out data/vis_offline.csv
- Plot:
- python plot_vis.py data/vis_realtime.csv
- # or
- python plot_vis.py data/vis_offline.csv
Notes tuned to your setup
- The real-time script uses gr-soapyâs two-channel source to grab both RSPduo tuners synchronously, then does: conjugate(CH1) Ă CH0 â moving-average.
- Integration window defaults to 0.5 s; tweak integration_seconds in config.yaml.
- If your two long cables differ in length, set cable_delay_ns in the config (for offline) or sweep –delay_ns in offline_correlator.py.
- First light target: the Sun (broadband, strong fringes).
If youâd like, I can also:
- add a frequency-domain correlator (FFT â X-engine) variant,
- export to UVH5/UVFITSÂ via pyuvdata,
- add CASAÂ import helper scripts,
- or tailor the defaults to your exact RSPduo gain/bandwidth preferences.