make_facet_from_sources

ska_sdp_exec_swiftly.fourier_transform.fourier_algorithm.make_facet_from_sources(sources: list[tuple[float, int]], image_size: int, facet_size: int, facet_offsets: list[int], facet_masks: list[ndarray] | None = None)[source]

Generates a facet from a source list

This basically boils down to adding pixels on a grid, taking into account that coordinates might wrap around. Length of facet_offsets tuple decides how many dimensions the result has.

Parameters:
  • sources – List of (intensity, *coords) tuples, all image coordinates integer and relative to image centre

  • image_size – All coordinates and offset are interpreted as modulo this size

  • facet_size – Desired size of facet

  • facet_offsets – Offset tuple of facet mid-point

  • facet_masks – Mask expressions (optional)

Returns:

Numpy array with facet data