adam_core.coordinates.spherical module

class adam_core.coordinates.spherical.SphericalCoordinates(table: Table, **kwargs: int | float | str)[source]

Bases: Table

rho

A column for storing 64-bit floating point numbers.

lon

A column for storing 64-bit floating point numbers.

lat

A column for storing 64-bit floating point numbers.

vrho

A column for storing 64-bit floating point numbers.

vlon

A column for storing 64-bit floating point numbers.

vlat

A column for storing 64-bit floating point numbers.

time

A column which represents an embedded quivr table.

Parameters:
  • table_type – The type of the table to embed.

  • nullable – Whether the column can contain null values.

  • metadata – A dictionary of metadata to attach to the column.

covariance

A column which represents an embedded quivr table.

Parameters:
  • table_type – The type of the table to embed.

  • nullable – Whether the column can contain null values.

  • metadata – A dictionary of metadata to attach to the column.

origin

A column which represents an embedded quivr table.

Parameters:
  • table_type – The type of the table to embed.

  • nullable – Whether the column can contain null values.

  • metadata – A dictionary of metadata to attach to the column.

frame

StringAttribute represents a string which is stored as UTF-8 bytes in Table metadata.

Parameters:

default – The default value for this attribute. If no default is provided, then the attribute must be set whenever constructing a table that uses it.

property values: ndarray
property sigma_rho

1-sigma uncertainty in radial distance.

property sigma_lon

1-sigma uncertainty in longitude.

property sigma_lat

1-sigma uncertainty in latitude.

property sigma_vrho

1-sigma uncertainty in radial velocity.

property sigma_vlon

1-sigma uncertainty in longitudinal velocity.

property sigma_vlat

1-sigma uncertainty in latitudinal velocity.

to_unit_sphere(only_missing: bool = False) SphericalCoordinates[source]

Convert to unit sphere. By default, all coordinates will have their rho values set to 1.0 and their vrho values set to 0.0. If only_missing is True, then only coordinates that have NaN values for rho will be set to 1.0 and coordinates that have NaN values for vrho will be set to 0.0.

TODO: We could look at scaling the uncertainties as well, but this is not currently implemented nor probably necessary. This function will mostly be used to convert SphericalCoordinates that have missing radial distances to cartesian coordinates on a unit sphere.

Parameters:

only_missing (bool, optional) – If True, then only coordinates that have NaN values for rho will be set to 1.0 and coordinates that have NaN values for vrho will be set to 0.0. If False, then all coordinates will be set to 1.0 and 0.0, respectively. The default is False.

Returns:

Spherical coordinates on a unit sphere, with rho and vrho set to 1.0 and 0.0, respectively.

Return type:

SphericalCoordinates

to_cartesian() CartesianCoordinates[source]
classmethod from_cartesian(cartesian: CartesianCoordinates) SphericalCoordinates[source]
to_cometary() CometaryCoordinates[source]
classmethod from_cometary(cometary_coordinates: CometaryCoordinates) SphericalCoordinates[source]
to_keplerian() KeplerianCoordinates[source]
classmethod from_keplerian(keplerian_coordinates: KeplerianCoordinates) SphericalCoordinates[source]
classmethod from_spherical(spherical_coordinates: SphericalCoordinates) SphericalCoordinates[source]
schema: ClassVar[pa.Schema] = rho: double lon: double lat: double vrho: double vlon: double vlat: 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