organoid_tracker.coordinate_system.spherical_coordinates module

class organoid_tracker.coordinate_system.spherical_coordinates.SphericalCoordinate(radius_um: float, theta_degrees: float, phi_degrees: float)

Bases: object

Spherical coordinate using the ISO convention.

angular_difference(other: SphericalCoordinate) SphericalCoordinate

Gets a spherical coordinate that is the angular difference between self and other. The radius is ignored; the radius of the returned object is always self.radius_um.

static from_cartesian(vector_um: Vector3) SphericalCoordinate

Gets the equivalent spherical coordinate.

latitude_degrees() float

Returns the latitude, which is theta - 90. Range is [-90, +90].

longitude_degrees() float

Returns the longitude, which is simply phi.

phi_degrees: float
radius_um: float
theta_degrees: float
to_cartesian(*, radius: Optional[float] = None) Vector3

Gets the equivalent cartesian coordinate. You can override the radius with another value.