redplanet.analysis.radial_profile.get_concentric_ring_coords
get_concentric_ring_coords(
lon: float,
lat: float,
radius_km: float,
dist_btwn_rings_km: float = Ellipsis,
num_rings: int = None,
dist_btwn_points_km: float = 5,
) -> tuple[numpy.ndarray, tuple[numpy.ndarray]]
Generate concentric ring coordinates around a central point.
This function computes the radii for a series of concentric rings centered at the specified location and then generates (longitude, latitude) coordinates for equally spaced points along each ring. The rings can be defined by either a fixed distance between rings or by specifying the total number of rings to generate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lon
|
float
|
Longitude coordinate of the center of the circle, in range [-180, 360]. |
required |
lat
|
float
|
Latitude coordinate of the center of the circle, in range [-90, 90]. |
required |
radius_km
|
float
|
Radius (in kilometers) of the largest/outermost ring. |
required |
dist_btwn_rings_km
|
float
|
Distance (in kilometers) between consecutive rings. You can't provide both this and |
Ellipsis
|
num_rings
|
int
|
Total number of rings to generate. You can't provide both this and |
None
|
dist_btwn_points_km
|
float
|
Desired spacing (in kilometers) between adjacent points on each ring. Default is 5. |
5
|
Returns:
Name | Type | Description |
---|---|---|
ring_radius_km__per_ring |
np.ndarray
|
Ring radii (in kilometers) for each ring. |
ring_coords__per_ring |
tuple[np.ndarray]
|
A tuple of 2D numpy arrays, each containing the (longitude, latitude) coordinates of points on the corresponding ring (shape is |
Raises:
Type | Description |
---|---|
ValueError
|
If either both or neither of |
Notes
For examples, see "Tutorials & Guides" on the RedPlanet documentation website.