virgil.models Functions
Analytic complex visibilities, in spatial-frequency units (baselines divided
by wavelength). Likelihoods are in virgil.likelihood.
Source models: sky-brightness distributions and their visibilities.
- Components (
PointSource,GaussianDisk,UniformDisk, the limb-darkened disks such asQuadraticLimbDarkenedDisk,ModulatedGaussianRim, and the flared scattered-light disks such asFlaredDiskPowerLaw) are single shapes, combined with flux weights in aSystem. BinaryModelCartesianandBinaryModelAngularare fast forms of a primary plus a point-source companion.- The
cvis_*functions are the analytic visibilities behind them.
Every flux is relative: for a companion it is the companion/primary flux
ratio. Likelihoods of these models are in
virgil.likelihood.
cvis_binary(u, v, dra, ddec, flux)
Compute complex visibilities for a Cartesian-parameterized binary model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
u
|
array - like
|
Baseline |
required |
v
|
array - like
|
Baseline |
required |
dra
|
float or array - like
|
Right-ascension offset of the companion in milliarcseconds, positive to the East. |
required |
ddec
|
float or array - like
|
Declination offset of the companion in milliarcseconds, positive to the North. |
required |
flux
|
float or array - like
|
Companion/primary flux ratio. |
required |
Returns:
| Type | Description |
|---|---|
array - like
|
Complex visibility samples, normalized to 1 at zero baseline. |
cvis_uniform_disk(u, v, diam, dra=0.0, ddec=0.0)
Compute complex visibilities for a uniform (tophat) disk.
The visibility amplitude follows the classic uniform-disk form
2 * J1(x) / x, with x = pi * diam_rad * base_norm the product of
the disk diameter (in radians) and the baseline length in wavelength
units (base_norm = hypot(u, v), i.e. baseline length divided by
wavelength).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
u
|
array - like
|
Baseline |
required |
v
|
array - like
|
Baseline |
required |
diam
|
float or array - like
|
Diameter of the uniform disk in milliarcseconds. |
required |
dra
|
float or array - like
|
Right-ascension offset in milliarcseconds. |
0.0
|
ddec
|
float or array - like
|
Declination offset in milliarcseconds. |
0.0
|
Returns:
| Type | Description |
|---|---|
array - like
|
Complex visibility samples. |
cvis_limb_darkened_disk(u, v, diam, coeffs, powers, dra=0.0, ddec=0.0)
Complex visibilities of a disk whose brightness is a sum of powers of \(\mu\).
For \(I(\mu) = \sum_\nu a_\nu \mu^\nu\), with \(\mu = \sqrt{1 - (r/R)^2}\), Quirrenbach et al. (1996, A&A 312, 160, eqs. 1-4) show that
with \(x = \pi\,\theta\,|b| / \lambda\) for diameter \(\theta\), normalized to
1 at zero baseline. A uniform disk (\(a_0 = 1\)) gives \(2 J_1(x)/x\). The
powers need not be integers: the square-root law has \(\nu = 1/2\), which
needs order \(5/4\), from jaxbessel's bessel_jv_over_xv, which takes
orders up to 12, so \(-2 < \nu \le 22\) (the lower limit keeps the flux
finite). harmonix
(Dholakia & Pope 2025) generalizes
the result to polynomial limb darkening of spherical-harmonic maps.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
u
|
array - like
|
Baseline |
required |
v
|
array - like
|
Baseline |
required |
diam
|
float or array - like
|
Limb-darkened diameter in milliarcseconds. |
required |
coeffs
|
array - like
|
Coefficients \(a_\nu\), one per power (traceable). |
required |
powers
|
sequence of float
|
Powers \(\nu\) of \(\mu\), each with \(-2 < \nu \le 22\) (static). |
required |
dra
|
float or array - like
|
Right-ascension offset in milliarcseconds. |
0.0
|
ddec
|
float or array - like
|
Declination offset in milliarcseconds. |
0.0
|
Returns:
| Type | Description |
|---|---|
array - like
|
Complex visibility samples. |
cvis_radial_dirac_delta_modulated(u, v, r0, az_amps, az_phis)
Compute the complex visibility for an azimuthally modulated radial dirac delta ring. The image intensity can be described in polar image coordinates as \(I(r, \theta) \propto \delta(r-r_0) \left( 1 + \sum_{m=1}^{n} A_m \cos{(m(\theta - \phi_m))} \right)\), where \(r_0\) is the ring's radial position, \(A_m\) the amplitude and \(\phi_m\) the position phase angle (defined counter-clockwise , North to East) for the m-th order modulation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
u
|
array - like
|
Baseline |
required |
v
|
array - like
|
Baseline |
required |
r0
|
float or array - like
|
Scalar with the radial position of the ring in milliarcseconds. |
required |
az_amps
|
array - like
|
1D array containing amplitude coefficients for cosine azimuthal modulations. The first element is seen as the amplitude for the first-order modulation, the second as the amplitude for the second-order modulation, etc. |
required |
az_phis
|
array - like
|
1D array containing offset angles of the cosine azimuthal modulations, relative to the position angle of the rim's projected major axis, in degrees. The first element is seen as the offset for the first-order modulation, the second for the second-order modulation, etc. |
required |
Returns:
| Type | Description |
|---|---|
array - like
|
Complex visibility samples. |
Notes
This function does not account for rotation and geometric stretching (e.g. due to inclination). A separate transformation of \(uv\) coordinates should account for this. The phase angles of the cosine modulations are defined relative to the spatial y-axis (North), turning counterclockwise to the x-axis (East). This means that a single 1st order modulation with a phase angle of \(0 \, \mathrm{deg}\) results in a bright peak towards the North, and a faint peak towards the South. A phase angle of \(90 \, \mathrm{deg}\) would result in a bright peak towards the East, and a faint one towards the West.