make_subgrid_from_sources

ska_sdp_exec_swiftly.fourier_transform.fourier_algorithm.make_subgrid_from_sources(sources: list[tuple[float, int]], image_size: int, subgrid_size: int, subgrid_offsets: list[int], subgrid_masks: list[ndarray] | None = None)[source]

Generates a subgrid from a source list

This solves a direct Fourier transformation for the given sources. Note that in contrast to make_facet_from_sources this can get fairly expensive. Length of subgrid_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 – Image size. Determines grid resolution and normalisation.

  • subgrid_size – Desired size of subgrid

  • subgrid_offsets – Offset tuple of subgrid mid-point

  • subgrid_masks – Mask expressions (optional)

Returns:

Numpy array with subgrid data