adam_core.coordinates.cartesian module¶
- class adam_core.coordinates.cartesian.CartesianCoordinates(table: Table, **kwargs: int | float | str)[source]¶
Bases:
TableRepresents coordinates in Cartesian space.
- x¶
x coordinates in AU
- y¶
y coordinates in AU
- z¶
z coordinates in AU
- vx¶
x velocity in AU/day
- vy¶
y velocity in AU/day
- vz¶
z velocity in AU/day
- time¶
The instant at which the coordinates are valid
- covariance¶
Covariance matrix for the x, y, z, vx, vy, and vz values
- origin¶
Center of the coordinate system
- frame¶
Frame of the coordinate system - ‘ecliptic’ or ‘equatorial’ or ‘unspecified’.
- property values: ndarray[tuple[Any, ...], dtype[float64]]¶
The x, y, z, vx, vy, and vz columns all in one 6-N matrix of numpy float64 values. Nulls are converted to NaNs.
- property r_hat: ndarray[tuple[Any, ...], dtype[float64]]¶
Unit vector in the direction of the position vector.
- property v_hat: ndarray[tuple[Any, ...], dtype[float64]]¶
Unit vector in the direction of the velocity vector.
- property sigma_x: ndarray[tuple[Any, ...], dtype[float64]]¶
1-sigma uncertainty in the X-coordinate.
- property sigma_y: ndarray[tuple[Any, ...], dtype[float64]]¶
1-sigma uncertainty in the Y-coordinate.
- property sigma_z: ndarray[tuple[Any, ...], dtype[float64]]¶
1-sigma uncertainty in the Z-coordinate.
- property sigma_vx: ndarray[tuple[Any, ...], dtype[float64]]¶
1-sigma uncertainty in the X-coordinate velocity.
- property sigma_vy: ndarray[tuple[Any, ...], dtype[float64]]¶
1-sigma uncertainty in the Y-coordinate velocity.
- property sigma_vz: ndarray[tuple[Any, ...], dtype[float64]]¶
1-sigma uncertainty in the Z-coordinate velocity.
- property sigma_r: ndarray[tuple[Any, ...], dtype[float64]]¶
1-sigma uncertainties in the position vector.
- property sigma_r_mag: ndarray[tuple[Any, ...], dtype[float64]]¶
1-sigma uncertainty in the position.
- property sigma_v: ndarray[tuple[Any, ...], dtype[float64]]¶
1-sigma uncertainties in the velocity vector.
- property sigma_v_mag: ndarray[tuple[Any, ...], dtype[float64]]¶
1-sigma uncertainty in the velocity vector.
- property h_mag: ndarray[tuple[Any, ...], dtype[float64]]¶
Magnitude of the specific angular momentum vector.
- property values_km: ndarray[tuple[Any, ...], dtype[float64]]¶
Get coordinate values in km and km/s units.
- Returns:
Coordinate values with: - x, y, z in km - vx, vy, vz in km/s
- Return type:
np.ndarray (N, 6)
- property ric3_matrix: npt.NDArray[np.float]¶
3x3 rotation matrix to RIC (radial, in-track, cross-track)
- property ric6_matrix: npt.NDArray[np.float]¶
Nx6x6 rotation matrix to RIC (radial, in-track, cross-track)
- covariance_km() ndarray[tuple[Any, ...], dtype[float64]][source]¶
Get covariance matrix in km and km/s units.
- Returns:
Covariance matrices with position elements in km² and velocity elements in (km/s)²
- Return type:
np.ndarray (N, 6, 6)
- rotate(rotation_matrix: ndarray[tuple[Any, ...], dtype[float64]], frame_out: str) CartesianCoordinates[source]¶
Rotate Cartesian coordinates and their covariances by the given rotation matrix.
Covariance matrices are also rotated. Rotations will sometimes result in covariance matrix elements very near zero but not exactly zero. Any elements that are smaller than +-1e-25 are rounded down to 0.
- Parameters:
matrix – 6x6 rotation matrix.
frame_out (str) – Name of the frame to which coordinates are being rotated.
- Return type:
Rotated Cartesian coordinates and their covariances.
- translate(vector: ndarray[tuple[Any, ...], dtype[float64]], origin_out: str) CartesianCoordinates[source]¶
Translate Cartesian coordinates by the given vector.
- Parameters:
vector – 6x1 or 6xN translation vector. If a 6x1 vector is given, it is applied to all coordinates. If an 6xN array of vectors is given, each vector is applied to the corresponding coordinate.
origin_out – Name of the origin to which coordinates are being translated.
- Return type:
Translated Cartesian coordinates and their covariances.
- to_cometary() CometaryCoordinates[source]¶
Converts the Cartesian coordinates to the cometary parameterization.
- classmethod from_cometary(cometary: CometaryCoordinates) CartesianCoordinates[source]¶
Constructs CartesianCoordinates from the cometary parameterization.
- to_keplerian() KeplerianCoordinates[source]¶
Converts the Cartesian coordinates to the Keplerian parameterization.
- classmethod from_keplerian(keplerian: KeplerianCoordinates) CartesianCoordinates[source]¶
Constructs CartesianCoordinates from the Keplerian parameterization.
- to_spherical() SphericalCoordinates[source]¶
Converts the Cartesian coordinates to the spherical parameterization.
- classmethod from_spherical(spherical: SphericalCoordinates) CartesianCoordinates[source]¶
Constructs CartesianCoordinates from the spherical parameterization.
- schema: ClassVar[pa.Schema] = x: double y: double z: double vx: double vy: double vz: double time: struct<days: int64, nanos: int64> child 0, days: int64 child 1, nanos: int64 covariance: struct<values: large_list<item: double>> child 0, values: large_list<item: double> child 0, item: double origin: struct<code: large_string> child 0, code: large_string¶