grid_perimeter#

sunpy.util.grid_perimeter(nx, ny)[source]#

Return a sequence of (x, y) grid points for the perimeter of a grid.

The sequence represents an open path starting at (0, 0); traversing clockwise through (0, ny), (nx, ny), and (nx, 0); and then returning to (0, 0) exclusive (i.e., stopping at (1, 0)).

Parameters:
  • nx (int) – The number of grid cells in the X direction

  • ny (int) – The number of grid cells in the Y direction

Returns:

numpy.ndarray – A Nx2 array of (x, y) grid points, where N is 2 * (nx + ny)