circle Module
This module contains code related to circular geometries.
generate_circle_points(center_x, center_y, radius)
Jit-ed generate points on a circle
Given a center and a radius, get the points on a circle
Parameters:
Name | Type | Description | Default |
---|---|---|---|
center_x |
float
|
Circle center x-coordinate |
required |
center_y |
float
|
Circle center y-coordinate |
required |
radius |
float
|
Circle radius |
required |
Returns:
Type | Description |
---|---|
ndarray
|
A Nx2 array where the first column is the x-coordinate of a point on the circle and the second column is the y-coordinate of a point on the circle |
Source code in src/spyral/geometry/circle.py
least_squares_circle(x, y)
Jit-ed least-squares circle fit
Implementation of analytic least squares circle fit. Taken from the scipy cookbooks.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
ndarray
|
List of all x position coordinates to be fit |
required |
y |
ndarray
|
list of all y position coordinates to be fit |
required |
Returns:
Type | Description |
---|---|
tuple[float, float, float, float]
|
A four member tuple containing the center x-coordinate, the center y-coordinate, the radius, and the RMSE (in that order) These are NaN if the matrix is singular |