Skip to content

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

License

Notifications You must be signed in to change notification settings

bensetterholm/OITOOLS.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Status Documentation License Build

oitools-logo

OITOOLS is a Julia package to read, plot, model-fit and image optical interferometric data coming from astronomical arrays such as CHARA, VLTI, and NPOI. Note that despite having the same name as JMMC's oitools, they are completely unrelated and were developed independently.

Installation

If you're new to Julia, you may want to install OITOOLS and its dependencies without learning about activate/instantiate. You will only have to do this one.

using Pkg; 
#Install python packages
Pkg.add("Conda"); 
using Conda; 
Conda.add("ultranest", channel="conda-forge"); 
Conda.add("astroquery", channel="astropy");
# Install mainstream Julia packages
Pkg.add(["CFITSIO","AstroTime","Dates","DelimitedFiles","Documenter","DocumenterTools","FITSIO","Glob","LaTeXStrings","LinearAlgebra","NFFT","NLopt","UltraNest","LsqFit","NearestNeighbors","PyCall","PyPlot","Random","SparseArrays","SpecialFunctions","Statistics","Parameters"]); 
# Install Eric Thiebaut's packages
Pkg.Registry.add(RegistrySpec(url = "https://github.com/emmt/EmmtRegistry"))
Pkg.add(["ArrayTools", "LazyAlgebra", "OptimPackNextGen"]);
# Install FB's packages
Pkg.add(url="https://github.com/fabienbaron/OIFITS.jl", rev="t4");
Pkg.add(url="https://github.com/fabienbaron/OITOOLS.jl.git")
# Then check everything got installed properly
using OITOOLS

Plotting and loading data

  • Load and filter data on the fly: split by spectral channel or time

  • All the classic plots: uv coverage, V2, T3, etc. by baseline or wavelengths

uv coverage V2
uvplot v2plot

Image reconstruction

  • Classic image reconstruction

2004bc1 2004bc2 2004bc3

  • Polychromatic and dynamical imaging with several regularizations

  • The ROTIR package uses OITOOLS to do stellar surface imaging with:

    • light curve inversion
    • Doppler imaging
    • interferometric imaging

rotir

Model fitting

  • Fast multiple component fitting.

  • Polychromatic models

    • Power and black-body laws
    • Spectral line fitting
    • Add your own laws!
  • Dynamical models (time variable parameters)

  • Optimization with several libraries

    • Levenberg for classic error analysis
    • NLOpt for flexibility in the parameter search (local and global optimizers including Nelder Mead and Genetic Algorithm)
    • UltraNest for Bayesan model selection
  • Derive boostrap errors

    • Boostrap by baseline, time, or wavelengths
  • Quickly make images from models.

Observation planning

ASPRO-like Gantt chart chara_plan-like plots
gantt chara_plan

Simulations

  • Can simulate fake data from models or images

  • Can create your own telescope and/or instrumental configurations

How to speed up the use of OITOOLS with PackageCompiler

Julia compiles your code on the fly, and OITOOLS functions are no exception. The so-called "time to first plot" will significantly decrease if you take the time to compile OITOOLS with PackageCompiler, The functions that will be accelerated are in precompile_oitools.jl from the OITOOLS.jl/demos/ directory. Feel free to add OITOOLS functions that you frequenly use. To precompile OITOOLS:

using PackageCompiler
create_sysimage([:OITOOLS], sysimage_path="oitools.so", precompile_execution_file="precompile_oitools.jl")

then launch julia with

julia --sysimage oitools.so

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 100.0%