Outputs API

The Outputs module writes images and computes interferometric observables.

BlackLightPlus.OutputsModule
Outputs

Image writers and interferometry (blacklight outputs/ heritage): a zero-dependency NumPy .npy (format v1.0) writer, mirroring blacklight's in-house npy.cpp, whose arrays load directly with numpy.load.

source

Image output

Interferometry

Visibility amplitudes from an image, following AART (Cárdenas-Avendaño et al., 2023). radon_cut takes a projection through the image; visamp computes the visibility amplitude along a baseline; visamp_minima locates the minima whose spacing encodes the photon-ring diameter.

BlackLightPlus.Outputs.radon_cutFunction
radon_cut(img, angle_deg; fov_muas) -> (projection, s_axis_muas)

Parallel-beam Radon projection of a square image (I[iβ, iα], rows = β) at baseline angle_deg; fov_muas is the full field of view in μas. Each pixel is linearly splatted into the two bins straddling its projected coordinate t = x·cosθ + y·sinθ — exact for axis-aligned cuts, first-order at oblique angles (sufficient for the visibility-amplitude ring ruler). Returns the length-N projection and its μas offset axis.

source
BlackLightPlus.Outputs.visampFunction
visamp(img; angles=(0.0, 90.0), fov_muas, pad=16, maxbaseline=Inf,
       window=:tukey) -> Vector{NamedTuple}

Interferometric visibility amplitude of img along each baseline angle (degrees): radon_cut → Tukey window (window=:tukey, else rectangular) → zero-pad by pad× → 1-D FFT → |V| (normalised to |V(0)| = 1) on the non-negative baselines below maxbaseline, in Gλ. Returns one (angle, baselines, amplitude) entry per angle. The minima are spaced by ≈ 1/(d · MUAS_TO_RAD · 1e9) Gλ for a ring of angular diameter d μas.

source
BlackLightPlus.Outputs.visamp_minimaFunction
visamp_minima(baselines, amplitude; skip=1, bl_min=0.0) -> Vector

Baselines (Gλ) of the local minima of a visibility-amplitude curve — the strict-interior valleys with bl > bl_min, dropping the first skip (the DC lobe roll-off). Successive minima spacings give the photon-ring-diameter ruler.

source
BlackLightPlus.Outputs.tukey_windowFunction
tukey_window(n, α=0.5) -> Vector

The tapered-cosine (Tukey) window of length n: a flat centre with cosine tapers over the outer α fraction (α=0 rectangular, α=1 Hann). Matches scipy.signal.windows.tukey; AART uses α=0.5 to suppress FFT ringing from the finite Radon cut without over-smoothing the ring minima.

source