Spherical Polygons (ligo.skymap.plot.poly
)¶
Plotting tools for drawing polygons.
- ligo.skymap.plot.poly.cut_dateline(vertices)[source] [edit on github]¶
Cut a polygon across the dateline, possibly splitting it into multiple polygons. Vertices consist of (longitude, latitude) pairs where longitude is always given in terms of a reference angle (between -π and π).
This routine is not meant to cover all possible cases; it will only work for convex polygons that extend over less than a hemisphere.
- ligo.skymap.plot.poly.cut_prime_meridian(vertices)[source] [edit on github]¶
Cut a polygon across the prime meridian, possibly splitting it into multiple polygons. Vertices consist of (longitude, latitude) pairs where longitude is always given in terms of a wrapped angle (between 0 and 2π).
This routine is not meant to cover all possible cases; it will only work for convex polygons that extend over less than a hemisphere.
- ligo.skymap.plot.poly.make_rect_poly(width, height, theta, phi, subdivisions=10)[source] [edit on github]¶
Create a Polygon patch representing a rectangle with half-angles width and height rotated from the north pole to (theta, phi).
- ligo.skymap.plot.poly.subdivide_vertices(vertices, subdivisions)[source] [edit on github]¶
Subdivide a list of vertices by inserting subdivisions additional vertices between each original pair of vertices using linear interpolation.