Skip to content

virgil.scenes

Synthetic truth images for testing image reconstructions: simulate data from a known scene with your own coverage and noise before trusting an image of real data.

Synthetic truth images for testing image reconstructions.

Each function returns a unit-sum (npix, npix) array in the virgil image orientation (East left, North up, centre at the middle of the pixel grid, as in render), ready for Image.from_brightness. Position angles run North to East. The ring and spiral are inspired by the training scenes of Jonah Goldfine's frito (https://github.com/JonahDG/frito).

ring(npix, pixel_scale_mas, radius_mas, width_mas, inc_deg=0.0, pa_deg=0.0, asymmetry=0.0, asymmetry_pa_deg=0.0)

Gaussian-profile ring, optionally inclined and azimuthally modulated.

Parameters:

Name Type Description Default
npix (int, float)

Pixels on a side, and pixel size in milliarcseconds.

required
pixel_scale_mas (int, float)

Pixels on a side, and pixel size in milliarcseconds.

required
radius_mas float

Radius of the ring's peak (the semi-major axis when inclined) and standard deviation of the radial profile, in milliarcseconds.

required
width_mas float

Radius of the ring's peak (the semi-major axis when inclined) and standard deviation of the radial profile, in milliarcseconds.

required
inc_deg float

Inclination (0 is face-on; the minor axis is cos(inc) times the major axis) and position angle of the major axis (North to East), in degrees.

0.0
pa_deg float

Inclination (0 is face-on; the minor axis is cos(inc) times the major axis) and position angle of the major axis (North to East), in degrees.

0.0
asymmetry float

Amplitude (0 to 1) of the modulation 1 + asymmetry * cos(PA - asymmetry_pa_deg) of the brightness around the ring (PA the on-sky position angle of a pixel), and the position angle of its brightest part, in degrees.

0.0
asymmetry_pa_deg float

Amplitude (0 to 1) of the modulation 1 + asymmetry * cos(PA - asymmetry_pa_deg) of the brightness around the ring (PA the on-sky position angle of a pixel), and the position angle of its brightest part, in degrees.

0.0

Returns:

Type Description
(Array, shape(npix, npix))

The ring, summing to one.

spiral(npix, pixel_scale_mas, step_mas, width_mas, turns=2.0, pa_deg=0.0, fade_mas=None)

Archimedean spiral, like a dust pinwheel.

The arm is r = step_mas * theta / (2 pi), starting at the centre and winding towards increasing position angle as it moves outwards.

Parameters:

Name Type Description Default
npix (int, float)

Pixels on a side, and pixel size in milliarcseconds.

required
pixel_scale_mas (int, float)

Pixels on a side, and pixel size in milliarcseconds.

required
step_mas float

Radial distance between successive turns, and standard deviation of the Gaussian cross-section along the radial direction, in milliarcseconds.

required
width_mas float

Radial distance between successive turns, and standard deviation of the Gaussian cross-section along the radial direction, in milliarcseconds.

required
turns float

Number of turns of the arm, which ends in a rounded cap; position angle (North to East, degrees) of its start; and, if given, exp(-r / fade_mas) falloff of the brightness.

2.0
pa_deg float

Number of turns of the arm, which ends in a rounded cap; position angle (North to East, degrees) of its start; and, if given, exp(-r / fade_mas) falloff of the brightness.

2.0
fade_mas float

Number of turns of the arm, which ends in a rounded cap; position angle (North to East, degrees) of its start; and, if given, exp(-r / fade_mas) falloff of the brightness.

2.0

Returns:

Type Description
(Array, shape(npix, npix))

The spiral, summing to one.

gaussian_blob(npix, pixel_scale_mas, sigma_mas, dra=0.0, ddec=0.0)

Circular Gaussian, e.g. a clump or a resolved companion.

Parameters:

Name Type Description Default
npix int

Number of pixels on a side.

required
pixel_scale_mas float

Pixel size in milliarcseconds.

required
sigma_mas float

Standard deviation in milliarcseconds.

required
dra float

Offset of the centre from the image centre in milliarcseconds, positive to the East and North.

0.0
ddec float

Offset of the centre from the image centre in milliarcseconds, positive to the East and North.

0.0

Returns:

Type Description
(Array, shape(npix, npix))

The blob, summing to one.