ProjectionRegion

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

Bases: object

Projection region in the loaded skymap.

Parameters:
  • index (int) – index of the projection region in the loaded skymap array

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

Attributes Summary

MAX_LENGTH

MIN_AREA

data

Projection region data.

index

index in the loaded skymap

is_polar

whether this projection region is a polar cap

length

diagonal length of the region

orientation

pixel_scale

degrees per pixel

pixel_shape

number of pixels across

polygon

spherical polygon representing this region

radec_bounds

bounds in right ascension and declination in order [xmin, ymin, xmax, ymax]

radec_corners

corners in right ascension and declination in clockwise order

radec_tangent

projection origin (tangent point with the celestial sphere) in right ascension and declination

skycell_indices

indices of skycells in the loaded skymap within this projection region

skycells

collection of all skycells in this projection region

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

projection origin (tangent point with the celestial sphere) in pixel coordinates

Methods Summary

contains_radec(radec)

whether the given point(s) are contained within the bounds of this projection region

from_data(data[, skymap])

build a projection region instance from a data array

from_skycell_index(index[, skymap])

Attributes Documentation

MAX_LENGTH = 0.08174916691321586
MIN_AREA = 0.002791388883915502
data

Projection region data.

(“index”, “ra_tangent”, “dec_tangent”, “ra_min”, “ra_max”, “dec_min”, “dec_max”, “orientat”, “x_tangent”, “y_tangent”, “nx”, “ny”, “skycell_start”, “skycell_end”)

index

index in the loaded skymap

is_polar

whether this projection region is a polar cap

length[source]

diagonal length of the region

orientation
pixel_scale

degrees per pixel

pixel_shape

number of pixels across

polygon[source]

spherical polygon representing this region

radec_bounds

bounds in right ascension and declination in order [xmin, ymin, xmax, ymax]

radec_corners

corners in right ascension and declination in clockwise order

radec_tangent

projection origin (tangent point with the celestial sphere) in right ascension and declination

skycell_indices[source]

indices of skycells in the loaded skymap within this projection region

skycells[source]

collection of all skycells in this projection region

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

projection origin (tangent point with the celestial sphere) in pixel coordinates

Methods Documentation

contains_radec(radec: ndarray[tuple[Any, ...], dtype[float]]) ndarray[tuple[Any, ...], dtype[bool]][source]

whether the given point(s) are contained within the bounds of this projection region

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

build a projection region instance from a data array

Parameters:
  • data (numpy.void) – array with projection region parameters (see schema)

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

classmethod from_skycell_index(index: int, skymap: SkyMap = None) ProjectionRegion[source]
Parameters:
  • index (int) – index of the skycell

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

Returns:

projection region corresponding to the given skycell

Return type:

ProjectionRegion