SkyCells

class romancal.skycell.skymap.SkyCells(indices: ndarray[tuple[Any, ...], dtype[int]], skymap: SkyMap = None)[source]

Bases: object

Set of square subregions of projection regions, 4.6 arcminutes per side.

Parameters:
  • indices (list[int]) – Indices of skycells in the global sky map.

  • skymap (SkyMap) – sky map instance (defaults to global SKYMAP)

Attributes Summary

data

data of these skycells

indices

indices of these skycells in the loaded skymap

kdtree

k-d tree of skycells, using normalized center vectorpoints in 3D space

names

names of these skycells, for instance 315p86x50y75

orientations

pixel_scale

degrees per pixel

pixel_shape

number of pixels across

polygons

spherical polygons representing these skycells

projection_regions

index of projection region containing each skycell

radec_centers

center points in right ascension and declination (Nx2 array of floats)

radec_corners

corners in right ascension and declination in the order given by the loaded skymap (Nx4x2 array of floats)

vectorpoint_centers

centers in 3D Cartesian space on the unit sphere (Nx3 array of floats)

vectorpoint_corners

corners in 3D Cartesian space on the unit sphere (Nx4x3 array of floats)

wcs

WCS objects representing these skycells

wcs_infos

WCS properties as defined in the Level 3 association schema for each skycell

xy_tangents

tangent points of projection regions in pixel coordinates (Nx2 array of floats)

Methods Summary

containing(radec)

point(s) contained by each of these skycells

cores_containing(radec)

point(s) exclusively core-contained by each of these skycells

from_names(names[, skymap])

Retrieve skycells from the sky map [skymap] by name.

Attributes Documentation

data

data of these skycells

(“name”, “ra_center”, “dec_center”, “orientat”, “x_tangent”, “y_tangent”, “ra_corn1”, “dec_corn1”, “ra_corn2”, “dec_corn2”, “ra_corn3”, “dec_corn3”, “ra_corn4”, “dec_corn4”)

indices

indices of these skycells in the loaded skymap

kdtree[source]

k-d tree of skycells, using normalized center vectorpoints in 3D space

names

names of these skycells, for instance 315p86x50y75

Note

the name of a skycell comprises the rounded center coordinates of its containing projection region in right ascension and declination, and the XY location of the skycell within its projection region in units of ordinal skycells from that center

orientations
pixel_scale

degrees per pixel

pixel_shape

number of pixels across

polygons[source]

spherical polygons representing these skycells

projection_regions[source]

index of projection region containing each skycell

radec_centers

center points in right ascension and declination (Nx2 array of floats)

radec_corners

corners in right ascension and declination in the order given by the loaded skymap (Nx4x2 array of floats)

vectorpoint_centers[source]

centers in 3D Cartesian space on the unit sphere (Nx3 array of floats)

vectorpoint_corners[source]

corners in 3D Cartesian space on the unit sphere (Nx4x3 array of floats)

wcs[source]

WCS objects representing these skycells

wcs_infos

WCS properties as defined in the Level 3 association schema for each skycell

xy_tangents

tangent points of projection regions in pixel coordinates (Nx2 array of floats)

Methods Documentation

containing(radec: ndarray[tuple[Any, ...], dtype[float]]) dict[int, list[int]][source]

point(s) contained by each of these skycells

Parameters:

radec (NDArray[float]) – right ascension and declination of coordinate(s)

Return type:

mapping of skycell indices to indices of given points contained by that skycell

cores_containing(radec: ndarray[tuple[Any, ...], dtype[float64]]) dict[int, list[int]][source]

point(s) exclusively core-contained by each of these skycells

Parameters:

radec (NDArray[float]) – right ascension and declination of coordinate(s)

Return type:

mapping of skycell indices to indices of given points exclusively core-contained by that skycell

classmethod from_names(names: list[str], skymap: SkyMap = None) SkyCells[source]

Retrieve skycells from the sky map [skymap] by name.

Note

Order of input names is NOT preserved.

Parameters:
  • name (list[str]) – List of names of skycells, for instance 315p86x50y75.

  • skymap (SkyMap) – sky map instance; defaults to global SKYMAP (Default value = None)