Skip to content

Class: HarmonixModel

Bases: SourceModel

Wrapper for external source models with harmonix-like visibility methods.

Parameters:

Name Type Description Default
source object

External model. getattr(source, visibility_method) is called with the baselines (and observation_time if given) and must return complex visibilities normalized to 1 at zero baseline.

required
visibility_method str

Name of the visibility method (default "model").

'model'
render_method str

Name of a render(npix, fov_mas) method used by render (default "render"). Sources without one but with a surface and a radius in milliarcseconds (harmonix stars) are drawn on the sky from the surface's intensity, East left and North up, like every other model.

'render'
expects_wavelength_units bool

If True (default), pass spatial frequencies u / wavel, v / wavel; otherwise pass u, v in metres.

True
observation_time optional

Extra argument passed after the baselines, e.g. a time for rotating stars.

None
Notes

source is an ordinary field, so a source that is a pytree (such as a harmonix Harmonix, an equinox module) has parameters that zodiax paths reach and fits can vary, e.g. "source.radius" (mas) or "source.data" (harmonix's map coefficients for l >= 1, with Y00 = 1). Sources that are not pytrees need eqx.filter_jit rather than jax.jit. observation_time is static (hashable): array-valued times are not supported under jax.jit.

A wrapped source has weight 1 inside a System; only harmonix stars can be drawn there.

__init__(source, visibility_method='model', render_method='render', expects_wavelength_units=True, observation_time=None)

model(u, v, wavel)

render(npix=256, fov_mas=200.0)