adam_core.orbits package

class adam_core.orbits.Ephemeris(table: Table, **kwargs: int | float | str)[source]

Bases: Table

aberrated_coordinates

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.

alpha

A column for storing 64-bit floating point numbers.

coordinates

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.

light_time

A column for storing 64-bit floating point numbers.

Link these ephemerides back to the observers that generated them. This is useful if you want or need to use the observer’s position as part of any computation for any given set of ephemerides.

Not all propagators will return ephemerides exactly at the time of the input observers. As an example, PYOORB stores times as a single MJD, when converting from two integers to this singular float there will be a loss of precision. To mitigate this, the user may optionally define the precision to which would like to link back to observers. Times for both the ephemerides and observers will be rounded to this precision before linking.

Parameters:
  • observers (~adam_core.observers.observers.Observers (N)) – Observers that generated the ephemerides.

  • precision (str, optional) – Precision to which to link back to observers, by default “ns”.

Returns:

  • ~qv.MultiKeyLinkage[ – `~adam_core.orbits.ephemeris.Ephemeris, `~adam_core.observers.observersObservers

  • ]` – Linkage between ephemerides and observers.

object_id

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

orbit_id

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

predicted_magnitude_v

A column for storing 64-bit floating point numbers.

schema: ClassVar[pa.Schema] = orbit_id: large_string not null object_id: large_string coordinates: struct<rho: double, lon: double, lat: double, vrho: double, vlon: double, vlat: double, time: struct (... 118 chars omitted)   child 0, rho: double   child 1, lon: double   child 2, lat: double   child 3, vrho: double   child 4, vlon: double   child 5, vlat: double   child 6, time: struct<days: int64, nanos: int64>       child 0, days: int64       child 1, nanos: int64   child 7, covariance: struct<values: large_list<item: double>>       child 0, values: large_list<item: double>           child 0, item: double   child 8, origin: struct<code: large_string>       child 0, code: large_string predicted_magnitude_v: double alpha: double light_time: double aberrated_coordinates: struct<x: double, y: double, z: double, vx: double, vy: double, vz: double, time: struct<days: int64 (... 106 chars omitted)   child 0, x: double   child 1, y: double   child 2, z: double   child 3, vx: double   child 4, vy: double   child 5, vz: double   child 6, time: struct<days: int64, nanos: int64>       child 0, days: int64       child 1, nanos: int64   child 7, covariance: struct<values: large_list<item: double>>       child 0, values: large_list<item: double>           child 0, item: double   child 8, origin: struct<code: large_string>       child 0, code: large_string
class adam_core.orbits.Orbits(table: Table, **kwargs: int | float | str)[source]

Bases: Table

coordinates

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.

dynamical_class() ndarray[tuple[Any, ...], dtype[str]][source]

Compute dynamical classes of orbits. Currently limited to asteroid dynamical classes.

Returns:

dynamical_classes – Dynamical classes of orbits.

Return type:

~numpy.ndarray

group_by_orbit_id() Iterable[Tuple[str, Orbits]][source]

Group orbits by orbit ID and yield them.

Yields:
  • orbit_id (str) – Orbit ID.

  • orbits (~adam_core.orbits.orbits.Orbits) – Orbits belonging to this orbit ID.

object_id

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

orbit_id

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

physical_parameters

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.

preview(propagator: Propagator) None[source]

For a single orbit, render a plotly plot of the orbit.

schema: ClassVar[pa.Schema] = orbit_id: large_string not null object_id: large_string coordinates: struct<x: double, y: double, z: double, vx: double, vy: double, vz: double, time: struct<days: int64 (... 106 chars omitted)   child 0, x: double   child 1, y: double   child 2, z: double   child 3, vx: double   child 4, vy: double   child 5, vz: double   child 6, time: struct<days: int64, nanos: int64>       child 0, days: int64       child 1, nanos: int64   child 7, covariance: struct<values: large_list<item: double>>       child 0, values: large_list<item: double>           child 0, item: double   child 8, origin: struct<code: large_string>       child 0, code: large_string physical_parameters: struct<H_v: double, H_v_sigma: double, G: double, G_sigma: double, sigma_eff: double, chi2_red: doub (... 3 chars omitted)   child 0, H_v: double   child 1, H_v_sigma: double   child 2, G: double   child 3, G_sigma: double   child 4, sigma_eff: double   child 5, chi2_red: double
class adam_core.orbits.VariantOrbits(table: Table, **kwargs: int | float | str)[source]

Bases: Table

collapse(orbits: Orbits) Orbits[source]

Collapse the variants and recalculate the covariance matrix for each each orbit at each epoch. The mean state is taken from the orbits class and is not calculated from the variants.

Parameters:

orbits (~adam_core.orbits.orbits.Orbits) – Orbits from which the variants were generated.

Returns:

collapsed_orbits – The collapsed orbits.

Return type:

~adam_core.orbits.orbits.Orbits

collapse_by_object_id() Orbits[source]

Collapse the variant orbits into a mean and covariance matrix.

Returns:

collapsed_orbits – The collapsed orbits.

Return type:

~adam_core.orbits.orbits.Orbits

coordinates

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.

classmethod create(orbits: Orbits, method: Literal['auto', 'sigma-point', 'monte-carlo'] = 'auto', num_samples: int = 10000, alpha: float = 1, beta: float = 0, kappa: float = 0, seed: int | None = None) VariantOrbits[source]

Sample and create variants for the given orbits by sampling the covariance matrices. There are three supported methods: - sigma-point: Sample the covariance matrix using sigma points. This is the fastest method, but can be inaccurate if the covariance matrix is not well behaved. - monte-carlo: Sample the covariance matrix using a monte carlo method. This is the slowest method, but is the most accurate. 10k samples are drawn. - auto: Automatically select the best method based on the covariance matrix. If the covariance matrix is well behaved then sigma-point sampling will be used. If the covariance matrix is not well behaved then monte-carlo sampling will be used.

When sampling with monte-carlo, 10k samples are drawn. Sigma-point sampling draws 13 samples for 6-dimensional coordinates.

Parameters:
  • orbits ('~adam_core.orbits.orbits.Orbits') – The orbits for which to create variant orbits.

  • method ({'sigma-point', 'monte-carlo', 'auto'}, optional) – The method to use for sampling the covariance matrix. If ‘auto’ is selected then the method will be automatically selected based on the covariance matrix. The default is ‘auto’.

  • num_samples (int, optional) – The number of samples to draw when sampling with monte-carlo.

  • alpha (float, optional) – Spread of the sigma points between 1e^-2 and 1.

  • beta (float, optional) – Prior knowledge of the distribution when generating sigma points usually set to 2 for a Gaussian.

  • kappa (float, optional) – Secondary scaling parameter when generating sigma points usually set to 0.

Returns:

variants_orbits – The variant orbits.

Return type:

‘~adam_core.orbits.variants.VariantOrbits’

Link variants to the orbits from which they were generated.

Parameters:

orbits (~adam_core.orbits.orbits.Orbits) – Orbits from which the variants were generated.

Returns:

linkage – Linkage between variants and orbits.

Return type:

~quivr.MultiKeyLinkage[Orbits, VariantOrbits]

object_id

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

orbit_id

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

physical_parameters

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.

schema: ClassVar[pa.Schema] = orbit_id: large_string not null object_id: large_string variant_id: large_string weights: double weights_cov: double coordinates: struct<x: double, y: double, z: double, vx: double, vy: double, vz: double, time: struct<days: int64 (... 106 chars omitted)   child 0, x: double   child 1, y: double   child 2, z: double   child 3, vx: double   child 4, vy: double   child 5, vz: double   child 6, time: struct<days: int64, nanos: int64>       child 0, days: int64       child 1, nanos: int64   child 7, covariance: struct<values: large_list<item: double>>       child 0, values: large_list<item: double>           child 0, item: double   child 8, origin: struct<code: large_string>       child 0, code: large_string physical_parameters: struct<H_v: double, H_v_sigma: double, G: double, G_sigma: double, sigma_eff: double, chi2_red: doub (... 3 chars omitted)   child 0, H_v: double   child 1, H_v_sigma: double   child 2, G: double   child 3, G_sigma: double   child 4, sigma_eff: double   child 5, chi2_red: double
variant_id

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

weights

A column for storing 64-bit floating point numbers.

weights_cov

A column for storing 64-bit floating point numbers.

Subpackages

Submodules