An interactive tool for fitting interferometric models to Very Long Baseline Interferometry (VLBI) visibility data, with Bayesian parameter and uncertainty estimation.
Think of it like difmap
's modelfit
, but more automatic, with robust uncertainty quantification, and rich real-time diagnostics.
- Automatic Fitting 🎯: No manual component placement needed - finds globally optimal solutions using MCMC sampling
- Flexible Multi-Component Models 🔧: Flexible circular and elliptical Gaussian components powered by InterferometricModels.jl
- Bayesian Uncertainty Estimation 📊: Full parameter uncertainties via Pigeons.jl parallel tempering
- Flexible Data Handling ⚡: Fit to either complex visibilities or visibility amplitudes
- Real-Time Model Diagnostics 📈: Instantly see how well your model describes the data
-
Clone the Repository 📥: Download InterFit.jl to any location on your computer
git clone https://github.com/aplavin/InterFit.jl.git cd InterFit.jl
Alternative: If you don't have git installed, download the ZIP archive from GitHub and extract it.
-
Install Julia 💎: Ensure you have Julia 1.11 installed (installation guide)
-
Initialize the Environment 🔧: Start Julia with the project environment
julia --project
-
Install Dependencies 📦: In the Julia REPL, run:
julia> using Pkg; Pkg.instantiate()
Load InterFit and start fitting models to your VLBI data:
# Load the package
julia> using InterFit
# Option 1: Direct file loading (recommended for most users)
julia> interfit("path/to/your/visibility_file.uvf")
# Option 2: Pre-processed data (for advanced users)
julia> uvtbl = load_average_uvtbl("path/to/your/file.uvf")
julia> # process/filter uvtbl as needed
julia> interfit(uvtbl)
# Option 3: Try with sample data (no file needed!)
julia> vis_fits = joinpath(pkgdir(VLBIFiles), "test", "data", "vis.fits")
julia> interfit(vis_fits)
InterFit opens an interactive window with three main areas:

- Visibility plots: Amplitude and phase vs UV distance
- Residuals plot: Shows fit quality in units of measurement uncertainty (nσ)

- UV coverage: UV plane sampling of your observations
- Closure quantities: Phase and amplitude closures for visual model validation

- Component positions: Sky locations and shapes of fitted Gaussian components
- Flux vs size: Component flux, angular size, brightness temperature
- Shape parameters: Major/minor axis sizes for elliptical components

- "Data σ adjustment": Fine-tune visibility weights
- Multiplicative: Scale all uncertainties by a factor (default: 1.0)
- Additive: Add systematic uncertainty floor (default: 0.0 Jy)
- "Fit to" controls what quantities to fit:
- Vis: Complex visibilities (full information, assumes proper calibration)
- Ampl fast: Visibility amplitudes with Gaussian likelihood
- Ampl slow: Visibility amplitudes with Rician noise (more accurate, but slower)
- "n Gaussians": Number of Gaussian components
- "n elliptic": How many should be elliptical
- "n rounds": Number of tempering rounds. Rule of thumb: 3-6 for exploration, 10+ for final results.
- Each increment doubles runtime
- "n chains": Number of parallel chains, 8-20 typically good.
- Scales runtime linearly
- For more details, see the Pigeons.jl documentation
- "Fit" button: Run model fitting with current settings
- "Save" button: Export fitted model to a file
- Start simple: Begin with 1-2 components, increase if needed
- Check convergence: Run fit multiple times - if results vary significantly, increase
n_rounds
- Check residuals: Look for systematic patterns indicating model inadequacy
- Julia 💎: Version 1.11 (recommended)
- Operating System 💻: Cross-platform (Windows, macOS, Linux)
- Dependencies 📦: Automatically managed via Project.toml
InterFit.jl is heavily based on powerful and composable Julia packages:
- VLBIFiles.jl 📁: Reading visibility files
- InterferometricModels.jl 🌟: Source structure models and their visibility calculations
- Pigeons.jl 🔬: Parallel tempering MCMC algorithms
- AccessibleModels.jl ⚙️: Convenient interface for model parametrization and fitting
- Makie.jl & MakieExtra.jl 🎨: Plotting and visualization
Code contributions, bug reports, and feature requests are welcome!