Skip to content

fabienbaron/OITOOLS.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

830 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OITOOLS: the All-in-One Tool Package for Optical Interferometry

Status Documentation License Build

OITOOLS is a Julia package for optical interferometry data analysis, developed by Prof. Fabien Baron (Georgia State University) and collaborators. It covers the full workflow for data from arrays such as CHARA, VLTI, and NPOI: reading, plotting, model fitting, image reconstruction, and observation simulation.

Note: Despite having the same name as JMMC's oitools, the two packages are completely unrelated and were developed independently.

Installation

using Pkg
pkg"registry add General"
pkg"registry add https://github.com/emmt/EmmtRegistry"
Pkg.add(url="https://github.com/fabienbaron/OITOOLS.jl.git")
using OITOOLS

See the installation guide for Python dependencies (UltraNest, Astroquery).

Quick start

using OITOOLS
data = readoifits("mydata.oifits")
uvplot(data)
plot_v2(data)
plot_t3phi(data)

Features

Both image-based and parametric-model-based workflows follow the same pattern:

Operation Image domain Model domain
→ complex visibilities image_to_vis(x, ft) model_to_vis(model, x, uv)
→ observables image_to_obs(x, ft, data) model_to_obs(model, x, data)
→ residuals image_to_residuals(x, ft, data) model_to_residuals(model, x, data)
→ chi² image_to_chi2(x, ft, data) model_to_chi2(model, x, data)
→ chi² + gradient image_to_chi2_fg(x, g, ft, data) model_to_chi2_fg(model, x, data)

Reading OIFITS data

  • OIFITS v1 and v2 with automatic quality filtering
  • Spectral and temporal binning, polychromatic (per-channel) mode
  • OI_CORR correlation matrices (e.g. GRAVITY)
  • Float32 mode for large datasets (readoifits(file; T=Float32))

Plotting

All plot functions accept color="baseline" (default), color="wav", or color="mjd" to colour-code by baseline, wavelength, or timestamp.

plot_v2(data; logplot=true, color="wav")        # single observable
plot_obs(data)                                   # multi-panel: V², T3φ, T3amp
plot_obs(data; obs=["V2","T3PHI","VISAMP"], color="mjd")

# After reconstruction or model fitting:
obs = image_to_obs(x, ft, data)                 # or model_to_obs(model, x, data)
plot_residuals(data, obs)                        # data vs model + residuals
plot_residuals(x, ft, data)                      # convenience shortcut

imdisp(image; pixsize=0.1)                       # display a reconstructed image
UV coverage
uvplot v2plot

Model fitting

Parametric model fitting with a flat-dictionary interface compatible with PMOIRED:

  • Component types: uniform disk, Gaussian, limb-darkened (linear, quadratic, power-law), ring, Gaussian ring, crescent, point source, resolved background, and arbitrary radial profiles via Hankel transform
  • Chromatic and time-variable models using expression strings with $WL, $MJD, and inter-parameter $-references
  • Azimuthal modulations with harmonic coefficients for disk asymmetries
  • Three fitting backends:
    • NLopt (gradient-based and gradient-free optimizers)
    • LsqFit (Levenberg-Marquardt with covariance and 1-sigma errors)
    • UltraNest (Bayesian nested sampling with log-evidence)
  • Bootstrap error estimation by baseline, time, or wavelength
  • PMOIRED conversion: pmoired_to_julia() converts Python dict literals to Julia

Image reconstruction

  • Gradient-based reconstruction with VMLMB (OptimPackNextGen)
  • NFFT for speed or exact DFT
  • Polychromatic and time-variable imaging
  • SPARCO framework for chromatic environments
  • Maximum Entropy (BSMEM) reconstruction
  • Multiple regularizations: total variation, L1-L2, compactness, entropy, support constraints, and more

2004bc1 2004bc2 2004bc3

The ROTIR package uses OITOOLS for stellar surface imaging (light curve inversion, Doppler imaging, interferometric imaging):

rotir

Observation simulation

  • Simulate synthetic OIFITS from images or parametric models
  • Build observations from TOML-based array/combiner/wavelength configs
  • Pre-built configs for CHARA, VLTI (UT and AT), and their combiners (MIRC-X, MYSTIC, GRAVITY, MATISSE, SPICA)
  • Observation planning with Gantt charts, delay-line feasibility, and SIMBAD target queries
ASPRO-like Gantt chart chara_plan-like plots
gantt chara_plan

Documentation

Full documentation is available at fabienbaron.github.io/OITOOLS.jl, including:

Development install

using Pkg
pkg"registry add General"
pkg"registry add https://github.com/emmt/EmmtRegistry"
Pkg.develop(url="https://github.com/fabienbaron/OITOOLS.jl.git")
# Python dependencies (optional, for UltraNest and Astroquery)
ENV["PYTHON"] = ""
Pkg.build("PyCall")
using Conda
Conda.add("ultranest", channel="conda-forge")
Conda.add("astroquery", channel="astropy")

About

A collection of tools to load, visualize, model-fit and image optical interferometry data coming from CHARA, NPOI and VLTI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages