xlens.simulator.layout.shifts
Helper functions that return structured arrays of (dx, dy) shifts in arcseconds.
Functions
|
get a set of gridded shifts, with random shifts at the pixel scale |
|
get a set of hex grid shifts, with random shifts at the pixel scale |
|
get a set of random shifts in a square, with random shifts at the pixel |
|
Gets a set of random shifts on a disk, with random shifts at the |
Module Contents
- get_grid_shifts(*, rng, dim, pixel_scale, spacing)[source]
get a set of gridded shifts, with random shifts at the pixel scale
- Parameters:
rng (numpy.random.RandomState) – The random number generator
dim (int) – Dimensions of the final image
pixel_scale (float) – pixel scale
spacing (float) – Spacing of the lattice
- Returns:
shifts – Array with x, y in the image plane
- Return type:
array
- get_hex_shifts(*, rng, dim, pixel_scale, spacing)[source]
get a set of hex grid shifts, with random shifts at the pixel scale
- Parameters:
rng (numpy.random.RandomState) – The random number generator
dim (int) – Dimensions of the final image
pixel_scale (float) – pixel scale
spacing (float) – Spacing of the hexagonal lattice
- Returns:
shifts – Array with dx, dy offset fields for each point, in arcsec
- Return type:
array
- get_random_shifts(*, rng, dim, pixel_scale, size)[source]
get a set of random shifts in a square, with random shifts at the pixel scale
- Parameters:
rng (numpy.random.RandomState) – The random number generator
dim (int) – Dimensions of the final image
pixel_scale (float) – pixel scale
size (int) – Number of objects to draw.
- Returns:
shifts – Array with dx, dy offset fields for each point, in arcsec
- Return type:
array
- get_random_disk_shifts(*, rng, dim, pixel_scale, size)[source]
Gets a set of random shifts on a disk, with random shifts at the pixel scale
- Parameters:
rng (numpy.random.RandomState) – The random number generator
dim (int) – Dimensions of the final image
pixel_scale (float) – pixel scale
size (int) – Number of objects to draw.
- Returns:
shifts – Array with dx, dy offset fields for each point, in arcsec
- Return type:
array