SkyCell

class romancal.skycell.skymap.SkyCell(index: int | None, skymap: SkyMap = None)[source]

Bases: object

Square subregion of a projection region, 4.6 arcminutes per side.

Parameters:
  • index (int) – Index in the global sky map.

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

Attributes Summary

area

data

Skycell data.

index

index of this skycell in the loaded skymap

length

name

name of this skycell, for instance 315p86x50y75

orientation

pixel_scale

degrees per pixel

pixel_shape

number of pixels across

polygon

spherical polygon representing this skycell

projection_region

Projection region containing this skycell.

radec_center

center point in right ascension and declination

radec_corners

corners in right ascension and declination in the order given by the loaded skymap

vectorpoint_center

center in 3D Cartesian space on the unit sphere

vectorpoint_corners

corners in 3D Cartesian space on the unit sphere

wcs

WCS representing this skycell

wcs_info

WCS properties as defined in the Level 3 association schema

xy_tangent

center point in pixel coordinates

Methods Summary

from_asn(asn[, skymap])

retrieve a skycell from WCS info or a target specified in an association

from_data(data[, skymap])

build an index-less skycell instance from a data array

from_name(name[, skymap])

Retrieve a sky cell from the sky map [skymap] by its name.

Attributes Documentation

area = 1.7760288493318122e-06
data

Skycell data.

(“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”)

index

index of this skycell in the loaded skymap

length = 0.107984
name

name of this skycell, for instance 315p86x50y75

Note

the name of a skycell center 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

orientation
pixel_scale

degrees per pixel

pixel_shape

number of pixels across

polygon[source]

spherical polygon representing this skycell

projection_region[source]

Projection region containing this skycell.

radec_center

center point in right ascension and declination

radec_corners

corners in right ascension and declination in the order given by the loaded skymap

vectorpoint_center[source]

center in 3D Cartesian space on the unit sphere

vectorpoint_corners[source]

corners in 3D Cartesian space on the unit sphere

wcs[source]

WCS representing this skycell

wcs_info

WCS properties as defined in the Level 3 association schema

xy_tangent

center point in pixel coordinates

Methods Documentation

classmethod from_asn(asn: dict | str, skymap: SkyMap = None) SkyCell[source]

retrieve a skycell from WCS info or a target specified in an association

Attempts to find a skycell name from the following in order:
  • skycell_wcs_info.name

  • target

Parameters:
  • asn (dict | str) – association dictionary or a path to an association file to load

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

classmethod from_data(data: void, skymap: SkyMap = None) SkyCell[source]

build an index-less skycell instance from a data array

Parameters:
  • data (np.void) – array with skycell parameters (see schema)

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

classmethod from_name(name: str, skymap: SkyMap = None) SkyCell[source]

Retrieve a sky cell from the sky map [skymap] by its name.

Parameters:
  • name (str) – Name of a skycell, for instance 315p86x50y75.

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