Plotting
| Function | Description |
|---|---|
uvplot(data) | Plot UV coverage |
plot_v2(data) | Plot squared visibilities vs baseline |
plot_t3phi(data) | Plot closure phases vs baseline |
plot_t3amp(data) | Plot triple amplitudes vs baseline |
plot_visamp(data) | Plot visibility amplitudes |
plot_visphi(data) | Plot visibility phases |
plot_diffphi(data) | Plot differential phases |
plot_flux(data) | Plot flux vs wavelength |
plot_obs(data; obs, ...) | Multi-panel figure with shared x-axis and legend |
plot_v2_residuals(data, v2_model) | Plot V² residuals against a model |
plot_t3phi_residuals(data, t3phi_model) | Plot closure-phase residuals |
plot_t3amp_residuals(data, t3amp_model) | Plot triple-amplitude residuals |
plot_visamp_residuals(data, visamp_model) | Plot visibility-amplitude residuals |
plot_visphi_residuals(data, visphi_model) | Plot visibility-phase residuals |
plot_residuals(data, obs) | Combined residual plot for all observables |
plot_v2_multifile(data_vec) | Overlay V² from multiple datasets |
plot_facility(facility) | Plot telescope positions from a FacilityConfig |
imdisp(image; pixsize, ...) | Display a single image |
imdisp_multi(cube; labels, ...) | Display multiple images side by side |
set_oiplot_defaults() | Apply matplotlib style settings |
OITOOLS.set_oiplot_defaults — Function
set_oiplot_defaults(; compact=oiplot_compact)Apply consistent matplotlib style settings. When compact=true, all sizes are reduced for stacking multiple plots in a single figure. Calling without arguments preserves the current compact state.
OITOOLS.uvplot — Function
uvplot(data; kwargs...)Plot the UV coverage for one or more OIdata bins. Conjugate baselines (-u, -v) are always shown. Accepts a single OIdata, a vector, or the 2-D array returned by readoifits (flattened automatically).
Keyword arguments
color— colouring scheme:"baseline"(default) — one colour per baseline pair, labelled legend"wav"/"wavelength"— coloured by λ (μm) with a horizontal colorbar"mjd"/"time"— coloured by MJD with a horizontal colorbar- any other string — all points black
figsize— figure size tuple. Default:(10, 10).minuv,maxuv— axis limits in Mλ whensquare=true.square— force equal axis limits. Default:true.legend_below— place the baseline legend below the plot. Default:true.figtitle— plot title string.cmap— matplotlib colormap forwav/mjdmodes. Default:"Spectral_r".flipx— invert the x-axis (East to the right). Default:false.filename— save to file if non-empty.
OITOOLS.plot_v2 — Function
plot_v2(data; kwargs...)Plot squared visibilities V² vs baseline length (Mλ). Accepts a single OIdata, vector, or 2-D array.
Keyword arguments
color—"baseline"(default),"wav","mjd", or an explicit colour string.logplot— logarithmic y-axis. Default:false.figsize— figure size. Default:(12, 6).figtitle— prefix for the figure window title.markopt— use distinct marker shapes per baseline. Default:false.legend_below— place legend below the plot. Default:false.
OITOOLS.plot_t3phi — Function
plot_t3phi(data; kwargs...)Plot closure phases T3φ (degrees) vs a representative baseline length (Mλ). Accepts a single OIdata, vector, or 2-D array.
Keyword arguments
t3base— x-axis baseline:"geom"(default, geometric mean) or"max"(longest side).color—"baseline"(default),"wav","mjd", or explicit colour string.figsize— figure size. Default:(12, 6).figtitle— prefix for the figure window title.markopt— use distinct marker shapes. Default:false.legend_below— place legend below the plot. Default:false.
OITOOLS.plot_t3amp — Function
plot_t3amp(data; kwargs...)Plot triple amplitudes T3amp vs a representative baseline length (Mλ). Accepts a single OIdata, vector, or 2-D array.
Keyword arguments
t3base— x-axis baseline:"geom"(default, geometric mean) or"max"(longest side).color—"baseline"(default),"wav","mjd", or explicit colour string.logplot— use logarithmic y-axis. Default:false.figsize— figure size. Default:(12, 6).figtitle— prefix for the figure window title.markopt— use distinct marker shapes. Default:false.legend_below— place legend below the plot. Default:false.
OITOOLS.plot_visamp — Function
plot_visamp(data; kwargs...)Plot visibility amplitudes vs baseline length (Mλ). Accepts a single OIdata, vector, or 2-D array. The title and y-label adapt to the AMPTYP header stored in data.amptyp ("absolute", "differential", "correlated flux", or generic).
Keyword arguments
color—"baseline"(default),"wav","mjd", or explicit colour string.logplot— use logarithmic y-axis. Default:false.figsize— figure size. Default:(12, 6).figtitle— prefix for the figure window title.markopt— use distinct marker shapes. Default:false.legend_below— place legend below the plot. Default:false.
OITOOLS.plot_visphi — Function
plot_visphi(data; kwargs...)Plot visibility phases (degrees). The layout is chosen automatically from the PHITYP header stored in data.phityp:
- differential (
phityp == "differential") — one subplot per baseline with wavelength (nm) on the x-axis. - absolute (default) — single panel with baseline (Mλ) on the x-axis, coloured by baseline, wavelength, or MJD.
Accepts a single OIdata, vector, or 2-D array.
Keyword arguments
color—"baseline"(default),"wav","mjd", or explicit colour string (ignored for differential layout).figsize— figure size. Default:(12, 6).figtitle— prefix for the figure window title.markopt— use distinct marker shapes. Default:false.legend_below— place legend below the plot. Default:false.
OITOOLS.plot_diffphi — Function
plot_diffphi(data; kwargs...)Deprecated — use plot_visphi instead, which auto-detects differential phases from data.phityp.
OITOOLS.plot_flux — Function
plot_flux(data; kwargs...)Plot flux spectra vs wavelength (μm). Accepts a single OIdata, vector, or 2-D array.
Keyword arguments
color— colouring scheme:"wav"(default) — coloured by wavelength with a horizontal colorbar."station"— one colour per station; OIFLUX entries withCALSTAT=C(i.e. `fluxsta_index == 0) are labelled"Calibrated"`."mjd"/"time"— scatter coloured by MJD with a horizontal colorbar.- any other string — treated as a matplotlib colour applied uniformly.
figsize— figure size. Default:(12, 6).figtitle— prefix for the figure window title.markopt— use black markers with distinct shapes. Default:false.legend_below— place legend below the plot. Default:false.
OITOOLS.plot_obs — Function
plot_obs(data; obs=["V2","T3PHI","T3AMP"], color="baseline",
logplot=false, figsize=nothing, figtitle="", markopt=false)Multi-panel figure with one subplot per observable, sharing the x-axis and a single legend. Panels are stacked vertically; only the bottom panel gets an x-axis label.
obs is a vector of spec keys from OBS_PLOT_SPECS (e.g. "V2", "T3PHI", "T3AMP", "VISAMP", "VISPHI", "FLUX"). Panels whose data is empty are skipped automatically.
When logplot=true, amplitude-like panels (V², T3amp, Visamp) use a log y-axis; phase panels are unaffected.
OITOOLS.plot_residuals — Function
plot_residuals(data, obs; color="baseline", figsize=(14,10))Plot data vs model and normalised residuals for all observable types present in data. obs is a NamedTuple from image_to_obs or model_to_obs.
Also accepts image-domain plot_residuals(x, ft, data) or model-domain plot_residuals(model, x, data) signatures.
OITOOLS.imdisp — Function
imdisp(image; kwargs...)Display a 2-D reconstructed image. The image is normalised to its maximum and oriented with East left / North up (Monnier convention). Accepts a flat vector (square image assumed) or a 2-D matrix.
Keyword arguments
pixsize— pixel scale in mas. When-1(default) the axes show pixel indices.colormap— matplotlib colormap. Default:"gist_heat".figtitle— figure window title. Default:"OITOOLS image".tickinterval— minor-tick spacing in mas. Default:0.5; auto-scaled for large images.use_colorbar— show a right-side colorbar. Default:false.beamsize— if> 0, draw a filled white circle of this diameter (mas) to indicate the PSF.beamlocation—[fx, fy]fractional position of the beam circle. Default:[0.8, 0.8].
OITOOLS.imdisp_multi — Function
imdisp_multi(cube; kwargs...)Display a 3-D stack of images (e.g. polychromatic channels or multi-temporal epochs) in a grid of subplots, one panel per slice. Each slice is normalised independently and rendered with the same formatting as imdisp.
cube is an (nx, nx, nslices) array.
Keyword arguments
labels— vector of strings for subplot titles. Default:"1","2", ….pixsize— pixel scale in mas (-1= pixel indices).colormap— matplotlib colormap name. Default:"gist_heat".figtitle— figure window title. Default:"OITOOLS images".tickinterval— minor-tick spacing (auto-adjusted for large fields of view).use_colorbar— show a colour bar beside each panel.beamsize— if> 0, draw a beam circle on each panel.beamlocation—[x, y]fractional position for the beam circle.