Skip to content

Commit

Permalink
Merge pull request #155 from cds-astro/doc-lonlat [skip ci]
Browse files Browse the repository at this point in the history
add explanations about the standard for coordinates in space mocs
  • Loading branch information
ManonMarchand authored Jul 10, 2024
2 parents 0241675 + 3f63f8a commit 2491055
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions python/mocpy/moc/moc.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ def contains(self, lon, lat, keep_inside=True):
def contains_lonlat(self, lon, lat, keep_inside=True):
"""Test wether a MOC contains (or not) the given points. Returns a boolean mask array.
The coordinates should be expressed in equatorial coordinates using the
ICRS reference. We follow the Space MOC standard.
Parameters
----------
lon : `astropy.coordinates.Longitude` or its supertype `astropy.units.Quantity`
Expand Down Expand Up @@ -779,6 +782,9 @@ def from_lonlat(cls, lon, lat, max_norder):
"""
Create a MOC from astropy lon, lat `astropy.units.Quantity`.
The coordinates should be expressed in equatorial coordinates using the
ICRS reference. We follow the Space MOC standard.
Parameters
----------
lon : `astropy.coordinates.Longitude` or its supertype `astropy.units.Quantity`
Expand Down Expand Up @@ -1163,6 +1169,8 @@ def from_elliptical_cone(cls, lon, lat, a, b, pa, max_depth, *, delta_depth=2):
The ellipse is centered around the (`lon`, `lat`) position. `a` (resp. `b`) corresponds
to the semi-major axis magnitude (resp. semi-minor axis magnitude). `pa` is expressed as a
`~astropy.coordinates.Angle` and defines the position angle of the elliptical cone.
The coordinates should be expressed in equatorial coordinates using the
ICRS reference. We follow the convention for Space MOCs.
Parameters
----------
Expand Down Expand Up @@ -1222,6 +1230,8 @@ def from_cone(cls, lon, lat, radius, max_depth, *, delta_depth=2):
The cone is centered around the (`lon`, `lat`) position with a radius expressed by
`radius`.
The coordinates should be expressed in equatorial coordinates using the
ICRS reference. We follow the Space MOC standard.
Parameters
----------
Expand Down Expand Up @@ -1272,7 +1282,9 @@ def from_cones(cls, lon, lat, radius, max_depth, *, delta_depth=2, n_threads=Non
Create a list of MOCs from cones.
Each cone is centered around the (`lon`, `lat`) position with a radius expressed by
`radius`. Coordinates should be in the ICRS frame, as stipulated in the MOC standard.
`radius`.
The coordinates should be expressed in equatorial coordinates using the
ICRS reference. We follow the Space MOC standard.
Parameters
----------
Expand Down Expand Up @@ -1336,6 +1348,8 @@ def from_box(cls, lon, lat, a, b, angle, max_depth):
Create a MOC from a box/rectangle.
The box is centered around the (`lon`, `lat`) position.
The coordinates should be expressed in equatorial coordinates using the
ICRS reference. We follow the Space MOC standard.
Parameters
----------
Expand Down Expand Up @@ -1386,7 +1400,9 @@ def from_boxes(cls, lon, lat, a, b, angle, max_depth, *, n_threads=None):
"""
Create a MOC from a box/rectangle.
The box is centered around the (`lon`, `lat`) position.
The boxes are centered around the (`lon`, `lat`) positions.
The coordinates should be expressed in equatorial coordinates using the
ICRS reference. We follow the Space MOC standard.
Parameters
----------
Expand Down Expand Up @@ -1480,6 +1496,8 @@ def from_ring(
The cone is centered around the (`lon`, `lat`) position with an internal radius expressed by
`internal_radius` and an external radius expressed by `external_radius`.
The coordinates should be expressed in equatorial coordinates using the
ICRS reference. We follow the Space MOC standard.
Parameters
----------
Expand Down Expand Up @@ -1655,6 +1673,8 @@ def from_polygon(cls, lon, lat, complement=False, max_depth=10):
The polygon is given as lon and lat `astropy.units.Quantity` that define the
vertices of the polygon. Concave, convex and self-intersecting polygons are accepted.
The coordinates should be expressed in equatorial coordinates using the
ICRS reference. We follow the Space MOC standard.
Parameters
----------
Expand Down

0 comments on commit 2491055

Please sign in to comment.