Grid#

class silmaril.utilities.Grid(center, num_pix, scale)#

Bases: object

Grid of points on the sky

Parameters:
  • center (astropy.coordinates.SkyCoord) – coordinates of the center of the grid

  • num_pix (int) – number of pixels on each side of the grid

  • scale (float) – pixel scale of the grid in arcseconds

center#

Coordinates of the center of the grid

n#

number of pixels on each side of the grid

scale#

pixel scale of the grid in arcseconds

fov#

field of view of the grid in arcseconds

x#

RA coordinates of the grid

y#

DEC coordinates of the grid

grid#

grid of coordinates in meshgrid format

wcs#

astropy.WCS object of the grid

__init__(center, num_pix, scale)#

Methods

__init__(center, num_pix, scale)

as_2d_array()

Returns the grid as a 2d array of (ra,dec) coordinate pairs.

as_list_of_points()

Flattens the grid into a list of (ra,dec) coordinate pairs.

as_2d_array()#

Returns the grid as a 2d array of (ra,dec) coordinate pairs.

Returns:

array of shape (n,n,2)

Return type:

numpy.ndarray

as_list_of_points()#

Flattens the grid into a list of (ra,dec) coordinate pairs.

Returns:

array of shape (n^2,2)

Return type:

numpy.ndarray